{
  "openapi": "3.1.0",
  "info": {
    "title": "Gemini 3.1 Pro API",
    "version": "2026-10-17"
  },
  "servers": [
    {
      "url": "https://api.seedrouter.ai"
    }
  ],
  "paths": {
    "/v1beta/models/gemini-3.1-pro-preview:generateContent": {
      "post": {
        "operationId": "gemini31_generateContent",
        "summary": "Gemini 3.1 Pro generateContent",
        "description": "Official native Gemini parameter reference. Request bodies pass through unchanged, including additional fields and invalid parameter values; the Gemini API validates them. Individual capabilities remain subject to live verification.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-SeedRouter-Group",
            "in": "header",
            "required": false,
            "description": "Optional LLM group. Sign in to https://seedrouter.ai/models/gemini-3-1-pro#playground to check the groups available to your account; Playground uses your login session and requires no API key. Send the exact group name, keeping your existing model ID and API key. Omit this header or use auto to keep the key's default behavior. Restricted keys may have fewer options; use GET /api/seedrouter/llm/groups?model=MODEL_ID to check a particular key. The selected group's pricing applies; requests do not switch to another group. HTTP/SSE only, not WebSocket, image or video calls.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "default": "auto"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateContentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Native response; streaming emits GenerateContentResponse objects as SSE data events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateContentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Authentication required."
          }
        }
      }
    },
    "/v1beta/models/gemini-3.1-pro-preview:streamGenerateContent": {
      "post": {
        "operationId": "gemini31_streamGenerateContent",
        "summary": "Gemini 3.1 Pro streamGenerateContent",
        "description": "Official native Gemini parameter reference. Request bodies pass through unchanged, including additional fields and invalid parameter values; the Gemini API validates them. Individual capabilities remain subject to live verification.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "alt",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sse"
              ]
            }
          },
          {
            "name": "X-SeedRouter-Group",
            "in": "header",
            "required": false,
            "description": "Optional LLM group. Sign in to https://seedrouter.ai/models/gemini-3-1-pro#playground to check the groups available to your account; Playground uses your login session and requires no API key. Send the exact group name, keeping your existing model ID and API key. Omit this header or use auto to keep the key's default behavior. Restricted keys may have fewer options; use GET /api/seedrouter/llm/groups?model=MODEL_ID to check a particular key. The selected group's pricing applies; requests do not switch to another group. HTTP/SSE only, not WebSocket, image or video calls.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "default": "auto"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateContentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Native response; streaming emits GenerateContentResponse objects as SSE data events.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Authentication required."
          }
        }
      }
    },
    "/api/seedrouter/llm/groups": {
      "get": {
        "summary": "List available LLM groups",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Read-only. Returns groups allowed by this API key and account with an enabled channel for the requested model. Availability is checked again at generation time. No model generation is performed.",
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Available groups; auto preserves the API key default.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "model",
                    "data"
                  ],
                  "properties": {
                    "model": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "ratio"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Exact value for X-SeedRouter-Group."
                          },
                          "ratio": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "minimum": 0,
                            "description": "Account-specific group price multiplier. For auto, a current default estimate; null if unavailable."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid LLM model."
          },
          "401": {
            "description": "Invalid API key."
          },
          "403": {
            "description": "API key or account permissions do not allow this request."
          },
          "503": {
            "description": "Group discovery is temporarily unavailable."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "AttributionSourceId": {
        "properties": {
          "groundingPassage": {
            "description": "Identifier for an inline passage.",
            "$ref": "#/components/schemas/GroundingPassageId"
          },
          "semanticRetrieverChunk": {
            "description": "Identifier for a `Chunk` fetched via Semantic Retriever.",
            "$ref": "#/components/schemas/SemanticRetrieverChunk"
          }
        },
        "description": "Identifier for the source contributing to this attribution.",
        "type": "object"
      },
      "AudioTranscription": {
        "type": "object",
        "properties": {
          "speakerLabel": {
            "type": "string",
            "description": "Optional. A label identifying the speaker of this audio segment (e.g. \"spk_1\", \"spk_2\"). Present when diarization is set."
          },
          "words": {
            "items": {
              "$ref": "#/components/schemas/WordInfo"
            },
            "type": "array",
            "description": "Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set."
          },
          "text": {
            "type": "string",
            "description": "Required. The transcription text of this audio segment."
          }
        },
        "description": "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.",
        "required": [
          "text"
        ]
      },
      "AudioTranscriptionConfig": {
        "description": "The audio transcription configuration.",
        "type": "object",
        "properties": {
          "languageCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection."
          },
          "wordTimestamp": {
            "type": "boolean",
            "description": "Optional. Configures word-level timestamp generation."
          },
          "diarization": {
            "type": "boolean",
            "description": "Optional. Configures speaker diarization."
          },
          "languageHints": {
            "$ref": "#/components/schemas/LanguageHints",
            "description": "Optional. Specifies one or more languages in the audio.",
            "deprecated": true
          },
          "mode": {
            "type": "string",
            "enum": [
              "MODE_UNSPECIFIED",
              "VERBATIM",
              "SMART"
            ],
            "description": "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 grammatical cleanup, automatic formatting (paragraphs, bullet points, numbered lists), and minor user edits (inline self-corrections). Timestamps and diarization are incompatible with mode `SMART`."
          },
          "languageAuto": {
            "description": "Optional. The model will detect the language automatically.",
            "deprecated": true,
            "$ref": "#/components/schemas/LanguageAuto"
          },
          "customVocabulary": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms (product names, proper nouns, jargon)."
          },
          "adaptationPhrases": {
            "deprecated": true,
            "items": {
              "type": "string"
            },
            "description": "Optional. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms.",
            "type": "array"
          }
        }
      },
      "Blob": {
        "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.",
        "properties": {
          "mimeType": {
            "type": "string",
            "description": "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: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - Applications: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf For additional context, see [Supported file formats](https://ai.google.dev/gemini-api/docs/file-input-methods#supported-content-types). //"
          },
          "data": {
            "type": "string",
            "format": "byte",
            "description": "Raw bytes for media formats."
          },
          "displayName": {
            "type": "string",
            "description": "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`."
          }
        },
        "type": "object"
      },
      "Candidate": {
        "properties": {
          "groundingAttributions": {
            "readOnly": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroundingAttribution"
            },
            "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls."
          },
          "safetyRatings": {
            "items": {
              "$ref": "#/components/schemas/SafetyRating"
            },
            "type": "array",
            "description": "List of ratings for the safety of a response candidate. There is at most one rating per category."
          },
          "logprobsResult": {
            "$ref": "#/components/schemas/LogprobsResult",
            "readOnly": true,
            "description": "Output only. Log-likelihood scores for the response tokens and top tokens"
          },
          "index": {
            "format": "int32",
            "readOnly": true,
            "description": "Output only. Index of the candidate in the list of response candidates.",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "continuationToken": {
            "description": "An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation.",
            "format": "byte",
            "type": "string"
          },
          "avgLogprobs": {
            "format": "double",
            "readOnly": true,
            "description": "Output only. Average log probability score of the candidate.",
            "type": "number"
          },
          "content": {
            "description": "Output only. Generated content returned from the model.",
            "readOnly": true,
            "$ref": "#/components/schemas/Content"
          },
          "finishMessage": {
            "type": "string",
            "readOnly": true,
            "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set."
          },
          "urlContextMetadata": {
            "description": "Output only. Metadata related to url context retrieval tool.",
            "readOnly": true,
            "$ref": "#/components/schemas/UrlContextMetadata"
          },
          "citationMetadata": {
            "description": "Output only. Citation information for model-generated candidate. This field may be populated with recitation information for any text included in the `content`. These are passages that are \"recited\" from copyrighted material in the foundational LLM's training data.",
            "$ref": "#/components/schemas/CitationMetadata",
            "readOnly": true
          },
          "tokenCount": {
            "type": "integer",
            "readOnly": true,
            "format": "int32",
            "description": "Output only. Token count for this candidate.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "groundingMetadata": {
            "description": "Output only. Grounding metadata for the candidate. This field is populated for `GenerateContent` calls.",
            "readOnly": true,
            "$ref": "#/components/schemas/GroundingMetadata"
          },
          "finishReason": {
            "description": "Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens.",
            "readOnly": true,
            "type": "string",
            "enum": [
              "FINISH_REASON_UNSPECIFIED",
              "STOP",
              "MAX_TOKENS",
              "SAFETY",
              "RECITATION",
              "LANGUAGE",
              "OTHER",
              "BLOCKLIST",
              "PROHIBITED_CONTENT",
              "SPII",
              "MALFORMED_FUNCTION_CALL",
              "IMAGE_SAFETY",
              "IMAGE_PROHIBITED_CONTENT",
              "IMAGE_OTHER",
              "NO_IMAGE",
              "IMAGE_RECITATION",
              "UNEXPECTED_TOOL_CALL",
              "TOO_MANY_TOOL_CALLS",
              "MISSING_THOUGHT_SIGNATURE",
              "MALFORMED_RESPONSE",
              "ESCALATION",
              "PUP_LIMITED_DISABLED",
              "CONTINUATION"
            ]
          }
        },
        "type": "object",
        "description": "A response candidate generated from the model."
      },
      "CitationMetadata": {
        "properties": {
          "citationSources": {
            "items": {
              "$ref": "#/components/schemas/CitationSource"
            },
            "type": "array",
            "description": "Citations to sources for a specific response."
          }
        },
        "description": "A collection of source attributions for a piece of content.",
        "type": "object"
      },
      "CitationSource": {
        "type": "object",
        "description": "A citation to a source for a portion of a specific response.",
        "properties": {
          "endIndex": {
            "type": "integer",
            "format": "int32",
            "description": "Optional. End of the attributed segment, exclusive.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "startIndex": {
            "description": "Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.",
            "type": "integer",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "uri": {
            "type": "string",
            "description": "Optional. URI that is attributed as a source for a portion of the text."
          },
          "license": {
            "description": "Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations.",
            "type": "string"
          }
        }
      },
      "CodeExecution": {
        "type": "object",
        "properties": {},
        "description": "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."
      },
      "CodeExecutionResult": {
        "properties": {
          "output": {
            "type": "string",
            "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "OUTCOME_UNSPECIFIED",
              "OUTCOME_OK",
              "OUTCOME_FAILED",
              "OUTCOME_DEADLINE_EXCEEDED"
            ],
            "description": "Required. Outcome of the code execution."
          }
        },
        "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.",
        "type": "object",
        "required": [
          "outcome"
        ]
      },
      "ComputerUse": {
        "description": "Computer Use tool type.",
        "properties": {
          "environment": {
            "description": "Required. The environment being operated.",
            "type": "string",
            "enum": [
              "ENVIRONMENT_UNSPECIFIED",
              "ENVIRONMENT_BROWSER",
              "ENVIRONMENT_MOBILE",
              "ENVIRONMENT_DESKTOP"
            ]
          },
          "enablePromptInjectionDetection": {
            "description": "Optional. Whether enable the prompt injection detection check on computer-use request.",
            "type": "boolean"
          },
          "disabledSafetyPolicies": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "SAFETY_POLICY_UNSPECIFIED",
                "FINANCIAL_TRANSACTIONS",
                "SENSITIVE_DATA_MODIFICATION",
                "COMMUNICATION_TOOL",
                "ACCOUNT_CREATION",
                "DATA_MODIFICATION",
                "USER_CONSENT_MANAGEMENT",
                "LEGAL_TERMS_AND_AGREEMENTS"
              ]
            },
            "description": "Optional. Disabled safety policies for computer use."
          },
          "excludedPredefinedFunctions": {
            "description": "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 definitions / instructions of predefined functions.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "environment"
        ]
      },
      "Content": {
        "properties": {
          "role": {
            "description": "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.",
            "type": "string"
          },
          "parts": {
            "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Part"
            },
            "minItems": 1
          }
        },
        "type": "object",
        "description": "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.",
        "required": [
          "parts"
        ]
      },
      "ExecutableCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Required. The code to be executed."
          },
          "language": {
            "type": "string",
            "enum": [
              "LANGUAGE_UNSPECIFIED",
              "PYTHON"
            ],
            "description": "Required. Programming language of the `code`."
          }
        },
        "description": "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 generated.",
        "required": [
          "code",
          "language"
        ]
      },
      "FileData": {
        "description": "URI based data.",
        "properties": {
          "fileUri": {
            "description": "Required. URI.",
            "type": "string"
          },
          "mimeType": {
            "type": "string",
            "description": "Optional. The IANA standard MIME type of the source data."
          },
          "displayName": {
            "type": "string",
            "description": "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`."
          }
        },
        "type": "object",
        "required": [
          "fileUri"
        ]
      },
      "FileSearch": {
        "description": "The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.",
        "properties": {
          "topK": {
            "type": "integer",
            "description": "Optional. The number of semantic retrieval chunks to retrieve.",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "metadataFilter": {
            "type": "string",
            "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks."
          },
          "fileSearchStoreNames": {
            "items": {
              "type": "string"
            },
            "description": "Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`",
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "fileSearchStoreNames"
        ]
      },
      "FunctionCall": {
        "type": "object",
        "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.",
        "properties": {
          "name": {
            "description": "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.",
            "type": "string"
          },
          "args": {
            "additionalProperties": {
              "description": "Properties of the object."
            },
            "type": "object",
            "description": "Optional. The function parameters and values in JSON object format."
          }
        },
        "required": [
          "name"
        ]
      },
      "FunctionCallingConfig": {
        "properties": {
          "allowedFunctionNames": {
            "description": "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 from only allowed function names.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "type": "string",
            "enum": [
              "MODE_UNSPECIFIED",
              "AUTO",
              "ANY",
              "NONE",
              "VALIDATED"
            ],
            "description": "Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO."
          }
        },
        "description": "Configuration for specifying function calling behavior.",
        "type": "object"
      },
      "FunctionDeclaration": {
        "properties": {
          "response": {
            "$ref": "#/components/schemas/Schema",
            "description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function."
          },
          "responseJsonSchema": {
            "description": "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": {
            "description": "Required. A brief description of the function.",
            "type": "string"
          },
          "parametersJsonSchema": {
            "description": "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\": { \"type\": \"integer\" } }, \"additionalProperties\": false, \"required\": [\"name\", \"age\"], \"propertyOrdering\": [\"name\", \"age\"] } ``` This field is mutually exclusive with `parameters`."
          },
          "parameters": {
            "$ref": "#/components/schemas/Schema",
            "description": "Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter."
          },
          "name": {
            "type": "string",
            "description": "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.",
            "maxLength": 128,
            "pattern": "^[a-zA-Z0-9_:.-]+$"
          }
        },
        "type": "object",
        "description": "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 of code that can be used as a `Tool` by the model and executed by the client.",
        "required": [
          "name"
        ]
      },
      "FunctionResponse": {
        "properties": {
          "response": {
            "type": "object",
            "description": "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 have an \"error\" key to return error details to the model. Multimedia can be included by using a subobject containing a single \"$ref\" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://ai.google.dev/gemini-api/docs/function-calling#multimodal.",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          },
          "parts": {
            "description": "Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FunctionResponsePart"
            }
          },
          "name": {
            "type": "string",
            "description": "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."
          },
          "scheduling": {
            "type": "string",
            "enum": [
              "SCHEDULING_UNSPECIFIED",
              "SILENT",
              "WHEN_IDLE",
              "INTERRUPT"
            ],
            "description": "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."
          },
          "willContinue": {
            "description": "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. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`.",
            "type": "boolean"
          }
        },
        "type": "object",
        "description": "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` made based on model prediction.",
        "required": [
          "response",
          "name"
        ]
      },
      "FunctionResponseBlob": {
        "description": "Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.",
        "type": "object",
        "properties": {
          "data": {
            "format": "byte",
            "type": "string",
            "description": "Raw bytes for media formats."
          },
          "mimeType": {
            "description": "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://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).",
            "type": "string"
          }
        }
      },
      "FunctionResponsePart": {
        "type": "object",
        "properties": {
          "inlineData": {
            "description": "Inline media bytes.",
            "$ref": "#/components/schemas/FunctionResponseBlob"
          }
        },
        "description": "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`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes."
      },
      "GenerateContentRequest": {
        "properties": {
          "model": {
            "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
            "type": "string",
            "enum": [
              "models/gemini-3.1-pro-preview",
              "gemini-3.1-pro-preview"
            ],
            "x-modelStatus": "supported"
          },
          "continuationToken": {
            "description": "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 prompt and conversation history from the initial request when continuation token is provided in a request.",
            "type": "string",
            "format": "byte",
            "x-modelStatus": "unknown"
          },
          "tools": {
            "type": "array",
            "description": "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`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://ai.google.dev/gemini-api/docs/function-calling) and the [Code execution](https://ai.google.dev/gemini-api/docs/code-execution) guides to learn more.",
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "x-modelStatus": "supported"
          },
          "store": {
            "description": "Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config.",
            "type": "boolean",
            "x-modelStatus": "unknown"
          },
          "systemInstruction": {
            "description": "Optional. Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions). Currently, text only.",
            "$ref": "#/components/schemas/Content",
            "x-modelStatus": "supported"
          },
          "toolConfig": {
            "description": "Optional. Tool configuration for any `Tool` specified in the request. Refer to the [Function calling guide](https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode) for a usage example.",
            "$ref": "#/components/schemas/ToolConfig",
            "x-modelStatus": "supported"
          },
          "generationConfig": {
            "$ref": "#/components/schemas/GenerationConfig",
            "description": "Optional. Configuration options for model generation and outputs.",
            "x-modelStatus": "supported"
          },
          "cachedContent": {
            "description": "Optional. The name of the content [cached](https://ai.google.dev/gemini-api/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}`",
            "type": "string",
            "x-modelStatus": "supported"
          },
          "safetySettings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SafetySetting"
            },
            "description": "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. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications.",
            "x-modelStatus": "supported"
          },
          "contents": {
            "type": "array",
            "description": "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://ai.google.dev/gemini-api/docs/text-generation#chat), this is a repeated field that contains the conversation history and the latest request.",
            "items": {
              "$ref": "#/components/schemas/Content"
            },
            "minItems": 1,
            "x-modelStatus": "supported"
          },
          "labels": {
            "description": "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 only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{\"safety_identifier\": \"user_session_123\"}`)",
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "x-modelStatus": "unknown"
          },
          "serviceTier": {
            "type": "string",
            "enum": [
              "unspecified",
              "standard",
              "flex",
              "priority"
            ],
            "description": "Optional. The service tier of the request.",
            "x-modelStatus": "supported"
          }
        },
        "description": "Request to generate a completion from the model.",
        "type": "object",
        "required": [
          "contents"
        ]
      },
      "GenerateContentResponse": {
        "description": "Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`.",
        "properties": {
          "promptFeedback": {
            "description": "Returns the prompt's feedback related to the content filters.",
            "$ref": "#/components/schemas/PromptFeedback"
          },
          "modelVersion": {
            "readOnly": true,
            "description": "Output only. The model version used to generate the response.",
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "description": "Candidate responses from the model.",
            "items": {
              "$ref": "#/components/schemas/Candidate"
            }
          },
          "responseId": {
            "readOnly": true,
            "description": "Output only. response_id is used to identify each response.",
            "type": "string"
          },
          "usageMetadata": {
            "description": "Output only. Metadata on the generation requests' token usage.",
            "$ref": "#/components/schemas/UsageMetadata",
            "readOnly": true
          },
          "modelStatus": {
            "description": "Output only. The current model status of this model.",
            "readOnly": true,
            "$ref": "#/components/schemas/ModelStatus"
          }
        },
        "type": "object"
      },
      "GenerationConfig": {
        "type": "object",
        "properties": {
          "topP": {
            "description": "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 sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models.",
            "type": "number",
            "format": "float",
            "x-modelStatus": "supported",
            "minimum": 0,
            "maximum": 1
          },
          "temperature": {
            "type": "number",
            "format": "float",
            "description": "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 silently ignored on Gemini 3.6 Flash and newer models.",
            "minimum": 0,
            "maximum": 2,
            "default": 1,
            "x-modelStatus": "supported"
          },
          "responseLogprobs": {
            "description": "Optional. If true, export the logprobs results in response.",
            "type": "boolean",
            "x-modelStatus": "unknown"
          },
          "presencePenalty": {
            "format": "float",
            "description": "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 that increases with each use. A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary. A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary.",
            "type": "number",
            "x-modelStatus": "unknown"
          },
          "thinkingConfig": {
            "$ref": "#/components/schemas/ThinkingConfig",
            "description": "Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.",
            "x-modelStatus": "supported"
          },
          "maxOutputTokens": {
            "type": "integer",
            "format": "int32",
            "description": "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.",
            "minimum": 1,
            "maximum": 65536,
            "default": 65536,
            "x-modelStatus": "supported"
          },
          "logprobs": {
            "type": "integer",
            "description": "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",
            "minimum": 0,
            "maximum": 20,
            "x-modelStatus": "unknown"
          },
          "responseMimeType": {
            "type": "string",
            "description": "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 [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats) for a list of all supported text MIME types.",
            "default": "text/plain",
            "x-modelStatus": "supported"
          },
          "frequencyPenalty": {
            "type": "number",
            "description": "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 of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses. Caution: A _negative_ penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the max_output_tokens limit.",
            "format": "float",
            "x-modelStatus": "unknown"
          },
          "responseFormat": {
            "description": "Optional. Configuration for the response output format. Allows specifying output configuration per modality (text, audio, image) in a flat structure.",
            "$ref": "#/components/schemas/ResponseFormatConfig",
            "x-modelStatus": "supported"
          },
          "responseModalities": {
            "items": {
              "type": "string",
              "enum": [
                "TEXT"
              ]
            },
            "description": "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 supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned. An empty list is equivalent to requesting only text.",
            "type": "array",
            "x-modelStatus": "supported"
          },
          "seed": {
            "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed.",
            "type": "integer",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647,
            "x-modelStatus": "unknown"
          },
          "candidateCount": {
            "description": "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)",
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 1,
            "default": 1,
            "x-modelStatus": "supported"
          },
          "topK": {
            "description": "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 don't allow top_k setting. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models.",
            "type": "integer",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647,
            "x-modelStatus": "unknown"
          },
          "mediaResolution": {
            "description": "Optional. If specified, the media resolution specified will be used.",
            "type": "string",
            "enum": [
              "MEDIA_RESOLUTION_UNSPECIFIED",
              "MEDIA_RESOLUTION_LOW",
              "MEDIA_RESOLUTION_MEDIUM",
              "MEDIA_RESOLUTION_HIGH"
            ],
            "x-modelStatus": "supported"
          },
          "enableEnhancedCivicAnswers": {
            "description": "Optional. Enables enhanced civic answers. It may not be available for all models.",
            "type": "boolean",
            "x-modelStatus": "unknown"
          },
          "audioTranscriptionConfig": {
            "$ref": "#/components/schemas/AudioTranscriptionConfig",
            "description": "Optional. Config for audio transcription (speech recognition).",
            "x-modelStatus": "unknown"
          },
          "enableAffectiveDialog": {
            "type": "boolean",
            "description": "Optional. If enabled, the model will detect emotions and adapt its responses accordingly.",
            "x-modelStatus": "unknown"
          },
          "responseSchema": {
            "description": "Optional. Output schema of the generated candidate text. Schemas must be a subset of the [OpenAPI schema](https://spec.openapis.org/oas/v3.0.3#schema) and can be objects, primitives or arrays. If set, a compatible `response_mime_type` must also be set. Compatible MIME types: `application/json`: Schema for JSON response. Refer to the [JSON text generation guide](https://ai.google.dev/gemini-api/docs/json-mode) for more details. Deprecated. Use `response_format` instead.",
            "deprecated": true,
            "$ref": "#/components/schemas/Schema",
            "x-modelStatus": "supported"
          },
          "stopSequences": {
            "description": "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.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 5,
            "x-modelStatus": "supported"
          },
          "responseJsonSchema": {
            "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field.",
            "x-modelStatus": "supported"
          },
          "translationConfig": {
            "description": "Optional. Config for translation.",
            "$ref": "#/components/schemas/TranslationConfig",
            "x-modelStatus": "unknown"
          }
        },
        "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model."
      },
      "GoogleAiGenerativelanguageV1betaGroundingSupport": {
        "properties": {
          "segment": {
            "description": "Segment of the content this support belongs to.",
            "$ref": "#/components/schemas/GoogleAiGenerativelanguageV1betaSegment"
          },
          "groundingChunkIndices": {
            "description": "Optional. A list of indices (into 'grounding_chunk' in `response.candidate.grounding_metadata`) specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. If the response is streaming, the grounding_chunk_indices refer to the indices across all responses. It is the client's responsibility to accumulate the grounding chunks from all responses (while maintaining the same order).",
            "type": "array",
            "items": {
              "format": "int32",
              "type": "integer",
              "minimum": -2147483648,
              "maximum": 2147483647
            }
          },
          "confidenceScores": {
            "type": "array",
            "description": "Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.",
            "items": {
              "format": "float",
              "type": "number"
            }
          },
          "renderedParts": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": -2147483648,
              "maximum": 2147483647
            },
            "description": "Output only. Indices into the `parts` field of the candidate's content. These indices specify which rendered parts are associated with this support source.",
            "readOnly": true
          }
        },
        "description": "Grounding support.",
        "type": "object"
      },
      "GoogleAiGenerativelanguageV1betaSegment": {
        "description": "Segment of the content.",
        "type": "object",
        "properties": {
          "endIndex": {
            "description": "End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.",
            "type": "integer",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "startIndex": {
            "format": "int32",
            "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "text": {
            "description": "The text corresponding to the segment from the response.",
            "type": "string"
          },
          "partIndex": {
            "format": "int32",
            "type": "integer",
            "description": "The index of a Part object within its parent Content object.",
            "minimum": -2147483648,
            "maximum": 2147483647
          }
        }
      },
      "GoogleMaps": {
        "properties": {
          "enableWidget": {
            "description": "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.",
            "type": "boolean"
          }
        },
        "type": "object",
        "description": "The GoogleMaps Tool that provides geospatial context for the user's query."
      },
      "GoogleSearch": {
        "properties": {
          "searchTypes": {
            "$ref": "#/components/schemas/SearchTypes",
            "description": "Optional. The set of search types to enable. If not set, web search is enabled by default."
          },
          "timeRangeFilter": {
            "$ref": "#/components/schemas/Interval",
            "description": "Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa)."
          }
        },
        "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.",
        "type": "object"
      },
      "GroundingAttribution": {
        "type": "object",
        "description": "Attribution for a source that contributed to an answer.",
        "properties": {
          "sourceId": {
            "readOnly": true,
            "$ref": "#/components/schemas/AttributionSourceId",
            "description": "Output only. Identifier for the source contributing to this attribution."
          },
          "content": {
            "$ref": "#/components/schemas/Content",
            "description": "Grounding source content that makes up this attribution."
          }
        }
      },
      "GroundingChunk": {
        "type": "object",
        "description": "A `GroundingChunk` represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps.",
        "properties": {
          "maps": {
            "description": "Optional. Grounding chunk from Google Maps.",
            "$ref": "#/components/schemas/Maps"
          },
          "web": {
            "description": "Grounding chunk from the web.",
            "$ref": "#/components/schemas/Web"
          },
          "image": {
            "description": "Optional. Grounding chunk from image search.",
            "$ref": "#/components/schemas/Image"
          },
          "retrievedContext": {
            "description": "Optional. Grounding chunk from context retrieved by the file search tool.",
            "$ref": "#/components/schemas/RetrievedContext"
          }
        }
      },
      "GroundingChunkCustomMetadata": {
        "description": "User provided metadata about the GroundingFact.",
        "properties": {
          "stringListValue": {
            "description": "Optional. A list of string values for the metadata.",
            "$ref": "#/components/schemas/GroundingChunkStringList"
          },
          "numericValue": {
            "type": "number",
            "format": "float",
            "description": "Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used."
          },
          "key": {
            "type": "string",
            "description": "The key of the metadata."
          },
          "stringValue": {
            "description": "Optional. The string value of the metadata.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GroundingChunkStringList": {
        "type": "object",
        "description": "A list of string values.",
        "properties": {
          "values": {
            "items": {
              "type": "string"
            },
            "description": "The string values of the list.",
            "type": "array"
          }
        }
      },
      "GroundingMetadata": {
        "description": "Metadata returned to client when grounding is enabled.",
        "type": "object",
        "properties": {
          "groundingSupports": {
            "type": "array",
            "description": "List of grounding support.",
            "items": {
              "$ref": "#/components/schemas/GoogleAiGenerativelanguageV1betaGroundingSupport"
            }
          },
          "retrievalMetadata": {
            "$ref": "#/components/schemas/RetrievalMetadata",
            "description": "Metadata related to retrieval in the grounding flow."
          },
          "imageSearchQueries": {
            "description": "Image search queries used for grounding.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "groundingChunks": {
            "description": "List of supporting references retrieved from specified grounding source. When streaming, this only contains the grounding chunks that have not been included in the grounding metadata of previous responses.",
            "items": {
              "$ref": "#/components/schemas/GroundingChunk"
            },
            "type": "array"
          },
          "webSearchQueries": {
            "type": "array",
            "description": "Web search queries for the following-up web search.",
            "items": {
              "type": "string"
            }
          },
          "googleMapsWidgetContextToken": {
            "type": "string",
            "description": "Optional. Resource name of the Google Maps widget context token that can be used with the PlacesContextElement widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled."
          },
          "searchEntryPoint": {
            "description": "Optional. Google search entry for the following-up web searches.",
            "$ref": "#/components/schemas/SearchEntryPoint"
          }
        }
      },
      "GroundingPassageId": {
        "properties": {
          "passageId": {
            "readOnly": true,
            "type": "string",
            "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`."
          },
          "partIndex": {
            "readOnly": true,
            "type": "integer",
            "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`.",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          }
        },
        "type": "object",
        "description": "Identifier for a part within a `GroundingPassage`."
      },
      "Image": {
        "properties": {
          "domain": {
            "type": "string",
            "description": "The root domain of the web page that the image is from, e.g. \"example.com\"."
          },
          "imageUri": {
            "type": "string",
            "description": "The image asset URL."
          },
          "title": {
            "type": "string",
            "description": "The title of the web page that the image is from."
          },
          "sourceUri": {
            "description": "The web page URI for attribution.",
            "type": "string"
          }
        },
        "description": "Chunk from image search.",
        "type": "object"
      },
      "ImageSearch": {
        "description": "Image search for grounding and related configurations.",
        "type": "object",
        "properties": {}
      },
      "Interval": {
        "type": "object",
        "description": "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 unspecified, the interval matches any time.",
        "properties": {
          "endTime": {
            "format": "google-datetime",
            "type": "string",
            "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end."
          },
          "startTime": {
            "format": "google-datetime",
            "type": "string",
            "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start."
          }
        }
      },
      "LanguageAuto": {
        "type": "object",
        "deprecated": true,
        "description": "Indicates the language of the audio should be automatically detected.",
        "properties": {}
      },
      "LanguageHints": {
        "deprecated": true,
        "description": "Provides hints to the model about possible languages present in the audio.",
        "type": "object",
        "properties": {
          "languageCodes": {
            "description": "Required. BCP-47 language codes.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "deprecated": true
          }
        },
        "required": [
          "languageCodes"
        ]
      },
      "LatLng": {
        "description": "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.",
        "type": "object",
        "properties": {
          "latitude": {
            "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
            "format": "double",
            "type": "number"
          },
          "longitude": {
            "format": "double",
            "type": "number",
            "description": "The longitude in degrees. It must be in the range [-180.0, +180.0]."
          }
        }
      },
      "LogprobsResult": {
        "description": "Logprobs Result",
        "properties": {
          "topCandidates": {
            "type": "array",
            "description": "Length = total number of decoding steps.",
            "items": {
              "$ref": "#/components/schemas/TopCandidates"
            }
          },
          "logProbabilitySum": {
            "format": "float",
            "description": "Sum of log probabilities for all tokens.",
            "type": "number"
          },
          "chosenCandidates": {
            "items": {
              "$ref": "#/components/schemas/LogprobsResultCandidate"
            },
            "type": "array",
            "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates."
          }
        },
        "type": "object"
      },
      "LogprobsResultCandidate": {
        "type": "object",
        "properties": {
          "tokenId": {
            "format": "int32",
            "type": "integer",
            "description": "The candidate’s token id value.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "logProbability": {
            "description": "The candidate's log probability.",
            "format": "float",
            "type": "number"
          },
          "token": {
            "type": "string",
            "description": "The candidate’s token string value."
          }
        },
        "description": "Candidate for the logprobs token and score."
      },
      "Maps": {
        "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.",
        "type": "object",
        "properties": {
          "placeId": {
            "type": "string",
            "description": "The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place."
          },
          "uri": {
            "type": "string",
            "description": "URI reference of the place."
          },
          "text": {
            "description": "Text description of the place answer.",
            "type": "string"
          },
          "placeAnswerSources": {
            "$ref": "#/components/schemas/PlaceAnswerSources",
            "description": "Sources that provide answers about the features of a given place in Google Maps."
          },
          "title": {
            "type": "string",
            "description": "Title of the place."
          }
        }
      },
      "McpServer": {
        "description": "A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 7",
        "type": "object",
        "properties": {
          "streamableHttpTransport": {
            "description": "A transport that can stream HTTP requests and responses.",
            "$ref": "#/components/schemas/StreamableHttpTransport"
          },
          "name": {
            "type": "string",
            "description": "The name of the MCPServer."
          }
        }
      },
      "ModalityTokenCount": {
        "type": "object",
        "properties": {
          "tokenCount": {
            "description": "Number of tokens.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "modality": {
            "description": "The modality associated with this token count.",
            "type": "string",
            "enum": [
              "MODALITY_UNSPECIFIED",
              "TEXT",
              "IMAGE",
              "VIDEO",
              "AUDIO",
              "DOCUMENT"
            ]
          }
        },
        "description": "Represents token counting info for a single modality."
      },
      "ModelStatus": {
        "properties": {
          "modelStage": {
            "type": "string",
            "enum": [
              "MODEL_STAGE_UNSPECIFIED",
              "UNSTABLE_EXPERIMENTAL",
              "EXPERIMENTAL",
              "PREVIEW",
              "STABLE",
              "LEGACY",
              "DEPRECATED",
              "RETIRED"
            ],
            "description": "The stage of the underlying model."
          },
          "retirementTime": {
            "format": "google-datetime",
            "description": "The time at which the model will be retired.",
            "type": "string"
          },
          "message": {
            "description": "A message explaining the model status.",
            "type": "string"
          }
        },
        "type": "object",
        "description": "The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable."
      },
      "Part": {
        "type": "object",
        "description": "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 the type and subtype of the media if the `inline_data` field is filled with raw bytes.",
        "properties": {
          "partMetadata": {
            "additionalProperties": {
              "description": "Properties of the object."
            },
            "description": "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 streams.",
            "type": "object"
          },
          "videoMetadata": {
            "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.",
            "$ref": "#/components/schemas/VideoMetadata"
          },
          "toolCall": {
            "description": "Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API.",
            "$ref": "#/components/schemas/ToolCall"
          },
          "executableCode": {
            "description": "Code generated by the model that is meant to be executed.",
            "$ref": "#/components/schemas/ExecutableCode"
          },
          "toolResponse": {
            "$ref": "#/components/schemas/ToolResponse",
            "description": "The output from a server-side `ToolCall` execution. This field is populated by the client with the results of executing the corresponding `ToolCall`."
          },
          "audioTranscription": {
            "$ref": "#/components/schemas/AudioTranscription",
            "description": "Optional. Audio (input or output) transcription. This is only set when this Part contains audio data."
          },
          "inlineData": {
            "description": "Inline media bytes.",
            "$ref": "#/components/schemas/Blob"
          },
          "functionCall": {
            "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.",
            "$ref": "#/components/schemas/FunctionCall"
          },
          "speechMetadata": {
            "$ref": "#/components/schemas/SpeechMetadata",
            "description": "Optional. Metadata applied to text parts to customize how they should be spoken or synthesized, such as specifying speaker identity or speaking style."
          },
          "functionResponse": {
            "description": "The result output of 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.",
            "$ref": "#/components/schemas/FunctionResponse"
          },
          "text": {
            "description": "Inline text.",
            "type": "string"
          },
          "thought": {
            "description": "Optional. Indicates if the part is thought from the model.",
            "type": "boolean"
          },
          "fileData": {
            "$ref": "#/components/schemas/FileData",
            "description": "URI based data."
          },
          "codeExecutionResult": {
            "description": "Result of executing the `ExecutableCode`.",
            "$ref": "#/components/schemas/CodeExecutionResult"
          },
          "mediaResolution": {
            "$ref": "#/components/schemas/V1mainMediaResolution",
            "description": "Optional. Media resolution for the input media."
          },
          "thoughtSignature": {
            "type": "string",
            "format": "byte",
            "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests."
          },
          "mediaProcessing": {
            "type": "string",
            "enum": [
              "MEDIA_PROCESSING_UNSPECIFIED",
              "STATIC"
            ],
            "description": "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."
          }
        }
      },
      "PlaceAnswerSources": {
        "type": "object",
        "properties": {
          "reviewSnippets": {
            "type": "array",
            "description": "Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.",
            "items": {
              "$ref": "#/components/schemas/ReviewSnippet"
            }
          }
        },
        "description": "Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: \"does Bar Foo have Wifi\" or \"is Foo Bar wheelchair accessible?\"). Currently we only support review snippets as sources."
      },
      "PromptFeedback": {
        "properties": {
          "safetyRatings": {
            "description": "Ratings for safety of the prompt. There is at most one rating per category.",
            "items": {
              "$ref": "#/components/schemas/SafetyRating"
            },
            "type": "array"
          },
          "blockReason": {
            "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.",
            "type": "string",
            "enum": [
              "BLOCK_REASON_UNSPECIFIED",
              "SAFETY",
              "OTHER",
              "BLOCKLIST",
              "PROHIBITED_CONTENT",
              "IMAGE_SAFETY"
            ]
          }
        },
        "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`.",
        "type": "object"
      },
      "ResponseFormatConfig": {
        "type": "object",
        "description": "Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.",
        "properties": {
          "text": {
            "$ref": "#/components/schemas/TextResponseFormat",
            "description": "Optional. Text output format configuration."
          }
        }
      },
      "RetrievalConfig": {
        "type": "object",
        "properties": {
          "languageCode": {
            "description": "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).",
            "type": "string"
          },
          "latLng": {
            "$ref": "#/components/schemas/LatLng",
            "description": "Optional. The location of the user."
          }
        },
        "description": "Retrieval config."
      },
      "RetrievalMetadata": {
        "description": "Metadata related to retrieval in the grounding flow.",
        "type": "object",
        "properties": {
          "googleSearchDynamicRetrievalScore": {
            "type": "number",
            "description": "Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search.",
            "format": "float"
          }
        }
      },
      "RetrievedContext": {
        "type": "object",
        "description": "Chunk from context retrieved by the file search tool.",
        "properties": {
          "pageNumber": {
            "description": "Optional. Page number of the retrieved context, if applicable.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "fileSearchStore": {
            "type": "string",
            "description": "Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`"
          },
          "customMetadata": {
            "items": {
              "$ref": "#/components/schemas/GroundingChunkCustomMetadata"
            },
            "type": "array",
            "description": "Optional. User-provided metadata about the retrieved context."
          },
          "text": {
            "type": "string",
            "description": "Optional. Text of the chunk."
          },
          "title": {
            "type": "string",
            "description": "Optional. Title of the document."
          },
          "mediaId": {
            "description": "Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}",
            "type": "string"
          },
          "uri": {
            "description": "Optional. URI reference of the semantic retrieval document.",
            "type": "string"
          }
        }
      },
      "ReviewSnippet": {
        "properties": {
          "reviewId": {
            "type": "string",
            "description": "The ID of the review snippet."
          },
          "title": {
            "description": "Title of the review.",
            "type": "string"
          },
          "googleMapsUri": {
            "description": "A link that corresponds to the user review on Google Maps.",
            "type": "string"
          }
        },
        "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.",
        "type": "object"
      },
      "SafetyRating": {
        "description": "Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.",
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "HARM_CATEGORY_UNSPECIFIED",
              "HARM_CATEGORY_DEROGATORY",
              "HARM_CATEGORY_TOXICITY",
              "HARM_CATEGORY_VIOLENCE",
              "HARM_CATEGORY_SEXUAL",
              "HARM_CATEGORY_MEDICAL",
              "HARM_CATEGORY_DANGEROUS",
              "HARM_CATEGORY_HARASSMENT",
              "HARM_CATEGORY_HATE_SPEECH",
              "HARM_CATEGORY_SEXUALLY_EXPLICIT",
              "HARM_CATEGORY_DANGEROUS_CONTENT",
              "HARM_CATEGORY_CIVIC_INTEGRITY",
              "HARM_CATEGORY_JAILBREAK"
            ],
            "description": "Required. The category for this rating."
          },
          "blocked": {
            "description": "Was this content blocked because of this rating?",
            "type": "boolean"
          },
          "probability": {
            "description": "Required. The probability of harm for this content.",
            "type": "string",
            "enum": [
              "HARM_PROBABILITY_UNSPECIFIED",
              "NEGLIGIBLE",
              "LOW",
              "MEDIUM",
              "HIGH"
            ]
          }
        },
        "required": [
          "category",
          "probability"
        ]
      },
      "SafetySetting": {
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "HARM_CATEGORY_HARASSMENT",
              "HARM_CATEGORY_HATE_SPEECH",
              "HARM_CATEGORY_SEXUALLY_EXPLICIT",
              "HARM_CATEGORY_DANGEROUS_CONTENT",
              "HARM_CATEGORY_CIVIC_INTEGRITY",
              "HARM_CATEGORY_JAILBREAK"
            ],
            "description": "Required. The category for this setting."
          },
          "threshold": {
            "description": "Required. Controls the probability threshold at which harm is blocked.",
            "type": "string",
            "enum": [
              "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
              "BLOCK_LOW_AND_ABOVE",
              "BLOCK_MEDIUM_AND_ABOVE",
              "BLOCK_ONLY_HIGH",
              "BLOCK_NONE",
              "OFF"
            ]
          }
        },
        "type": "object",
        "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.",
        "required": [
          "category",
          "threshold"
        ]
      },
      "Schema": {
        "properties": {
          "description": {
            "type": "string",
            "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown."
          },
          "required": {
            "description": "Optional. Required properties of Type.OBJECT.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "pattern": {
            "type": "string",
            "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression."
          },
          "maxLength": {
            "description": "Optional. Maximum length of the Type.STRING",
            "format": "int64",
            "type": "string"
          },
          "enum": {
            "description": "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\"]}",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "anyOf": {
            "type": "array",
            "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.",
            "items": {
              "$ref": "#/components/schemas/Schema"
            }
          },
          "nullable": {
            "type": "boolean",
            "description": "Optional. Indicates if the value may be null."
          },
          "format": {
            "type": "string",
            "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality."
          },
          "items": {
            "description": "Optional. Schema of the elements of Type.ARRAY.",
            "$ref": "#/components/schemas/Schema"
          },
          "example": {
            "description": "Optional. Example of the object. Will only populated when the object is the root."
          },
          "minItems": {
            "type": "string",
            "format": "int64",
            "description": "Optional. Minimum number of the elements for Type.ARRAY."
          },
          "minLength": {
            "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING",
            "format": "int64",
            "type": "string"
          },
          "minimum": {
            "format": "double",
            "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER",
            "type": "number"
          },
          "title": {
            "description": "Optional. The title of the schema.",
            "type": "string"
          },
          "maxItems": {
            "type": "string",
            "format": "int64",
            "description": "Optional. Maximum number of the elements for Type.ARRAY."
          },
          "properties": {
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema"
            },
            "type": "object",
            "description": "Optional. Properties of Type.OBJECT."
          },
          "type": {
            "description": "Required. Data type.",
            "type": "string",
            "enum": [
              "TYPE_UNSPECIFIED",
              "STRING",
              "NUMBER",
              "INTEGER",
              "BOOLEAN",
              "ARRAY",
              "OBJECT",
              "NULL"
            ]
          },
          "default": {
            "description": "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 errors."
          },
          "propertyOrdering": {
            "items": {
              "type": "string"
            },
            "description": "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.",
            "type": "array"
          },
          "maximum": {
            "format": "double",
            "type": "number",
            "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER"
          },
          "minProperties": {
            "description": "Optional. Minimum number of the properties for Type.OBJECT.",
            "type": "string",
            "format": "int64"
          },
          "maxProperties": {
            "type": "string",
            "format": "int64",
            "description": "Optional. Maximum number of the properties for Type.OBJECT."
          }
        },
        "type": "object",
        "description": "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).",
        "required": [
          "type"
        ]
      },
      "SearchEntryPoint": {
        "description": "Google search entry point.",
        "type": "object",
        "properties": {
          "renderedContent": {
            "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.",
            "type": "string"
          },
          "sdkBlob": {
            "description": "Optional. Base64 encoded JSON representing array of tuple.",
            "format": "byte",
            "type": "string"
          }
        }
      },
      "SearchTypes": {
        "type": "object",
        "properties": {
          "webSearch": {
            "$ref": "#/components/schemas/WebSearch",
            "description": "Optional. Enables web search. Only text results are returned."
          },
          "imageSearch": {
            "$ref": "#/components/schemas/ImageSearch",
            "description": "Optional. Enables image search. Image bytes are returned."
          }
        },
        "description": "Different types of search that can be enabled on the GoogleSearch tool."
      },
      "SemanticRetrieverChunk": {
        "description": "Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.",
        "properties": {
          "chunk": {
            "description": "Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz`",
            "readOnly": true,
            "type": "string"
          },
          "source": {
            "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SpeechMetadata": {
        "description": "Speech metadata for `text` parts.",
        "type": "object",
        "properties": {
          "style": {
            "description": "Optional. Optional style instruction for the speech synthesis.",
            "type": "string"
          },
          "speaker": {
            "description": "Optional. Optional speaker name for multi-speaker synthesis.",
            "type": "string"
          }
        }
      },
      "StreamableHttpTransport": {
        "description": "A transport that can stream HTTP requests and responses. Next ID: 6",
        "type": "object",
        "properties": {
          "timeout": {
            "format": "google-duration",
            "description": "HTTP timeout for regular operations.",
            "type": "string"
          },
          "sseReadTimeout": {
            "type": "string",
            "format": "google-duration",
            "description": "Timeout for SSE read operations."
          },
          "headers": {
            "description": "Optional: Fields for authentication headers, timeouts, etc., if needed.",
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "url": {
            "description": "The full URL for the MCPServer endpoint. Example: \"https://api.example.com/mcp\"",
            "type": "string"
          },
          "terminateOnClose": {
            "type": "boolean",
            "description": "Whether to close the client session when the transport closes."
          }
        }
      },
      "TextResponseFormat": {
        "properties": {
          "schema": {
            "description": "Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON."
          },
          "mimeType": {
            "description": "Optional. The MIME type of the text output.",
            "type": "string",
            "enum": [
              "MIME_TYPE_UNSPECIFIED",
              "APPLICATION_JSON",
              "TEXT_PLAIN",
              "application/json",
              "text/plain"
            ]
          }
        },
        "description": "Configuration for text output format.",
        "type": "object"
      },
      "ThinkingConfig": {
        "description": "Config for thinking features.",
        "type": "object",
        "properties": {
          "thinkingLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "LOW",
              "MEDIUM",
              "HIGH"
            ],
            "description": "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://ai.google.dev/gemini-api/docs/thinking#thinking-levels) for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error.",
            "default": "high"
          },
          "thinkingBudget": {
            "description": "The number of thoughts tokens that the model should generate.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "includeThoughts": {
            "type": "boolean",
            "description": "Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.",
            "default": false
          }
        }
      },
      "Tool": {
        "type": "object",
        "description": "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. Next ID: 17",
        "properties": {
          "googleSearch": {
            "$ref": "#/components/schemas/GoogleSearch",
            "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.",
            "x-modelStatus": "supported"
          },
          "computerUse": {
            "$ref": "#/components/schemas/ComputerUse",
            "description": "Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.",
            "x-modelStatus": "unknown"
          },
          "fileSearch": {
            "$ref": "#/components/schemas/FileSearch",
            "description": "Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.",
            "x-modelStatus": "supported"
          },
          "googleMaps": {
            "description": "Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.",
            "$ref": "#/components/schemas/GoogleMaps",
            "x-modelStatus": "supported"
          },
          "codeExecution": {
            "$ref": "#/components/schemas/CodeExecution",
            "description": "Optional. Enables the model to execute code as part of generation.",
            "x-modelStatus": "supported"
          },
          "mcpServers": {
            "type": "array",
            "description": "Optional. MCP Servers to connect to.",
            "items": {
              "$ref": "#/components/schemas/McpServer"
            },
            "x-modelStatus": "unknown"
          },
          "urlContext": {
            "$ref": "#/components/schemas/UrlContext",
            "description": "Optional. Tool to support URL context retrieval.",
            "x-modelStatus": "supported"
          },
          "functionDeclarations": {
            "items": {
              "$ref": "#/components/schemas/FunctionDeclaration"
            },
            "description": "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 execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role \"function\" generation context for the next model turn.",
            "type": "array",
            "x-modelStatus": "supported"
          }
        }
      },
      "ToolCall": {
        "description": "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 a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`.",
        "properties": {
          "toolType": {
            "description": "Required. The type of tool that was called.",
            "type": "string"
          },
          "toolName": {
            "description": "Optional. The name of the tool that was called.",
            "type": "string"
          },
          "args": {
            "type": "object",
            "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          }
        },
        "type": "object",
        "required": [
          "toolType"
        ]
      },
      "ToolConfig": {
        "description": "The Tool configuration containing parameters for specifying `Tool` use in the request.",
        "properties": {
          "retrievalConfig": {
            "$ref": "#/components/schemas/RetrievalConfig",
            "description": "Optional. Retrieval config."
          },
          "includeServerSideToolInvocations": {
            "type": "boolean",
            "description": "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."
          },
          "functionCallingConfig": {
            "$ref": "#/components/schemas/FunctionCallingConfig",
            "description": "Optional. Function calling config."
          }
        },
        "type": "object"
      },
      "ToolResponse": {
        "description": "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` message, along with the corresponding `ToolCall`.",
        "type": "object",
        "properties": {
          "toolType": {
            "description": "Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`.",
            "type": "string"
          },
          "response": {
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            },
            "description": "Optional. The tool response."
          }
        },
        "required": [
          "toolType"
        ]
      },
      "TopCandidates": {
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/LogprobsResultCandidate"
            },
            "description": "Sorted by log probability in descending order.",
            "type": "array"
          }
        },
        "type": "object",
        "description": "Candidates with top log probabilities at each decoding step."
      },
      "TranslationConfig": {
        "type": "object",
        "properties": {
          "targetLanguageCode": {
            "type": "string",
            "description": "Required. The target language for translation. Supported values are BCP-47 language codes (e.g. \"en\", \"es\", \"fr\")."
          },
          "echoTargetLanguage": {
            "description": "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.",
            "type": "boolean"
          }
        },
        "description": "Config for translation features.",
        "required": [
          "targetLanguageCode"
        ]
      },
      "UrlContext": {
        "description": "Tool to support URL context retrieval.",
        "type": "object",
        "properties": {}
      },
      "UrlContextMetadata": {
        "description": "Metadata related to url context retrieval tool.",
        "properties": {
          "urlMetadata": {
            "items": {
              "$ref": "#/components/schemas/UrlMetadata"
            },
            "description": "List of url context.",
            "type": "array"
          }
        },
        "type": "object"
      },
      "UrlMetadata": {
        "description": "Context of the a single url retrieval.",
        "type": "object",
        "properties": {
          "urlRetrievalStatus": {
            "description": "Status of the url retrieval.",
            "type": "string",
            "enum": [
              "URL_RETRIEVAL_STATUS_UNSPECIFIED",
              "URL_RETRIEVAL_STATUS_SUCCESS",
              "URL_RETRIEVAL_STATUS_ERROR",
              "URL_RETRIEVAL_STATUS_PAYWALL",
              "URL_RETRIEVAL_STATUS_UNSAFE"
            ]
          },
          "retrievedUrl": {
            "description": "Retrieved url by the tool.",
            "type": "string"
          }
        }
      },
      "UsageMetadata": {
        "description": "Metadata on the generation request's token usage.",
        "type": "object",
        "properties": {
          "candidatesTokensDetails": {
            "readOnly": true,
            "type": "array",
            "description": "Output only. List of modalities that were returned in the response.",
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            }
          },
          "cacheTokensDetails": {
            "type": "array",
            "description": "Output only. List of modalities of the cached content in the request input.",
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            },
            "readOnly": true
          },
          "toolUsePromptTokensDetails": {
            "description": "Output only. List of modalities that were processed for tool-use request inputs.",
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            },
            "readOnly": true,
            "type": "array"
          },
          "candidatesTokenCount": {
            "description": "Total number of tokens across all the generated response candidates.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "thoughtsTokenCount": {
            "type": "integer",
            "readOnly": true,
            "format": "int32",
            "description": "Output only. Number of tokens of thoughts for thinking models.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "cachedContentTokenCount": {
            "description": "Number of tokens in the cached part of the prompt (the cached content)",
            "type": "integer",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "toolUsePromptTokenCount": {
            "format": "int32",
            "readOnly": true,
            "description": "Output only. Number of tokens present in tool-use prompt(s).",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "totalTokenCount": {
            "type": "integer",
            "format": "int32",
            "description": "Total token count for the generation request (prompt + tool-use prompt + thoughts + response candidates).",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "serviceTier": {
            "type": "string",
            "enum": [
              "unspecified",
              "standard",
              "flex",
              "priority"
            ],
            "readOnly": true,
            "description": "Output only. Service tier of the request."
          },
          "promptTokenCount": {
            "description": "Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "promptTokensDetails": {
            "description": "Output only. List of modalities that were processed in the request input.",
            "type": "array",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            }
          }
        }
      },
      "V1mainMediaResolution": {
        "properties": {
          "level": {
            "type": "string",
            "enum": [
              "MEDIA_RESOLUTION_UNSPECIFIED",
              "MEDIA_RESOLUTION_LOW",
              "MEDIA_RESOLUTION_MEDIUM",
              "MEDIA_RESOLUTION_HIGH",
              "MEDIA_RESOLUTION_ULTRA_HIGH"
            ],
            "description": "The tokenization quality used for given media. for Gemini API support ."
          }
        },
        "description": "Media resolution for tokenization.",
        "type": "object"
      },
      "VideoMetadata": {
        "description": "Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata describes the input video content.",
        "type": "object",
        "properties": {
          "startOffset": {
            "type": "string",
            "format": "google-duration",
            "description": "Optional. The start offset of the video."
          },
          "fps": {
            "format": "double",
            "description": "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].",
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 24
          },
          "endOffset": {
            "type": "string",
            "description": "Optional. The end offset of the video.",
            "format": "google-duration"
          }
        },
        "deprecated": true
      },
      "Web": {
        "type": "object",
        "description": "Chunk from the web.",
        "properties": {
          "uri": {
            "description": "Output only. URI reference of the chunk.",
            "readOnly": true,
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "Output only. Title of the chunk.",
            "readOnly": true
          }
        }
      },
      "WebSearch": {
        "properties": {},
        "description": "Standard web search for grounding and related configurations.",
        "type": "object"
      },
      "WordInfo": {
        "properties": {
          "startOffset": {
            "format": "google-duration",
            "description": "Optional. Start offset in time of the word relative to the start of the audio.",
            "type": "string"
          },
          "endOffset": {
            "description": "Optional. End offset in time of the word relative to the start of the audio.",
            "type": "string",
            "format": "google-duration"
          },
          "word": {
            "description": "Required. Transcript of the word.",
            "type": "string"
          }
        },
        "type": "object",
        "description": "Information about a single recognized word.",
        "required": [
          "word"
        ]
      }
    }
  }
}
