{
  "openapi": "3.1.0",
  "info": {
    "title": "Gemini 3.8 Flash API",
    "version": "2026-10-17"
  },
  "servers": [
    {
      "url": "https://api.seedrouter.ai"
    }
  ],
  "paths": {
    "/v1beta/models/gemini-3.8-flash:generateContent": {
      "post": {
        "operationId": "gemini38_generateContent",
        "summary": "Gemini 3.8 Flash 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-8-flash#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.8-flash:streamGenerateContent": {
      "post": {
        "operationId": "gemini38_streamGenerateContent",
        "summary": "Gemini 3.8 Flash 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-8-flash#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": {
            "$ref": "#/components/schemas/GroundingPassageId",
            "description": "Identifier for an inline passage."
          },
          "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": {
        "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.",
        "properties": {
          "words": {
            "description": "Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set.",
            "items": {
              "$ref": "#/components/schemas/WordInfo"
            },
            "type": "array"
          },
          "text": {
            "type": "string",
            "description": "Required. The transcription text of this audio segment."
          },
          "speakerLabel": {
            "description": "Optional. A label identifying the speaker of this audio segment (e.g. \"spk_1\", \"spk_2\"). Present when diarization is set.",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "text"
        ]
      },
      "AudioTranscriptionConfig": {
        "type": "object",
        "properties": {
          "customVocabulary": {
            "description": "Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms (product names, proper nouns, jargon).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "wordTimestamp": {
            "type": "boolean",
            "description": "Optional. Configures word-level timestamp generation."
          },
          "mode": {
            "type": "string",
            "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`.",
            "enum": [
              "MODE_UNSPECIFIED",
              "VERBATIM",
              "SMART"
            ]
          },
          "adaptationPhrases": {
            "deprecated": true,
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Optional. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms."
          },
          "languageCodes": {
            "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.",
            "type": "array"
          },
          "languageHints": {
            "$ref": "#/components/schemas/LanguageHints",
            "deprecated": true,
            "description": "Optional. Specifies one or more languages in the audio."
          },
          "diarization": {
            "type": "boolean",
            "description": "Optional. Configures speaker diarization."
          },
          "languageAuto": {
            "description": "Optional. The model will detect the language automatically.",
            "deprecated": true,
            "$ref": "#/components/schemas/LanguageAuto"
          }
        },
        "description": "The audio transcription configuration."
      },
      "Blob": {
        "type": "object",
        "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.",
        "properties": {
          "data": {
            "description": "Raw bytes for media formats.",
            "type": "string",
            "format": "byte"
          },
          "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). //"
          },
          "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`."
          }
        }
      },
      "Candidate": {
        "type": "object",
        "properties": {
          "finishMessage": {
            "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set.",
            "type": "string",
            "readOnly": true
          },
          "avgLogprobs": {
            "description": "Output only. Average log probability score of the candidate.",
            "readOnly": true,
            "type": "number",
            "format": "double"
          },
          "content": {
            "readOnly": true,
            "description": "Output only. Generated content returned from the model.",
            "$ref": "#/components/schemas/Content"
          },
          "index": {
            "description": "Output only. Index of the candidate in the list of response candidates.",
            "type": "integer",
            "format": "int32",
            "readOnly": true,
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "logprobsResult": {
            "$ref": "#/components/schemas/LogprobsResult",
            "readOnly": true,
            "description": "Output only. Log-likelihood scores for the response tokens and top tokens"
          },
          "continuationToken": {
            "type": "string",
            "format": "byte",
            "description": "An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation."
          },
          "groundingMetadata": {
            "$ref": "#/components/schemas/GroundingMetadata",
            "readOnly": true,
            "description": "Output only. Grounding metadata for the candidate. This field is populated for `GenerateContent` calls."
          },
          "urlContextMetadata": {
            "readOnly": true,
            "$ref": "#/components/schemas/UrlContextMetadata",
            "description": "Output only. Metadata related to url context retrieval tool."
          },
          "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.",
            "readOnly": true,
            "$ref": "#/components/schemas/CitationMetadata"
          },
          "tokenCount": {
            "type": "integer",
            "format": "int32",
            "readOnly": true,
            "description": "Output only. Token count for this candidate.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "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"
            ]
          },
          "safetyRatings": {
            "description": "List of ratings for the safety of a response candidate. There is at most one rating per category.",
            "items": {
              "$ref": "#/components/schemas/SafetyRating"
            },
            "type": "array"
          },
          "groundingAttributions": {
            "type": "array",
            "readOnly": true,
            "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls.",
            "items": {
              "$ref": "#/components/schemas/GroundingAttribution"
            }
          }
        },
        "description": "A response candidate generated from the model."
      },
      "CitationMetadata": {
        "type": "object",
        "description": "A collection of source attributions for a piece of content.",
        "properties": {
          "citationSources": {
            "description": "Citations to sources for a specific response.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CitationSource"
            }
          }
        }
      },
      "CitationSource": {
        "description": "A citation to a source for a portion of a specific response.",
        "type": "object",
        "properties": {
          "startIndex": {
            "type": "integer",
            "description": "Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "endIndex": {
            "description": "Optional. End of the attributed segment, exclusive.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "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"
          },
          "uri": {
            "description": "Optional. URI that is attributed as a source for a portion of the text.",
            "type": "string"
          }
        }
      },
      "CodeExecution": {
        "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.",
        "type": "object",
        "properties": {}
      },
      "CodeExecutionResult": {
        "properties": {
          "output": {
            "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise.",
            "type": "string"
          },
          "outcome": {
            "description": "Required. Outcome of the code execution.",
            "enum": [
              "OUTCOME_UNSPECIFIED",
              "OUTCOME_OK",
              "OUTCOME_FAILED",
              "OUTCOME_DEADLINE_EXCEEDED"
            ],
            "type": "string"
          }
        },
        "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.",
        "type": "object",
        "required": [
          "outcome"
        ]
      },
      "ComputerUse": {
        "type": "object",
        "properties": {
          "environment": {
            "enum": [
              "ENVIRONMENT_UNSPECIFIED",
              "ENVIRONMENT_BROWSER",
              "ENVIRONMENT_MOBILE",
              "ENVIRONMENT_DESKTOP"
            ],
            "type": "string",
            "description": "Required. The environment being operated."
          },
          "disabledSafetyPolicies": {
            "description": "Optional. Disabled safety policies for computer use.",
            "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"
              ]
            }
          },
          "excludedPredefinedFunctions": {
            "items": {
              "type": "string"
            },
            "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.",
            "type": "array"
          },
          "enablePromptInjectionDetection": {
            "type": "boolean",
            "description": "Optional. Whether enable the prompt injection detection check on computer-use request."
          }
        },
        "description": "Computer Use tool type.",
        "required": [
          "environment"
        ]
      },
      "Content": {
        "type": "object",
        "properties": {
          "parts": {
            "items": {
              "$ref": "#/components/schemas/Part"
            },
            "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types.",
            "type": "array",
            "minItems": 1
          },
          "role": {
            "type": "string",
            "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."
          }
        },
        "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": {
        "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.",
        "type": "object",
        "properties": {
          "code": {
            "description": "Required. The code to be executed.",
            "type": "string"
          },
          "language": {
            "enum": [
              "LANGUAGE_UNSPECIFIED",
              "PYTHON"
            ],
            "description": "Required. Programming language of the `code`.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "language"
        ]
      },
      "FileData": {
        "type": "object",
        "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`."
          }
        },
        "description": "URI based data.",
        "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.",
        "type": "object",
        "properties": {
          "topK": {
            "format": "int32",
            "description": "Optional. The number of semantic retrieval chunks to retrieve.",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "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"
          },
          "metadataFilter": {
            "type": "string",
            "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks."
          }
        },
        "required": [
          "fileSearchStoreNames"
        ]
      },
      "FunctionCall": {
        "type": "object",
        "properties": {
          "args": {
            "additionalProperties": {
              "description": "Properties of the object."
            },
            "type": "object",
            "description": "Optional. The function parameters and values in JSON object format."
          },
          "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"
          }
        },
        "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.",
        "required": [
          "name"
        ]
      },
      "FunctionCallingConfig": {
        "properties": {
          "mode": {
            "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.",
            "type": "string"
          },
          "allowedFunctionNames": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "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": "object",
        "description": "Configuration for specifying function calling behavior."
      },
      "FunctionDeclaration": {
        "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.",
        "properties": {
          "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."
          },
          "response": {
            "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.",
            "$ref": "#/components/schemas/Schema"
          },
          "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`."
          },
          "name": {
            "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.",
            "type": "string",
            "maxLength": 128,
            "pattern": "^[a-zA-Z0-9_:.-]+$"
          },
          "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`."
          }
        },
        "required": [
          "name"
        ]
      },
      "FunctionResponse": {
        "properties": {
          "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"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/FunctionResponsePart"
            },
            "description": "Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.",
            "type": "array"
          },
          "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."
          },
          "response": {
            "additionalProperties": {
              "description": "Properties of the object."
            },
            "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."
          },
          "scheduling": {
            "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.",
            "type": "string"
          }
        },
        "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.",
        "type": "object",
        "required": [
          "name",
          "response"
        ]
      },
      "FunctionResponseBlob": {
        "type": "object",
        "properties": {
          "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"
          },
          "data": {
            "description": "Raw bytes for media formats.",
            "type": "string",
            "format": "byte"
          }
        },
        "description": "Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field."
      },
      "FunctionResponsePart": {
        "properties": {
          "inlineData": {
            "$ref": "#/components/schemas/FunctionResponseBlob",
            "description": "Inline media bytes."
          }
        },
        "type": "object",
        "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": {
        "description": "Request to generate a completion from the model.",
        "type": "object",
        "properties": {
          "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": {
            "description": "Optional. Configuration options for model generation and outputs.",
            "$ref": "#/components/schemas/GenerationConfig",
            "x-modelStatus": "supported"
          },
          "serviceTier": {
            "type": "string",
            "description": "Optional. The service tier of the request.",
            "enum": [
              "unspecified",
              "standard",
              "flex",
              "priority"
            ],
            "x-modelStatus": "supported"
          },
          "safetySettings": {
            "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.",
            "type": "array",
            "x-modelStatus": "supported"
          },
          "contents": {
            "items": {
              "$ref": "#/components/schemas/Content"
            },
            "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.",
            "type": "array",
            "minItems": 1,
            "x-modelStatus": "supported"
          },
          "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"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "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\"}`)",
            "type": "object",
            "x-modelStatus": "unknown"
          },
          "model": {
            "type": "string",
            "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
            "enum": [
              "models/gemini-3.8-flash",
              "gemini-3.8-flash"
            ],
            "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"
          },
          "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"
          },
          "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.",
            "format": "byte",
            "type": "string",
            "x-modelStatus": "unknown"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "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.",
            "x-modelStatus": "supported"
          }
        },
        "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`.",
        "type": "object",
        "properties": {
          "modelVersion": {
            "readOnly": true,
            "description": "Output only. The model version used to generate the response.",
            "type": "string"
          },
          "promptFeedback": {
            "description": "Returns the prompt's feedback related to the content filters.",
            "$ref": "#/components/schemas/PromptFeedback"
          },
          "responseId": {
            "type": "string",
            "description": "Output only. response_id is used to identify each response.",
            "readOnly": true
          },
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/Candidate"
            },
            "description": "Candidate responses from the model.",
            "type": "array"
          },
          "usageMetadata": {
            "readOnly": true,
            "$ref": "#/components/schemas/UsageMetadata",
            "description": "Output only. Metadata on the generation requests' token usage."
          },
          "modelStatus": {
            "description": "Output only. The current model status of this model.",
            "$ref": "#/components/schemas/ModelStatus",
            "readOnly": true
          }
        }
      },
      "GenerationConfig": {
        "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model.",
        "type": "object",
        "properties": {
          "thinkingConfig": {
            "description": "Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.",
            "$ref": "#/components/schemas/ThinkingConfig",
            "x-modelStatus": "supported"
          },
          "frequencyPenalty": {
            "format": "float",
            "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.",
            "x-modelStatus": "unknown"
          },
          "responseJsonSchema": {
            "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field.",
            "x-modelStatus": "supported"
          },
          "logprobs": {
            "format": "int32",
            "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].",
            "type": "integer",
            "minimum": 0,
            "maximum": 20,
            "x-modelStatus": "unknown"
          },
          "audioTranscriptionConfig": {
            "description": "Optional. Config for audio transcription (speech recognition).",
            "$ref": "#/components/schemas/AudioTranscriptionConfig",
            "x-modelStatus": "unknown"
          },
          "presencePenalty": {
            "type": "number",
            "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.",
            "x-modelStatus": "unknown"
          },
          "translationConfig": {
            "$ref": "#/components/schemas/TranslationConfig",
            "description": "Optional. Config for translation.",
            "x-modelStatus": "unknown"
          },
          "enableEnhancedCivicAnswers": {
            "type": "boolean",
            "description": "Optional. Enables enhanced civic answers. It may not be available for all models.",
            "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"
          },
          "seed": {
            "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647,
            "x-modelStatus": "unknown"
          },
          "enableAffectiveDialog": {
            "type": "boolean",
            "description": "Optional. If enabled, the model will detect emotions and adapt its responses accordingly.",
            "x-modelStatus": "unknown"
          },
          "responseMimeType": {
            "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.",
            "type": "string",
            "default": "text/plain",
            "x-modelStatus": "supported"
          },
          "maxOutputTokens": {
            "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.",
            "format": "int32",
            "type": "integer",
            "minimum": 1,
            "maximum": 65536,
            "default": 65536,
            "x-modelStatus": "supported"
          },
          "responseSchema": {
            "deprecated": true,
            "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.",
            "$ref": "#/components/schemas/Schema",
            "x-modelStatus": "supported"
          },
          "mediaResolution": {
            "type": "string",
            "description": "Optional. If specified, the media resolution specified will be used.",
            "enum": [
              "MEDIA_RESOLUTION_UNSPECIFIED",
              "MEDIA_RESOLUTION_LOW",
              "MEDIA_RESOLUTION_MEDIUM",
              "MEDIA_RESOLUTION_HIGH"
            ],
            "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"
          },
          "stopSequences": {
            "items": {
              "type": "string"
            },
            "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",
            "maxItems": 5,
            "x-modelStatus": "supported"
          },
          "responseLogprobs": {
            "type": "boolean",
            "description": "Optional. If true, export the logprobs results in response.",
            "x-modelStatus": "unknown"
          }
        }
      },
      "GoogleAiGenerativelanguageV1betaGroundingSupport": {
        "type": "object",
        "properties": {
          "renderedParts": {
            "type": "array",
            "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,
            "items": {
              "format": "int32",
              "type": "integer",
              "minimum": -2147483648,
              "maximum": 2147483647
            }
          },
          "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
            }
          },
          "segment": {
            "description": "Segment of the content this support belongs to.",
            "$ref": "#/components/schemas/GoogleAiGenerativelanguageV1betaSegment"
          },
          "confidenceScores": {
            "items": {
              "type": "number",
              "format": "float"
            },
            "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."
          }
        },
        "description": "Grounding support."
      },
      "GoogleAiGenerativelanguageV1betaSegment": {
        "description": "Segment of the content.",
        "properties": {
          "endIndex": {
            "type": "integer",
            "description": "End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "startIndex": {
            "type": "integer",
            "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "text": {
            "description": "The text corresponding to the segment from the response.",
            "type": "string"
          },
          "partIndex": {
            "description": "The index of a Part object within its parent Content object.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          }
        },
        "type": "object"
      },
      "GoogleMaps": {
        "description": "The GoogleMaps Tool that provides geospatial context for the user's query.",
        "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"
      },
      "GoogleSearch": {
        "type": "object",
        "properties": {
          "searchTypes": {
            "description": "Optional. The set of search types to enable. If not set, web search is enabled by default.",
            "$ref": "#/components/schemas/SearchTypes"
          },
          "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."
      },
      "GroundingAttribution": {
        "type": "object",
        "description": "Attribution for a source that contributed to an answer.",
        "properties": {
          "content": {
            "$ref": "#/components/schemas/Content",
            "description": "Grounding source content that makes up this attribution."
          },
          "sourceId": {
            "readOnly": true,
            "description": "Output only. Identifier for the source contributing to this attribution.",
            "$ref": "#/components/schemas/AttributionSourceId"
          }
        }
      },
      "GroundingChunk": {
        "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.",
        "type": "object",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/Image",
            "description": "Optional. Grounding chunk from image search."
          },
          "maps": {
            "description": "Optional. Grounding chunk from Google Maps.",
            "$ref": "#/components/schemas/Maps"
          },
          "retrievedContext": {
            "$ref": "#/components/schemas/RetrievedContext",
            "description": "Optional. Grounding chunk from context retrieved by the file search tool."
          },
          "web": {
            "description": "Grounding chunk from the web.",
            "$ref": "#/components/schemas/Web"
          }
        }
      },
      "GroundingChunkCustomMetadata": {
        "properties": {
          "stringValue": {
            "description": "Optional. The string value of the metadata.",
            "type": "string"
          },
          "numericValue": {
            "description": "Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used.",
            "type": "number",
            "format": "float"
          },
          "stringListValue": {
            "$ref": "#/components/schemas/GroundingChunkStringList",
            "description": "Optional. A list of string values for the metadata."
          },
          "key": {
            "description": "The key of the metadata.",
            "type": "string"
          }
        },
        "type": "object",
        "description": "User provided metadata about the GroundingFact."
      },
      "GroundingChunkStringList": {
        "description": "A list of string values.",
        "type": "object",
        "properties": {
          "values": {
            "description": "The string values of the list.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GroundingMetadata": {
        "description": "Metadata returned to client when grounding is enabled.",
        "type": "object",
        "properties": {
          "groundingSupports": {
            "description": "List of grounding support.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleAiGenerativelanguageV1betaGroundingSupport"
            }
          },
          "googleMapsWidgetContextToken": {
            "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.",
            "type": "string"
          },
          "groundingChunks": {
            "items": {
              "$ref": "#/components/schemas/GroundingChunk"
            },
            "type": "array",
            "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."
          },
          "searchEntryPoint": {
            "$ref": "#/components/schemas/SearchEntryPoint",
            "description": "Optional. Google search entry for the following-up web searches."
          },
          "imageSearchQueries": {
            "items": {
              "type": "string"
            },
            "description": "Image search queries used for grounding.",
            "type": "array"
          },
          "webSearchQueries": {
            "description": "Web search queries for the following-up web search.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "retrievalMetadata": {
            "description": "Metadata related to retrieval in the grounding flow.",
            "$ref": "#/components/schemas/RetrievalMetadata"
          }
        }
      },
      "GroundingPassageId": {
        "properties": {
          "partIndex": {
            "readOnly": true,
            "type": "integer",
            "format": "int32",
            "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "passageId": {
            "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object",
        "description": "Identifier for a part within a `GroundingPassage`."
      },
      "Image": {
        "description": "Chunk from image search.",
        "type": "object",
        "properties": {
          "title": {
            "description": "The title of the web page that the image is from.",
            "type": "string"
          },
          "domain": {
            "type": "string",
            "description": "The root domain of the web page that the image is from, e.g. \"example.com\"."
          },
          "sourceUri": {
            "type": "string",
            "description": "The web page URI for attribution."
          },
          "imageUri": {
            "description": "The image asset URL.",
            "type": "string"
          }
        }
      },
      "ImageSearch": {
        "type": "object",
        "properties": {},
        "description": "Image search for grounding and related configurations."
      },
      "Interval": {
        "properties": {
          "startTime": {
            "type": "string",
            "format": "google-datetime",
            "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start."
          },
          "endTime": {
            "format": "google-datetime",
            "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.",
            "type": "string"
          }
        },
        "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.",
        "type": "object"
      },
      "LanguageAuto": {
        "deprecated": true,
        "type": "object",
        "description": "Indicates the language of the audio should be automatically detected.",
        "properties": {}
      },
      "LanguageHints": {
        "properties": {
          "languageCodes": {
            "items": {
              "type": "string"
            },
            "deprecated": true,
            "type": "array",
            "description": "Required. BCP-47 language codes."
          }
        },
        "description": "Provides hints to the model about possible languages present in the audio.",
        "deprecated": true,
        "type": "object",
        "required": [
          "languageCodes"
        ]
      },
      "LatLng": {
        "type": "object",
        "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.",
        "properties": {
          "latitude": {
            "type": "number",
            "format": "double",
            "description": "The latitude in degrees. It must be in the range [-90.0, +90.0]."
          },
          "longitude": {
            "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
            "type": "number",
            "format": "double"
          }
        }
      },
      "LogprobsResult": {
        "properties": {
          "logProbabilitySum": {
            "type": "number",
            "format": "float",
            "description": "Sum of log probabilities for all tokens."
          },
          "topCandidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TopCandidates"
            },
            "description": "Length = total number of decoding steps."
          },
          "chosenCandidates": {
            "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.",
            "items": {
              "$ref": "#/components/schemas/LogprobsResultCandidate"
            },
            "type": "array"
          }
        },
        "type": "object",
        "description": "Logprobs Result"
      },
      "LogprobsResultCandidate": {
        "description": "Candidate for the logprobs token and score.",
        "type": "object",
        "properties": {
          "tokenId": {
            "description": "The candidate’s token id value.",
            "type": "integer",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "token": {
            "type": "string",
            "description": "The candidate’s token string value."
          },
          "logProbability": {
            "format": "float",
            "description": "The candidate's log probability.",
            "type": "number"
          }
        }
      },
      "Maps": {
        "type": "object",
        "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.",
        "properties": {
          "placeId": {
            "description": "The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place.",
            "type": "string"
          },
          "text": {
            "description": "Text description of the place answer.",
            "type": "string"
          },
          "title": {
            "description": "Title of the place.",
            "type": "string"
          },
          "placeAnswerSources": {
            "$ref": "#/components/schemas/PlaceAnswerSources",
            "description": "Sources that provide answers about the features of a given place in Google Maps."
          },
          "uri": {
            "description": "URI reference of the place.",
            "type": "string"
          }
        }
      },
      "McpServer": {
        "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."
          }
        },
        "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"
      },
      "ModalityTokenCount": {
        "properties": {
          "tokenCount": {
            "type": "integer",
            "description": "Number of tokens.",
            "format": "int32",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "modality": {
            "enum": [
              "MODALITY_UNSPECIFIED",
              "TEXT",
              "IMAGE",
              "VIDEO",
              "AUDIO",
              "DOCUMENT"
            ],
            "description": "The modality associated with this token count.",
            "type": "string"
          }
        },
        "type": "object",
        "description": "Represents token counting info for a single modality."
      },
      "ModelStatus": {
        "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.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A message explaining the model status."
          },
          "modelStage": {
            "description": "The stage of the underlying model.",
            "type": "string",
            "enum": [
              "MODEL_STAGE_UNSPECIFIED",
              "UNSTABLE_EXPERIMENTAL",
              "EXPERIMENTAL",
              "PREVIEW",
              "STABLE",
              "LEGACY",
              "DEPRECATED",
              "RETIRED"
            ]
          },
          "retirementTime": {
            "type": "string",
            "format": "google-datetime",
            "description": "The time at which the model will be retired."
          }
        }
      },
      "Part": {
        "properties": {
          "fileData": {
            "$ref": "#/components/schemas/FileData",
            "description": "URI based data."
          },
          "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"
          },
          "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"
          },
          "text": {
            "description": "Inline text.",
            "type": "string"
          },
          "audioTranscription": {
            "description": "Optional. Audio (input or output) transcription. This is only set when this Part contains audio data.",
            "$ref": "#/components/schemas/AudioTranscription"
          },
          "mediaResolution": {
            "$ref": "#/components/schemas/V1mainMediaResolution",
            "description": "Optional. Media resolution for the input media."
          },
          "codeExecutionResult": {
            "description": "Result of executing the `ExecutableCode`.",
            "$ref": "#/components/schemas/CodeExecutionResult"
          },
          "thoughtSignature": {
            "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests.",
            "type": "string",
            "format": "byte"
          },
          "videoMetadata": {
            "$ref": "#/components/schemas/VideoMetadata",
            "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data."
          },
          "mediaProcessing": {
            "enum": [
              "MEDIA_PROCESSING_UNSPECIFIED",
              "STATIC",
              "AGENTIC"
            ],
            "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.",
            "type": "string"
          },
          "thought": {
            "type": "boolean",
            "description": "Optional. Indicates if the part is thought from the model."
          },
          "partMetadata": {
            "additionalProperties": {
              "description": "Properties of the object."
            },
            "type": "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."
          },
          "inlineData": {
            "$ref": "#/components/schemas/Blob",
            "description": "Inline media bytes."
          },
          "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."
          },
          "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`.",
            "$ref": "#/components/schemas/ToolResponse"
          },
          "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"
          },
          "executableCode": {
            "$ref": "#/components/schemas/ExecutableCode",
            "description": "Code generated by the model that is meant to be executed."
          }
        },
        "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.",
        "type": "object"
      },
      "PlaceAnswerSources": {
        "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.",
        "type": "object"
      },
      "PromptFeedback": {
        "type": "object",
        "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`.",
        "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": {
            "type": "string",
            "enum": [
              "BLOCK_REASON_UNSPECIFIED",
              "SAFETY",
              "OTHER",
              "BLOCKLIST",
              "PROHIBITED_CONTENT",
              "IMAGE_SAFETY"
            ],
            "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt."
          }
        }
      },
      "ResponseFormatConfig": {
        "properties": {
          "text": {
            "$ref": "#/components/schemas/TextResponseFormat",
            "description": "Optional. Text output format configuration."
          }
        },
        "description": "Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.",
        "type": "object"
      },
      "RetrievalConfig": {
        "description": "Retrieval config.",
        "properties": {
          "latLng": {
            "$ref": "#/components/schemas/LatLng",
            "description": "Optional. The location of the user."
          },
          "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"
          }
        },
        "type": "object"
      },
      "RetrievalMetadata": {
        "description": "Metadata related to retrieval in the grounding flow.",
        "type": "object",
        "properties": {
          "googleSearchDynamicRetrievalScore": {
            "format": "float",
            "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."
          }
        }
      },
      "RetrievedContext": {
        "properties": {
          "customMetadata": {
            "description": "Optional. User-provided metadata about the retrieved context.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroundingChunkCustomMetadata"
            }
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer",
            "description": "Optional. Page number of the retrieved context, if applicable.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "title": {
            "description": "Optional. Title of the document.",
            "type": "string"
          },
          "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": {
            "type": "string",
            "description": "Optional. URI reference of the semantic retrieval document."
          },
          "fileSearchStore": {
            "type": "string",
            "description": "Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`"
          },
          "text": {
            "description": "Optional. Text of the chunk.",
            "type": "string"
          }
        },
        "type": "object",
        "description": "Chunk from context retrieved by the file search tool."
      },
      "ReviewSnippet": {
        "type": "object",
        "properties": {
          "reviewId": {
            "description": "The ID of the review snippet.",
            "type": "string"
          },
          "googleMapsUri": {
            "type": "string",
            "description": "A link that corresponds to the user review on Google Maps."
          },
          "title": {
            "description": "Title of the review.",
            "type": "string"
          }
        },
        "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps."
      },
      "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.",
        "properties": {
          "category": {
            "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"
            ],
            "type": "string",
            "description": "Required. The category for this rating."
          },
          "probability": {
            "enum": [
              "HARM_PROBABILITY_UNSPECIFIED",
              "NEGLIGIBLE",
              "LOW",
              "MEDIUM",
              "HIGH"
            ],
            "description": "Required. The probability of harm for this content.",
            "type": "string"
          },
          "blocked": {
            "type": "boolean",
            "description": "Was this content blocked because of this rating?"
          }
        },
        "type": "object",
        "required": [
          "category",
          "probability"
        ]
      },
      "SafetySetting": {
        "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.",
        "type": "object",
        "properties": {
          "threshold": {
            "enum": [
              "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
              "BLOCK_LOW_AND_ABOVE",
              "BLOCK_MEDIUM_AND_ABOVE",
              "BLOCK_ONLY_HIGH",
              "BLOCK_NONE",
              "OFF"
            ],
            "description": "Required. Controls the probability threshold at which harm is blocked.",
            "type": "string"
          },
          "category": {
            "description": "Required. The category for this setting.",
            "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"
            ]
          }
        },
        "required": [
          "threshold",
          "category"
        ]
      },
      "Schema": {
        "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).",
        "properties": {
          "maxItems": {
            "description": "Optional. Maximum number of the elements for Type.ARRAY.",
            "type": "string",
            "format": "int64"
          },
          "minimum": {
            "type": "number",
            "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER",
            "format": "double"
          },
          "properties": {
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema"
            },
            "description": "Optional. Properties of Type.OBJECT.",
            "type": "object"
          },
          "maximum": {
            "format": "double",
            "type": "number",
            "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER"
          },
          "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."
          },
          "pattern": {
            "type": "string",
            "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression."
          },
          "description": {
            "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.",
            "type": "string"
          },
          "minItems": {
            "type": "string",
            "description": "Optional. Minimum number of the elements for Type.ARRAY.",
            "format": "int64"
          },
          "items": {
            "$ref": "#/components/schemas/Schema",
            "description": "Optional. Schema of the elements of Type.ARRAY."
          },
          "type": {
            "description": "Required. Data type.",
            "type": "string",
            "enum": [
              "TYPE_UNSPECIFIED",
              "STRING",
              "NUMBER",
              "INTEGER",
              "BOOLEAN",
              "ARRAY",
              "OBJECT",
              "NULL"
            ]
          },
          "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"
            }
          },
          "propertyOrdering": {
            "type": "array",
            "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.",
            "items": {
              "type": "string"
            }
          },
          "maxLength": {
            "format": "int64",
            "type": "string",
            "description": "Optional. Maximum length of the Type.STRING"
          },
          "minProperties": {
            "format": "int64",
            "type": "string",
            "description": "Optional. Minimum number of the properties for Type.OBJECT."
          },
          "example": {
            "description": "Optional. Example of the object. Will only populated when the object is the root."
          },
          "title": {
            "type": "string",
            "description": "Optional. The title of the schema."
          },
          "nullable": {
            "type": "boolean",
            "description": "Optional. Indicates if the value may be null."
          },
          "enum": {
            "items": {
              "type": "string"
            },
            "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\"]}",
            "type": "array"
          },
          "required": {
            "description": "Optional. Required properties of Type.OBJECT.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxProperties": {
            "type": "string",
            "format": "int64",
            "description": "Optional. Maximum number of the properties for Type.OBJECT."
          },
          "format": {
            "type": "string",
            "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality."
          },
          "minLength": {
            "type": "string",
            "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING",
            "format": "int64"
          }
        },
        "required": [
          "type"
        ]
      },
      "SearchEntryPoint": {
        "type": "object",
        "properties": {
          "renderedContent": {
            "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.",
            "type": "string"
          },
          "sdkBlob": {
            "type": "string",
            "description": "Optional. Base64 encoded JSON representing array of tuple.",
            "format": "byte"
          }
        },
        "description": "Google search entry point."
      },
      "SearchTypes": {
        "type": "object",
        "properties": {
          "webSearch": {
            "description": "Optional. Enables web search. Only text results are returned.",
            "$ref": "#/components/schemas/WebSearch"
          },
          "imageSearch": {
            "description": "Optional. Enables image search. Image bytes are returned.",
            "$ref": "#/components/schemas/ImageSearch"
          }
        },
        "description": "Different types of search that can be enabled on the GoogleSearch tool."
      },
      "SemanticRetrieverChunk": {
        "properties": {
          "source": {
            "readOnly": true,
            "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`",
            "type": "string"
          },
          "chunk": {
            "readOnly": true,
            "type": "string",
            "description": "Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz`"
          }
        },
        "description": "Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.",
        "type": "object"
      },
      "SpeechMetadata": {
        "type": "object",
        "description": "Speech metadata for `text` parts.",
        "properties": {
          "speaker": {
            "description": "Optional. Optional speaker name for multi-speaker synthesis.",
            "type": "string"
          },
          "style": {
            "description": "Optional. Optional style instruction for the speech synthesis.",
            "type": "string"
          }
        }
      },
      "StreamableHttpTransport": {
        "properties": {
          "headers": {
            "type": "object",
            "description": "Optional: Fields for authentication headers, timeouts, etc., if needed.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "sseReadTimeout": {
            "type": "string",
            "format": "google-duration",
            "description": "Timeout for SSE read operations."
          },
          "timeout": {
            "format": "google-duration",
            "description": "HTTP timeout for regular operations.",
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "The full URL for the MCPServer endpoint. Example: \"https://api.example.com/mcp\""
          },
          "terminateOnClose": {
            "description": "Whether to close the client session when the transport closes.",
            "type": "boolean"
          }
        },
        "description": "A transport that can stream HTTP requests and responses. Next ID: 6",
        "type": "object"
      },
      "TextResponseFormat": {
        "description": "Configuration for text output format.",
        "type": "object",
        "properties": {
          "schema": {
            "description": "Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON."
          },
          "mimeType": {
            "type": "string",
            "enum": [
              "MIME_TYPE_UNSPECIFIED",
              "APPLICATION_JSON",
              "TEXT_PLAIN",
              "application/json",
              "text/plain"
            ],
            "description": "Optional. The MIME type of the text output."
          }
        }
      },
      "ThinkingConfig": {
        "type": "object",
        "description": "Config for thinking features.",
        "properties": {
          "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
          },
          "thinkingLevel": {
            "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.",
            "type": "string",
            "default": "medium"
          }
        }
      },
      "Tool": {
        "properties": {
          "functionDeclarations": {
            "type": "array",
            "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.",
            "x-modelStatus": "supported"
          },
          "fileSearch": {
            "description": "Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.",
            "$ref": "#/components/schemas/FileSearch",
            "x-modelStatus": "supported"
          },
          "codeExecution": {
            "$ref": "#/components/schemas/CodeExecution",
            "description": "Optional. Enables the model to execute code as part of generation.",
            "x-modelStatus": "supported"
          },
          "googleSearch": {
            "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.",
            "$ref": "#/components/schemas/GoogleSearch",
            "x-modelStatus": "supported"
          },
          "urlContext": {
            "$ref": "#/components/schemas/UrlContext",
            "description": "Optional. Tool to support URL context retrieval.",
            "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": "supported"
          },
          "googleMaps": {
            "$ref": "#/components/schemas/GoogleMaps",
            "description": "Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.",
            "x-modelStatus": "supported"
          },
          "mcpServers": {
            "description": "Optional. MCP Servers to connect to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpServer"
            },
            "x-modelStatus": "unknown"
          }
        },
        "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",
        "type": "object"
      },
      "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`.",
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string",
            "description": "Optional. The name of the tool that was called."
          },
          "toolType": {
            "description": "Required. The type of tool that was called.",
            "type": "string"
          },
          "args": {
            "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}",
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          }
        },
        "required": [
          "toolType"
        ]
      },
      "ToolConfig": {
        "properties": {
          "retrievalConfig": {
            "description": "Optional. Retrieval config.",
            "$ref": "#/components/schemas/RetrievalConfig"
          },
          "includeServerSideToolInvocations": {
            "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.",
            "type": "boolean"
          },
          "functionCallingConfig": {
            "description": "Optional. Function calling config.",
            "$ref": "#/components/schemas/FunctionCallingConfig"
          }
        },
        "type": "object",
        "description": "The Tool configuration containing parameters for specifying `Tool` use in the request."
      },
      "ToolResponse": {
        "properties": {
          "toolType": {
            "type": "string",
            "description": "Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`."
          },
          "response": {
            "description": "Optional. The tool response.",
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          }
        },
        "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",
        "required": [
          "toolType"
        ]
      },
      "TopCandidates": {
        "description": "Candidates with top log probabilities at each decoding step.",
        "properties": {
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogprobsResultCandidate"
            },
            "description": "Sorted by log probability in descending order."
          }
        },
        "type": "object"
      },
      "TranslationConfig": {
        "properties": {
          "echoTargetLanguage": {
            "type": "boolean",
            "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."
          },
          "targetLanguageCode": {
            "type": "string",
            "description": "Required. The target language for translation. Supported values are BCP-47 language codes (e.g. \"en\", \"es\", \"fr\")."
          }
        },
        "type": "object",
        "description": "Config for translation features.",
        "required": [
          "targetLanguageCode"
        ]
      },
      "UrlContext": {
        "properties": {},
        "description": "Tool to support URL context retrieval.",
        "type": "object"
      },
      "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": {
        "type": "object",
        "description": "Context of the a single url retrieval.",
        "properties": {
          "retrievedUrl": {
            "type": "string",
            "description": "Retrieved url by the tool."
          },
          "urlRetrievalStatus": {
            "enum": [
              "URL_RETRIEVAL_STATUS_UNSPECIFIED",
              "URL_RETRIEVAL_STATUS_SUCCESS",
              "URL_RETRIEVAL_STATUS_ERROR",
              "URL_RETRIEVAL_STATUS_PAYWALL",
              "URL_RETRIEVAL_STATUS_UNSAFE"
            ],
            "description": "Status of the url retrieval.",
            "type": "string"
          }
        }
      },
      "UsageMetadata": {
        "properties": {
          "candidatesTokenCount": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of tokens across all the generated response candidates.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "candidatesTokensDetails": {
            "type": "array",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            },
            "description": "Output only. List of modalities that were returned in the response."
          },
          "thoughtsTokenCount": {
            "readOnly": true,
            "description": "Output only. Number of tokens of thoughts for thinking models.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "promptTokensDetails": {
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            },
            "type": "array",
            "description": "Output only. List of modalities that were processed in the request input."
          },
          "cachedContentTokenCount": {
            "type": "integer",
            "format": "int32",
            "description": "Number of tokens in the cached part of the prompt (the cached content)",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "toolUsePromptTokensDetails": {
            "type": "array",
            "description": "Output only. List of modalities that were processed for tool-use request inputs.",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            }
          },
          "toolUsePromptTokenCount": {
            "format": "int32",
            "description": "Output only. Number of tokens present in tool-use prompt(s).",
            "type": "integer",
            "readOnly": true,
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "totalTokenCount": {
            "description": "Total token count for the generation request (prompt + tool-use prompt + thoughts + response candidates).",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "serviceTier": {
            "enum": [
              "unspecified",
              "standard",
              "flex",
              "priority"
            ],
            "readOnly": true,
            "type": "string",
            "description": "Output only. Service tier of the request."
          },
          "promptTokenCount": {
            "type": "integer",
            "format": "int32",
            "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.",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "cacheTokensDetails": {
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/ModalityTokenCount"
            },
            "description": "Output only. List of modalities of the cached content in the request input.",
            "type": "array"
          }
        },
        "type": "object",
        "description": "Metadata on the generation request's token usage."
      },
      "V1mainMediaResolution": {
        "type": "object",
        "properties": {
          "level": {
            "description": "The tokenization quality used for given media. for Gemini API support .",
            "enum": [
              "MEDIA_RESOLUTION_UNSPECIFIED",
              "MEDIA_RESOLUTION_LOW",
              "MEDIA_RESOLUTION_MEDIUM",
              "MEDIA_RESOLUTION_HIGH",
              "MEDIA_RESOLUTION_ULTRA_HIGH"
            ],
            "type": "string"
          }
        },
        "description": "Media resolution for tokenization."
      },
      "VideoMetadata": {
        "properties": {
          "endOffset": {
            "format": "google-duration",
            "type": "string",
            "description": "Optional. The end offset of the video."
          },
          "startOffset": {
            "type": "string",
            "description": "Optional. The start offset of the video.",
            "format": "google-duration"
          },
          "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
          }
        },
        "type": "object",
        "deprecated": true,
        "description": "Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata describes the input video content."
      },
      "Web": {
        "description": "Chunk from the web.",
        "properties": {
          "uri": {
            "readOnly": true,
            "description": "Output only. URI reference of the chunk.",
            "type": "string"
          },
          "title": {
            "readOnly": true,
            "type": "string",
            "description": "Output only. Title of the chunk."
          }
        },
        "type": "object"
      },
      "WebSearch": {
        "description": "Standard web search for grounding and related configurations.",
        "properties": {},
        "type": "object"
      },
      "WordInfo": {
        "properties": {
          "endOffset": {
            "format": "google-duration",
            "type": "string",
            "description": "Optional. End offset in time of the word relative to the start of the audio."
          },
          "word": {
            "description": "Required. Transcript of the word.",
            "type": "string"
          },
          "startOffset": {
            "description": "Optional. Start offset in time of the word relative to the start of the audio.",
            "type": "string",
            "format": "google-duration"
          }
        },
        "description": "Information about a single recognized word.",
        "type": "object",
        "required": [
          "word"
        ]
      }
    }
  }
}
