GET

/v1/schemas/gemini/embeddings/v1beta/models/{modelsId}:batchEmbedContents

kind inputactivity embeddingshash 4b2101be…extracted Nov 11, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
343ff1b68827292bea63e0965dec5cfd8c97953c3345c7c552e91fce8bb4ab90
{
  "fetchedAt": 1794375004,
  "extractorVersion": "2",
  "verifiedAt": null
}

Request body

1 properties · 0 required · 20 $defs
propertytypedescriptionconstraints
requestsEmbedContentRequest[]Required. Embed requests for the batch. The model in each of these requests must match the model specified `BatchEmbedContentsRequest.model`.

Types

20 $defs

AudioTranscriptionobject

The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label.

speakerLabelstringOptional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set.
wordsWordInfo[]Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set.
textstringRequired. The transcription text of this audio segment.

Blobobject

Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.

mimeTypestringThe IANA standard MIME type of the source data. Examples of supported types: - Images: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - Audio: audio/*, video/audio/s16le, video/audio/wav - Video: video/* - Text: tex…
datastringRaw bytes for media formats.format: byte
displayNamestringOptional. Specifies the name used to refer to this blob to the model (e.g. "my_blob.png"). Used as the blob reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`.

CodeExecutionResultobject

Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.

outputstringOptional. Contains stdout when code execution is successful, stderr or other description otherwise.
outcomeenumRequired. Outcome of the code execution.OUTCOME_UNSPECIFIED | OUTCOME_OK | OUTCOME_FAILED | OUTCOME_DEADLINE_EXCEEDED
idstringOptional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id.

Contentobject

The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.

rolestringOptional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.
partsPart[]Ordered `Parts` that constitute a single message. Parts may have different MIME types.

EmbedContentConfigobject

Configurations for the EmbedContent request.

titlestringOptional. The title for the text.
documentOcrbooleanOptional. Whether to enable OCR for document content.
audioTrackExtractionbooleanOptional. Whether to extract audio from video content.
taskTypeenumOptional. The task type of the embedding.TASK_TYPE_UNSPECIFIED | RETRIEVAL_QUERY | RETRIEVAL_DOCUMENT | SEMANTIC_SIMILARITY | CLASSIFICATION | CLUSTERING · +3 more
autoTruncatebooleanOptional. Whether to silently truncate the input content if it's longer than the maximum sequence length.
outputDimensionalityintegerOptional. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end.format: int32

EmbedContentRequestobject

Request containing the `Content` for the model to embed.

outputDimensionalityintegerOptional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You …format: int32
taskTypeenumOptional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`).TASK_TYPE_UNSPECIFIED | RETRIEVAL_QUERY | RETRIEVAL_DOCUMENT | SEMANTIC_SIMILARITY | CLASSIFICATION | CLUSTERING · +3 more
modelstringRequired. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`
embedContentConfigEmbedContentConfigConfigurations for the EmbedContent request.
titlestringOptional. Deprecated: Please use EmbedContentConfig.title instead. An optional title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality embeddings for retrieval.
contentContentThe base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.

ExecutableCodeobject

Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generat…

languageenumRequired. Programming language of the `code`.LANGUAGE_UNSPECIFIED | PYTHON
codestringRequired. The code to be executed.
idstringOptional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`.

FileDataobject

URI based data.

displayNamestringOptional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`.
fileUristringRequired. URI.
mimeTypestringOptional. The IANA standard MIME type of the source data.

FunctionCallobject

A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.

idstringOptional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
argsobjectOptional. The function parameters and values in JSON object format.
namestringRequired. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.

FunctionResponseobject

The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` m…

namestringRequired. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.
schedulingenumOptional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.SCHEDULING_UNSPECIFIED | SILENT | WHEN_IDLE | INTERRUPT
responseobjectRequired. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can …
partsFunctionResponsePart[]Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
willContinuebooleanOptional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. …
idstringOptional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`.

FunctionResponseBlobobject

Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.

mimeTypestringThe IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-in…
displayNamestringOptional. Display name of the blob. Used to provide a label or filename to distinguish blobs, and to reference the blob from `FunctionResponse.response` (for example, via `{"$ref": "DISPLAY_NAME"}`).
datastringRaw bytes for media formats.format: byte

FunctionResponseFileDataobject

URI based data for function response.

mimeTypestringThe IANA standard MIME type of the source data. If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Multimodal function responses](https://aistudio.google.com/docs/function-calling#multimodal) and [S…
fileUristringRequired. URI.
displayNamestringOptional. Display name of the file. Used to provide a label or filename to distinguish file data, and to reference the file from `FunctionResponse.response` (for example, via `{"$ref": "DISPLAY_NAME"}`).

FunctionResponsePartobject

A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. Media can …

fileDataFunctionResponseFileDataURI based data for function response.
inlineDataFunctionResponseBlobRaw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.
mediaProcessingenumOptional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field.MEDIA_PROCESSING_UNSPECIFIED | STATIC | AGENTIC

Partobject

A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying th…

videoMetadataVideoMetadataMetadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame co…
partMetadataobjectCustom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part str…
speechMetadataSpeechMetadataSpeech metadata for `text` parts.
codeExecutionResultCodeExecutionResultResult of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.
inlineDataBlobRaw media bytes. Text should not be sent as raw bytes, use the 'text' field.
textstringInline text.
executableCodeExecutableCodeCode generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generat…
thoughtbooleanOptional. Indicates if the part is thought from the model.
mediaProcessingenumOptional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field.MEDIA_PROCESSING_UNSPECIFIED | STATIC | AGENTIC
toolCallToolCallA predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in…
toolResponseToolResponseThe output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` mes…
functionCallFunctionCallA predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.
audioTranscriptionAudioTranscriptionThe transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label.
fileDataFileDataURI based data.
functionResponseFunctionResponseThe result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` m…
mediaResolutionV1mainMediaResolutionMedia resolution for tokenization.
thoughtSignaturestringOptional. An opaque signature for the thought so it can be reused in subsequent requests.format: byte

SpeechMetadataobject

Speech metadata for `text` parts.

stylestringOptional. Optional style instruction for the speech synthesis.
speakerstringOptional. Optional speaker name for multi-speaker synthesis.

ToolCallobject

A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in…

argsobjectOptional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...}
idstringOptional. Unique identifier of the tool call. The server returns the tool response with the matching `id`.
toolNamestringOptional. The name of the tool that was called.
toolTypeenumRequired. The type of tool that was called.TOOL_TYPE_UNSPECIFIED | GOOGLE_SEARCH_WEB | GOOGLE_SEARCH_IMAGE | URL_CONTEXT | GOOGLE_MAPS | FILE_SEARCH · +1 more

ToolResponseobject

The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` mes…

idstringOptional. The identifier of the tool call this response is for.
toolTypeenumRequired. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`.TOOL_TYPE_UNSPECIFIED | GOOGLE_SEARCH_WEB | GOOGLE_SEARCH_IMAGE | URL_CONTEXT | GOOGLE_MAPS | FILE_SEARCH · +1 more
responseobjectOptional. The tool response.

V1mainMediaResolutionobject

Media resolution for tokenization.

levelenumThe tokenization quality used for given media. for Gemini API support .MEDIA_RESOLUTION_UNSPECIFIED | MEDIA_RESOLUTION_LOW | MEDIA_RESOLUTION_MEDIUM | MEDIA_RESOLUTION_HIGH | MEDIA_RESOLUTION_ULTRA_HIGH

VideoMetadataobject

Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame co…

endOffsetstringOptional. The end offset of the video.format: google-duration
startOffsetstringOptional. The start offset of the video.format: google-duration
fpsnumberOptional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].format: double

WordInfoobject

Information about a single recognized word.

wordstringRequired. Transcript of the word.
endOffsetstringOptional. End offset in time of the word relative to the start of the audio.format: google-duration
startOffsetstringOptional. Start offset in time of the word relative to the start of the audio.format: google-duration

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"gemini","endpointId":"v1beta/models/{modelsId}:batchEmbedContents","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}