> ## Documentation Index
> Fetch the complete documentation index at: https://gproxy.leenhawk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1beta/models/{model}:batchEmbedContents

> Available at the instance root or under a provider/namespace prefix. Shared paths select the wire dialect from client headers; without dialect evidence, the first listed route wins.



## OpenAPI

````yaml /generated/openapi.json post /v1beta/models/{model}:batchEmbedContents
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /v1beta/models/{model}:batchEmbedContents:
    post:
      tags:
        - Forwarding
      summary: POST /v1beta/models/{model}:batchEmbedContents
      description: >-
        Available at the instance root or under a provider/namespace prefix.
        Shared paths select the wire dialect from client headers; without
        dialect evidence, the first listed route wins.
      parameters:
        - in: path
          name: model
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_BatchEmbedContentsRequestBody'
        required: true
      responses:
        2XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_BatchEmbedContentsResponseBody'
          description: Successful protocol response
        default:
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Output_Envelope'
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_ErrorDetail'
                    required:
                      - error
                    type: object
                  - allOf:
                      - $ref: '#/components/schemas/Output_ErrorEvent'
                      - properties:
                          type:
                            const: error
                        required:
                          - type
                        type: object
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_GenerateContentError'
                    required:
                      - error
                    type: object
            text/plain:
              schema:
                type: string
          description: Gateway or upstream error
components:
  schemas:
    Input_BatchEmbedContentsRequestBody:
      additionalProperties: true
      properties:
        requests:
          items:
            $ref: '#/components/schemas/Input_BatchEmbedContentRequest'
          type: array
      required:
        - requests
      type: object
    Output_BatchEmbedContentsResponseBody:
      additionalProperties: true
      properties:
        embeddings:
          items:
            $ref: '#/components/schemas/Output_ContentEmbedding'
          type:
            - array
            - 'null'
        usageMetadata:
          anyOf:
            - $ref: '#/components/schemas/Output_EmbeddingUsageMetadata'
            - type: 'null'
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      required:
        - message
      type: object
    Output_ErrorEvent:
      additionalProperties: true
      properties:
        error:
          $ref: '#/components/schemas/Output_StreamError'
        request_id:
          type:
            - string
            - 'null'
      required:
        - error
      type: object
    Output_GenerateContentError:
      additionalProperties: true
      properties:
        code:
          format: int64
          type: integer
        details:
          items: true
          type:
            - array
            - 'null'
        message:
          type: string
        status:
          type:
            - string
            - 'null'
      required:
        - code
        - message
      type: object
    Input_BatchEmbedContentRequest:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Input_Content'
        embedContentConfig:
          anyOf:
            - $ref: '#/components/schemas/Input_EmbedContentConfig'
            - type: 'null'
        model:
          type: string
        outputDimensionality:
          format: int64
          type:
            - integer
            - 'null'
        taskType:
          anyOf:
            - $ref: '#/components/schemas/Input_GeminiTaskType'
            - type: 'null'
        title:
          type:
            - string
            - 'null'
      required:
        - model
        - content
      type: object
    Output_ContentEmbedding:
      additionalProperties: true
      properties:
        shape:
          items:
            format: int64
            type: integer
          type:
            - array
            - 'null'
        values:
          items:
            type: number
          type:
            - array
            - 'null'
      type: object
    Output_EmbeddingUsageMetadata:
      additionalProperties: true
      properties:
        promptTokenCount:
          format: int64
          type:
            - integer
            - 'null'
        promptTokenDetails:
          items:
            $ref: '#/components/schemas/Output_ModalityTokenCount'
          type:
            - array
            - 'null'
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Output_StreamError:
      additionalProperties: true
      properties:
        message:
          type: string
        type:
          $ref: '#/components/schemas/Output_StreamErrorType'
      required:
        - type
        - message
      type: object
    Input_Content:
      additionalProperties: true
      properties:
        parts:
          items:
            $ref: '#/components/schemas/Input_Part'
          type:
            - array
            - 'null'
        role:
          type:
            - string
            - 'null'
      type: object
    Input_EmbedContentConfig:
      additionalProperties: true
      properties:
        audioTrackExtraction:
          type:
            - boolean
            - 'null'
        autoTruncate:
          type:
            - boolean
            - 'null'
        documentOcr:
          type:
            - boolean
            - 'null'
        outputDimensionality:
          format: int64
          type:
            - integer
            - 'null'
        taskType:
          anyOf:
            - $ref: '#/components/schemas/Input_GeminiTaskType'
            - type: 'null'
        title:
          type:
            - string
            - 'null'
      type: object
    Input_GeminiTaskType:
      enum:
        - TASK_TYPE_UNSPECIFIED
        - RETRIEVAL_QUERY
        - RETRIEVAL_DOCUMENT
        - SEMANTIC_SIMILARITY
        - CLASSIFICATION
        - CLUSTERING
        - QUESTION_ANSWERING
        - FACT_VERIFICATION
        - CODE_RETRIEVAL_QUERY
      type: string
    Output_ModalityTokenCount:
      additionalProperties: true
      properties:
        modality:
          anyOf:
            - $ref: '#/components/schemas/Output_Modality'
            - type: 'null'
        tokenCount:
          format: int64
          type:
            - integer
            - 'null'
      type: object
    Output_StreamErrorType:
      enum:
        - api_error
        - authentication_error
        - billing_error
        - invalid_request_error
        - not_found_error
        - overloaded_error
        - permission_error
        - rate_limit_error
        - timeout_error
        - conflict_error
        - request_too_large
      type: string
    Input_Part:
      additionalProperties: true
      properties:
        audioTranscription:
          anyOf:
            - $ref: '#/components/schemas/Input_AudioTranscription'
            - type: 'null'
        codeExecutionResult:
          anyOf:
            - $ref: '#/components/schemas/Input_CodeExecutionResult2'
            - type: 'null'
        executableCode:
          anyOf:
            - $ref: '#/components/schemas/Input_ExecutableCode'
            - type: 'null'
        fileData:
          anyOf:
            - $ref: '#/components/schemas/Input_FileData'
            - type: 'null'
        functionCall:
          anyOf:
            - $ref: '#/components/schemas/Input_FunctionCall2'
            - type: 'null'
        functionResponse:
          anyOf:
            - $ref: '#/components/schemas/Input_FunctionResponse'
            - type: 'null'
        inlineData:
          anyOf:
            - $ref: '#/components/schemas/Input_Blob'
            - type: 'null'
        mediaProcessing:
          anyOf:
            - $ref: '#/components/schemas/Input_MediaProcessing'
            - type: 'null'
        mediaResolution:
          anyOf:
            - $ref: '#/components/schemas/Input_MediaResolution'
            - type: 'null'
        partMetadata:
          additionalProperties: true
          type:
            - object
            - 'null'
        speechMetadata:
          anyOf:
            - $ref: '#/components/schemas/Input_SpeechMetadata'
            - type: 'null'
        text:
          type:
            - string
            - 'null'
        thought:
          type:
            - boolean
            - 'null'
        thoughtSignature:
          type:
            - string
            - 'null'
        toolCall:
          anyOf:
            - $ref: '#/components/schemas/Input_ToolCall'
            - type: 'null'
        toolResponse:
          anyOf:
            - $ref: '#/components/schemas/Input_ToolResponse'
            - type: 'null'
        videoMetadata:
          anyOf:
            - $ref: '#/components/schemas/Input_VideoMetadata'
            - type: 'null'
      type: object
    Output_Modality:
      enum:
        - MODALITY_UNSPECIFIED
        - TEXT
        - IMAGE
        - VIDEO
        - AUDIO
        - DOCUMENT
      type: string
    Input_AudioTranscription:
      additionalProperties: true
      properties:
        speakerLabel:
          type:
            - string
            - 'null'
        text:
          type: string
        words:
          items:
            $ref: '#/components/schemas/Input_WordInfo'
          type:
            - array
            - 'null'
      required:
        - text
      type: object
    Input_CodeExecutionResult2:
      additionalProperties: true
      properties:
        id:
          type:
            - string
            - 'null'
        outcome:
          $ref: '#/components/schemas/Input_Outcome'
        output:
          type:
            - string
            - 'null'
      required:
        - outcome
      type: object
    Input_ExecutableCode:
      additionalProperties: true
      properties:
        code:
          type: string
        id:
          type:
            - string
            - 'null'
        language:
          $ref: '#/components/schemas/Input_Language'
      required:
        - language
        - code
      type: object
    Input_FileData:
      additionalProperties: true
      properties:
        displayName:
          type:
            - string
            - 'null'
        fileUri:
          type: string
        mimeType:
          type:
            - string
            - 'null'
      required:
        - fileUri
      type: object
    Input_FunctionCall2:
      additionalProperties: true
      properties:
        args:
          additionalProperties: true
          type:
            - object
            - 'null'
        id:
          type:
            - string
            - 'null'
        name:
          type: string
      required:
        - name
      type: object
    Input_FunctionResponse:
      additionalProperties: true
      properties:
        id:
          type:
            - string
            - 'null'
        name:
          type: string
        parts:
          items:
            $ref: '#/components/schemas/Input_FunctionResponsePart'
          type:
            - array
            - 'null'
        response:
          additionalProperties: true
          type: object
        scheduling:
          anyOf:
            - $ref: '#/components/schemas/Input_Scheduling'
            - type: 'null'
        willContinue:
          type:
            - boolean
            - 'null'
      required:
        - name
        - response
      type: object
    Input_Blob:
      additionalProperties: true
      properties:
        data:
          type: string
        displayName:
          type:
            - string
            - 'null'
        mimeType:
          type: string
      required:
        - mimeType
        - data
      type: object
    Input_MediaProcessing:
      enum:
        - MEDIA_PROCESSING_UNSPECIFIED
        - STATIC
        - AGENTIC
      type: string
    Input_MediaResolution:
      additionalProperties: true
      properties:
        level:
          anyOf:
            - $ref: '#/components/schemas/Input_MediaResolutionLevel'
            - type: 'null'
      type: object
    Input_SpeechMetadata:
      additionalProperties: true
      properties:
        speaker:
          type:
            - string
            - 'null'
        style:
          type:
            - string
            - 'null'
      type: object
    Input_ToolCall:
      additionalProperties: true
      properties:
        args:
          additionalProperties: true
          type:
            - object
            - 'null'
        id:
          type:
            - string
            - 'null'
        toolName:
          type:
            - string
            - 'null'
        toolType:
          $ref: '#/components/schemas/Input_ToolType2'
      required:
        - toolType
      type: object
    Input_ToolResponse:
      additionalProperties: true
      properties:
        id:
          type:
            - string
            - 'null'
        response:
          additionalProperties: true
          type:
            - object
            - 'null'
        toolType:
          $ref: '#/components/schemas/Input_ToolType2'
      required:
        - toolType
      type: object
    Input_VideoMetadata:
      additionalProperties: true
      properties:
        endOffset:
          type:
            - string
            - 'null'
        fps:
          format: double
          type:
            - number
            - 'null'
        startOffset:
          type:
            - string
            - 'null'
      type: object
    Input_WordInfo:
      additionalProperties: true
      properties:
        endOffset:
          type:
            - string
            - 'null'
        startOffset:
          type:
            - string
            - 'null'
        word:
          type: string
      required:
        - word
      type: object
    Input_Outcome:
      enum:
        - OUTCOME_UNSPECIFIED
        - OUTCOME_OK
        - OUTCOME_FAILED
        - OUTCOME_DEADLINE_EXCEEDED
      type: string
    Input_Language:
      enum:
        - LANGUAGE_UNSPECIFIED
        - PYTHON
      type: string
    Input_FunctionResponsePart:
      additionalProperties: true
      properties:
        inlineData:
          anyOf:
            - $ref: '#/components/schemas/Input_Blob'
            - type: 'null'
      type: object
    Input_Scheduling:
      enum:
        - SCHEDULING_UNSPECIFIED
        - SILENT
        - WHEN_IDLE
        - INTERRUPT
      type: string
    Input_MediaResolutionLevel:
      enum:
        - MEDIA_RESOLUTION_UNSPECIFIED
        - MEDIA_RESOLUTION_LOW
        - MEDIA_RESOLUTION_MEDIUM
        - MEDIA_RESOLUTION_HIGH
        - MEDIA_RESOLUTION_ULTRA_HIGH
      type: string
    Input_ToolType2:
      enum:
        - TOOL_TYPE_UNSPECIFIED
        - GOOGLE_SEARCH_WEB
        - GOOGLE_SEARCH_IMAGE
        - URL_CONTEXT
        - GOOGLE_MAPS
        - FILE_SEARCH
      type: string
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey

````

## Related topics

- [Routing & Endpoints](https://gproxy.leenhawk.com/reference/routing-table.md)
- [POST /v1beta/models/{model}:embedContent](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:embedcontent.md)
- [POST /v1beta/models/{model}:generateContent](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:generatecontent.md)
- [POST /v1beta/models/{model}:streamGenerateContent](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:streamgeneratecontent.md)
- [POST /v1beta/models/{model}:countTokens](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:counttokens.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.