/v1/schemas/gemini/chat/v1beta/dynamic/{dynamicId}:streamGenerateContent
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace8b1d653d4bb7e4c0a1c32aee9dabc01ecd267ae5ff628c9a2a508a6f72c01cc6{
"fetchedAt": 1794461403,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
12 properties · 0 required · 56 $defs| property | type | description | constraints |
|---|---|---|---|
| labels | object | Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can… | |
| tools | Tool[] | Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Support… | |
| continuationToken | string | Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the… | format: byte |
| toolConfig | ToolConfig | The Tool configuration containing parameters for specifying `Tool` use in the request. | |
| contents | Content[] | Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that c… | |
| generationConfig | GenerationConfig | Configuration options for model generation and outputs. Not all parameters are configurable for every model. | |
| store | boolean | Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. | |
| cachedContent | string | Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` | |
| model | string | Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. | |
| safetySettings | SafetySetting[] | Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type.… | |
| systemInstruction | Content | 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. | |
| serviceTier | enum | Optional. The service tier of the request. | unspecified | standard | flex | priority |
Types
56 $defsAudioResponseFormatobject
Configuration for audio output format.
| sampleRate | integer | Optional. Sample rate in Hz. | format: int32 |
| delivery | enum | Optional. The delivery mode for the audio output. | DELIVERY_UNSPECIFIED | INLINE | URI |
| bitRate | integer | Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). | format: int32 |
| mimeType | enum | Optional. The MIME type of the audio output. | MIME_TYPE_UNSPECIFIED | AUDIO_MP3 | AUDIO_OGG_OPUS | AUDIO_L16 | AUDIO_WAV | AUDIO_ALAW · +1 more |
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.
| speakerLabel | string | Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. | |
| text | string | Required. The transcription text of this audio segment. | |
| words | WordInfo[] | Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. |
AudioTranscriptionConfigobject
The audio transcription configuration.
| languageCodes | string[] | Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection. | |
| sourceText | string | Optional. The source text to be edited or rewritten via voice instructions. When provided in `SMART` mode, the model evaluates the audio input against this text and emits the complete replacement text in the candidate response rather than appending to it. | |
| diarization | boolean | Optional. Configures speaker diarization. | |
| languageAuto | LanguageAuto | Indicates the language of the audio should be automatically detected. | |
| mode | enum | Optional. Configures transcription mode. Supported values: `VERBATIM`, `SMART`. If unspecified, defaults to `VERBATIM` transcription. In `SMART` mode, the model performs disfluency removal (eliminating filler words, repetitions, and false starts), light gramma… | MODE_UNSPECIFIED | VERBATIM | SMART |
| wordTimestamp | boolean | Optional. Configures word-level timestamp generation. | |
| adaptationPhrases | string[] | Optional. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms. | |
| languageHints | LanguageHints | Provides hints to the model about possible languages present in the audio. | |
| customVocabulary | string[] | Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms (product names, proper nouns, jargon). |
Blobobject
Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.
| mimeType | string | The 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… | |
| data | string | Raw bytes for media formats. | format: byte |
| displayName | string | Optional. 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`. |
CodeExecutionobject
Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.
CodeExecutionResultobject
Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.
| outcome | enum | Required. Outcome of the code execution. | OUTCOME_UNSPECIFIED | OUTCOME_OK | OUTCOME_FAILED | OUTCOME_DEADLINE_EXCEEDED |
| output | string | Optional. Contains stdout when code execution is successful, stderr or other description otherwise. | |
| id | string | Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. |
ComputerUseobject
Computer Use tool type.
| environment | enum | Required. The environment being operated. | ENVIRONMENT_UNSPECIFIED | ENVIRONMENT_BROWSER | ENVIRONMENT_MOBILE | ENVIRONMENT_DESKTOP |
| excludedPredefinedFunctions | string[] | Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the defin… | |
| enablePromptInjectionDetection | boolean | Optional. Whether enable the prompt injection detection check on computer-use request. | |
| disabledSafetyPolicies | enum[] | Optional. Disabled safety policies for computer use. |
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.
| parts | Part[] | Ordered `Parts` that constitute a single message. Parts may have different MIME types. | |
| role | string | Optional. 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. |
DynamicRetrievalConfigobject
Describes the options to customize dynamic retrieval.
| mode | enum | The mode of the predictor to be used in dynamic retrieval. | MODE_UNSPECIFIED | MODE_DYNAMIC |
| dynamicThreshold | number | The threshold to be used in dynamic retrieval. If not set, a system default value is used. | format: float |
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…
| code | string | Required. The code to be executed. | |
| id | string | Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. | |
| language | enum | Required. Programming language of the `code`. | LANGUAGE_UNSPECIFIED | PYTHON |
FileDataobject
URI based data.
| mimeType | string | Optional. The IANA standard MIME type of the source data. | |
| fileUri | string | Required. URI. | |
| displayName | string | Optional. 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`. |
FileSearchobject
The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.
| fileSearchStoreNames | string[] | Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123` | |
| metadataFilter | string | Optional. Metadata filter to apply to the semantic retrieval documents and chunks. | |
| topK | integer | Optional. The number of semantic retrieval chunks to retrieve. | format: int32 |
FunctionCallobject
A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.
| name | string | Required. 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. | |
| args | object | Optional. The function parameters and values in JSON object format. | |
| id | string | Optional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`. |
FunctionCallingConfigobject
Configuration for specifying function calling behavior.
| allowedFunctionNames | string[] | Optional. A set of function names that, when provided, limits the functions the model will call. This should only be set when the Mode is ANY or VALIDATED. Function names should match [FunctionDeclaration.name]. When set, model will predict a function call fro… | |
| mode | enum | Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO. | MODE_UNSPECIFIED | AUTO | ANY | NONE | VALIDATED |
FunctionDeclarationobject
Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block…
| name | string | Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 128. | |
| behavior | enum | Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. | UNSPECIFIED | BLOCKING | NON_BLOCKING |
| responseJsonSchema | any | Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. | |
| description | string | Required. A brief description of the function. | |
| response | Schema | The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). | |
| parametersJsonSchema | any | Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { "type": "object", "properties": { "name": { "type": "string" }, "age": { "t… | |
| parameters | Schema | The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). |
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…
| willContinue | boolean | Optional. 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. … | |
| response | object | Required. 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 … | |
| scheduling | enum | Optional. 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 |
| parts | FunctionResponsePart[] | Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. | |
| id | string | Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. | |
| name | string | Required. 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. |
FunctionResponseBlobobject
Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.
| mimeType | string | The 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… | |
| displayName | string | Optional. 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"}`). | |
| data | string | Raw bytes for media formats. | format: byte |
FunctionResponseFileDataobject
URI based data for function response.
| fileUri | string | Required. URI. | |
| displayName | string | Optional. 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"}`). | |
| mimeType | string | The 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… |
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 …
| mediaProcessing | enum | Optional. 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 |
| inlineData | FunctionResponseBlob | Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. | |
| fileData | FunctionResponseFileData | URI based data for function response. |
GenerationConfigobject
Configuration options for model generation and outputs. Not all parameters are configurable for every model.
| stopSequences | string[] | Optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a `stop_sequence`. The stop sequence will not be included as part of the response. | |
| audioTranscriptionConfig | AudioTranscriptionConfig | The audio transcription configuration. | |
| candidateCount | integer | Optional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family) | format: int32 |
| responseSchema | Schema | The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). | |
| maxOutputTokens | integer | Optional. The maximum number of tokens to include in a response candidate. Note: The default value varies by model, see the `Model.output_token_limit` attribute of the `Model` returned from the `getModel` function. | format: int32 |
| imageConfig | ImageConfig | Config for image generation features. | |
| speechConfig | SpeechConfig | Config for speech generation and transcription. | |
| responseLogprobs | boolean | Optional. If true, export the logprobs results in response. | |
| translationConfig | TranslationConfig | Config for translation features. | |
| topK | integer | Optional. The maximum number of tokens to consider when sampling. Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Models running with nucleus sampling … | format: int32 |
| topP | number | Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and Top-p (nucleus) sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k samp… | format: float |
| enableEnhancedCivicAnswers | boolean | Optional. Enables enhanced civic answers. It may not be available for all models. | |
| responseJsonSchema | any | Optional. An internal detail. Use `responseJsonSchema` rather than this field. | |
| frequencyPenalty | number | Optional. Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far. A positive penalty will discourage the use of tokens that have already been used, proportional to the number o… | format: float |
| temperature | number | Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned from the `getModel` function. Values can range from [0.0, 2.0]. This field is no longer supported and is sil… | format: float |
| thinkingConfig | ThinkingConfig | Config for thinking features. | |
| responseMimeType | string | Optional. MIME type of the generated candidate text. Supported MIME types are: `text/plain`: (default) Text output. `application/json`: JSON response in the response candidates. `text/x.enum`: ENUM as a string response in the response candidates. Refer to the … | |
| mediaResolution | enum | Optional. If specified, the media resolution specified will be used. | MEDIA_RESOLUTION_UNSPECIFIED | MEDIA_RESOLUTION_LOW | MEDIA_RESOLUTION_MEDIUM | MEDIA_RESOLUTION_HIGH |
| _responseJsonSchema | any | Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may… | |
| enableAffectiveDialog | boolean | Optional. If enabled, the model will detect emotions and adapt its responses accordingly. | |
| responseModalities | enum[] | Optional. The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response. A model may have multiple combinations of supporte… | |
| logprobs | integer | Optional. Only valid if response_logprobs=True. This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20]. | format: int32 |
| seed | integer | Optional. Seed used in decoding. If not set, the request uses a randomly generated seed. | format: int32 |
| responseFormat | ResponseFormatConfig | Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality. | |
| presencePenalty | number | Optional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response. This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequency_penalty for a penalty … | format: float |
GoogleMapsobject
The GoogleMaps Tool that provides geospatial context for the user's query.
| enableWidget | boolean | Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response. |
GoogleSearchobject
GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
| timeRangeFilter | Interval | Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecifi… | |
| searchTypes | SearchTypes | Different types of search that can be enabled on the GoogleSearch tool. |
GoogleSearchRetrievalobject
Tool to retrieve public web data for grounding, powered by Google.
| dynamicRetrievalConfig | DynamicRetrievalConfig | Describes the options to customize dynamic retrieval. |
ImageConfigobject
Config for image generation features.
| imageSize | string | Optional. Specifies the size of generated images. Supported values are `512`, `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`. | |
| aspectRatio | string | Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`. If not specified, the model will choose a default aspect ratio based on any re… |
ImageResponseFormatobject
Configuration for image output format.
| mimeType | enum | Optional. The MIME type of the image output. | MIME_TYPE_UNSPECIFIED | IMAGE_JPEG |
| delivery | enum | Optional. The delivery mode for the image output. | DELIVERY_UNSPECIFIED | INLINE | URI |
| imageSize | enum | Optional. The size of the image output. | IMAGE_SIZE_UNSPECIFIED | IMAGE_SIZE_FIVE_TWELVE | IMAGE_SIZE_ONE_K | IMAGE_SIZE_TWO_K | IMAGE_SIZE_FOUR_K |
| aspectRatio | enum | Optional. The aspect ratio for the image output. | ASPECT_RATIO_UNSPECIFIED | ASPECT_RATIO_ONE_BY_ONE | ASPECT_RATIO_TWO_BY_THREE | ASPECT_RATIO_THREE_BY_TWO | ASPECT_RATIO_THREE_BY_FOUR | ASPECT_RATIO_FOUR_BY_THREE · +9 more |
ImageSearchobject
Image search for grounding and related configurations.
Intervalobject
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecifi…
| endTime | string | Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. | format: google-datetime |
| startTime | string | Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. | format: google-datetime |
LanguageAutoobject
Indicates the language of the audio should be automatically detected.
LanguageHintsobject
Provides hints to the model about possible languages present in the audio.
| languageCodes | string[] | Required. BCP-47 language codes. |
LatLngobject
An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges…
| latitude | number | The latitude in degrees. It must be in the range [-90.0, +90.0]. | format: double |
| longitude | number | The longitude in degrees. It must be in the range [-180.0, +180.0]. | format: double |
McpServerobject
A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol.
| streamableHttpTransport | StreamableHttpTransport | A transport that can stream HTTP requests and responses. | |
| name | string | The name of the MCPServer. |
MultiSpeakerVoiceConfigobject
The configuration for the multi-speaker setup.
| speakerVoiceConfigs | SpeakerVoiceConfig[] | Required. All the enabled speaker voices. |
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…
| functionResponse | FunctionResponse | 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… | |
| videoMetadata | VideoMetadata | 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… | |
| thought | boolean | Optional. Indicates if the part is thought from the model. | |
| inlineData | Blob | Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. | |
| functionCall | FunctionCall | A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. | |
| mediaProcessing | enum | Optional. 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 |
| executableCode | ExecutableCode | 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… | |
| speechMetadata | SpeechMetadata | Speech metadata for `text` parts. | |
| text | string | Inline text. | |
| mediaResolution | V1mainMediaResolution | Media resolution for tokenization. | |
| fileData | FileData | URI based data. | |
| codeExecutionResult | CodeExecutionResult | Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. | |
| toolCall | ToolCall | 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… | |
| partMetadata | object | Custom 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… | |
| thoughtSignature | string | Optional. An opaque signature for the thought so it can be reused in subsequent requests. | format: byte |
| toolResponse | ToolResponse | 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… | |
| audioTranscription | AudioTranscription | 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. |
PrebuiltVoiceConfigobject
The configuration for the prebuilt speaker to use.
| voiceName | string | Optional. The name of the preset voice to use. |
ResponseFormatConfigobject
Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.
| text | TextResponseFormat | Configuration for text output format. | |
| audio | AudioResponseFormat | Configuration for audio output format. | |
| image | ImageResponseFormat | Configuration for image output format. |
RetrievalConfigobject
Retrieval config.
| languageCode | string | Optional. The language code of the user. Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). | |
| latLng | LatLng | An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges… |
SafetySettingobject
Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.
| threshold | enum | Required. 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 |
| category | enum | Required. 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 |
Schemaobject
The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).
| maxLength | string | Optional. Maximum length of the Type.STRING | format: int64 |
| pattern | string | Optional. Pattern of the Type.STRING to restrict a string to a regular expression. | |
| anyOf | Schema[] | Optional. The value should be validated against any (one or more) of the subschemas in the list. | |
| type | enum | Required. Data type. | TYPE_UNSPECIFIED | STRING | NUMBER | INTEGER | BOOLEAN | ARRAY · +2 more |
| maxItems | string | Optional. Maximum number of the elements for Type.ARRAY. | format: int64 |
| minItems | string | Optional. Minimum number of the elements for Type.ARRAY. | format: int64 |
| minLength | string | Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING | format: int64 |
| title | string | Optional. The title of the schema. | |
| minimum | number | Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER | format: double |
| items | Schema | The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). | |
| default | any | Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a `default` field don't get unknown-field err… | |
| description | string | Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown. | |
| maxProperties | string | Optional. Maximum number of the properties for Type.OBJECT. | format: int64 |
| example | any | Optional. Example of the object. Will only populated when the object is the root. | |
| minProperties | string | Optional. Minimum number of the properties for Type.OBJECT. | format: int64 |
| propertyOrdering | string[] | Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response. | |
| format | string | Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality. | |
| required | string[] | Optional. Required properties of Type.OBJECT. | |
| maximum | number | Optional. Maximum value of the Type.INTEGER and Type.NUMBER | format: double |
| properties | object | Optional. Properties of Type.OBJECT. | |
| enum | string[] | Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} | |
| nullable | boolean | Optional. Indicates if the value may be null. |
SearchTypesobject
Different types of search that can be enabled on the GoogleSearch tool.
| webSearch | WebSearch | Standard web search for grounding and related configurations. | |
| imageSearch | ImageSearch | Image search for grounding and related configurations. |
SpeakerVoiceConfigobject
The configuration for a single speaker in a multi speaker setup.
| voiceConfig | VoiceConfig | The configuration for the voice to use. | |
| speaker | string | Required. The name of the speaker to use. Should be the same as in the prompt. |
SpeechConfigobject
Config for speech generation and transcription.
| multiSpeakerVoiceConfig | MultiSpeakerVoiceConfig | The configuration for the multi-speaker setup. | |
| languageCode | string | Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code that the user configured the app to use. Used for speech recognition and synthesis. Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`, `fr-FR`, `hi-IN`… | |
| voiceConfig | VoiceConfig | The configuration for the voice to use. |
SpeechMetadataobject
Speech metadata for `text` parts.
| speaker | string | Optional. Optional speaker name for multi-speaker synthesis. | |
| style | string | Optional. Optional style instruction for the speech synthesis. |
StreamableHttpTransportobject
A transport that can stream HTTP requests and responses.
| terminateOnClose | boolean | Whether to close the client session when the transport closes. | |
| timeout | string | HTTP timeout for regular operations. | format: google-duration |
| sseReadTimeout | string | Timeout for SSE read operations. | format: google-duration |
| url | string | The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp" | |
| headers | object | Optional: Fields for authentication headers, timeouts, etc., if needed. |
TextResponseFormatobject
Configuration for text output format.
| mimeType | enum | Optional. The MIME type of the text output. | MIME_TYPE_UNSPECIFIED | APPLICATION_JSON | TEXT_PLAIN |
| schema | any | Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. |
ThinkingConfigobject
Config for thinking features.
| thinkingBudget | integer | The number of thoughts tokens that the model should generate. | format: int32 |
| includeThoughts | boolean | Indicates whether to include thoughts in the response. If true, thoughts are returned only when available. | |
| thinkingLevel | enum | Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the [Thinking levels guide](https://aistudio.google.com/docs/thinking#thinking-levels) for more details… | THINKING_LEVEL_UNSPECIFIED | MINIMAL | LOW | MEDIUM | HIGH | XHIGH |
Toolobject
Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
| codeExecution | CodeExecution | Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool. | |
| urlContext | UrlContext | Tool to support URL context retrieval. | |
| computerUse | ComputerUse | Computer Use tool type. | |
| googleSearchRetrieval | GoogleSearchRetrieval | Tool to retrieve public web data for grounding, powered by Google. | |
| mcpServers | McpServer[] | Optional. MCP Servers to connect to. | |
| googleMaps | GoogleMaps | The GoogleMaps Tool that provides geospatial context for the user's query. | |
| googleSearch | GoogleSearch | GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. | |
| fileSearch | FileSearch | The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API. | |
| functionDeclarations | FunctionDeclaration[] | Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for exe… |
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…
| id | string | Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. | |
| args | object | Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} | |
| toolType | enum | Required. The type of tool that was called. | TOOL_TYPE_UNSPECIFIED | GOOGLE_SEARCH_WEB | GOOGLE_SEARCH_IMAGE | URL_CONTEXT | GOOGLE_MAPS | FILE_SEARCH · +1 more |
| toolName | string | Optional. The name of the tool that was called. |
ToolConfigobject
The Tool configuration containing parameters for specifying `Tool` use in the request.
| functionCallingConfig | FunctionCallingConfig | Configuration for specifying function calling behavior. | |
| retrievalConfig | RetrievalConfig | Retrieval config. | |
| includeServerSideToolInvocations | boolean | Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions. |
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…
| id | string | Optional. The identifier of the tool call this response is for. | |
| response | object | Optional. The tool response. | |
| toolType | enum | Required. 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 |
TranslationConfigobject
Config for translation features.
| echoTargetLanguage | boolean | Optional. If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language. | |
| targetLanguageCode | string | Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). |
UrlContextobject
Tool to support URL context retrieval.
V1mainMediaResolutionobject
Media resolution for tokenization.
| level | enum | The 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…
| startOffset | string | Optional. The start offset of the video. | format: google-duration |
| endOffset | string | Optional. The end offset of the video. | format: google-duration |
| fps | number | Optional. 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 |
VoiceConfigobject
The configuration for the voice to use.
| prebuiltVoiceConfig | PrebuiltVoiceConfig | The configuration for the prebuilt speaker to use. | |
| voice | string | Optional. The speaker identifier for synthesis. Supported formats: * Speaker name for prebuilt voices (for example, `Orus` or `Kore`). * Voice ID for stored voices (for example, `voice_xxx`). * Voice replication key (for example, `voicekey_xxx`). |
WebSearchobject
Standard web search for grounding and related configurations.
WordInfoobject
Information about a single recognized word.
| word | string | Required. Transcript of the word. | |
| endOffset | string | Optional. End offset in time of the word relative to the start of the audio. | format: google-duration |
| startOffset | string | Optional. Start offset in time of the word relative to the start of the audio. | format: google-duration |
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"gemini","endpointId":"v1beta/dynamic/{dynamicId}:streamGenerateContent","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}