GET

/v1/schemas/gemini/chat/v1beta/models/{modelsId}:generateAnswer

kind inputactivity chathash e7015cfb…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

6 properties · 0 required · 24 $defs
propertytypedescriptionconstraints
temperaturenumberOptional. Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses fro…format: float
safetySettingsSafetySetting[]Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateAnswerRequest.contents` and `GenerateAnswerResponse.candidate`. There should not be more than one setting for each `SafetyCategory` type. Th…
semanticRetrieverSemanticRetrieverConfigConfiguration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API.
inlinePassagesGroundingPassagesA repeated list of passages.
contentsContent[]Required. The content of the current conversation with the `Model`. For single-turn queries, this is a single question to answer. For multi-turn queries, this is a repeated field that contains conversation history and the last `Content` in the list containing …
answerStyleenumRequired. Style in which answers should be returned.ANSWER_STYLE_UNSPECIFIED | ABSTRACTIVE | EXTRACTIVE | VERBOSE

Types

24 $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.

Conditionobject

Filter condition applicable to a single key.

numericValuenumberThe numeric value to filter the metadata on.format: float
stringValuestringThe string value to filter the metadata on.
operationenumRequired. Operator applied to the given key-value pair to trigger the condition.OPERATOR_UNSPECIFIED | LESS | LESS_EQUAL | EQUAL | GREATER_EQUAL | GREATER · +3 more

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.

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

GroundingPassageobject

Passage included inline with a grounding configuration.

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.
idstringIdentifier for the passage for attributing this passage in grounded answers.

GroundingPassagesobject

A repeated list of passages.

passagesGroundingPassage[]List of passages.

MetadataFilterobject

User provided filter to limit retrieval based on `Chunk` or `Document` level metadata values. Example (genre = drama OR genre = action): key = "document.custom_metadata.genre" conditions = [{string_value = "drama", operation = EQUAL}, {string_value = "action",…

keystringRequired. The key of the metadata to filter on.
conditionsCondition[]Required. The `Condition`s for the given key that will trigger this filter. Multiple `Condition`s are joined by logical ORs.

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

SafetySettingobject

Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.

categoryenumRequired. The category for this setting.HARM_CATEGORY_UNSPECIFIED | HARM_CATEGORY_DEROGATORY | HARM_CATEGORY_TOXICITY | HARM_CATEGORY_VIOLENCE | HARM_CATEGORY_SEXUAL | HARM_CATEGORY_MEDICAL · +7 more
thresholdenumRequired. Controls the probability threshold at which harm is blocked.HARM_BLOCK_THRESHOLD_UNSPECIFIE… | BLOCK_LOW_AND_ABOVE | BLOCK_MEDIUM_AND_ABOVE | BLOCK_ONLY_HIGH | BLOCK_NONE | OFF

SemanticRetrieverConfigobject

Configuration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API.

sourcestringRequired. Name of the resource for retrieval. Example: `corpora/123` or `corpora/123/documents/abc`.
queryContentThe 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.
metadataFiltersMetadataFilter[]Optional. Filters for selecting `Document`s and/or `Chunk`s from the resource.
maxChunksCountintegerOptional. Maximum number of relevant `Chunk`s to retrieve.format: int32
minimumRelevanceScorenumberOptional. Minimum relevance score for retrieved relevant `Chunk`s.format: float

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}:generateAnswer","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}