{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-gemini/json-schema/google-gemini-generate-content-batch-schema.json",
  "title": "GenerateContentBatch",
  "description": "A resource representing a batch of `GenerateContent` requests.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-gemini-batches-api-openapi.yml#/components/schemas/GenerateContentBatch",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
      "readOnly": true
    },
    "inputConfig": {
      "$ref": "#/$defs/InputConfig",
      "description": "Required. Input configuration of the instances on which batch processing are performed."
    },
    "state": {
      "readOnly": true,
      "type": "string",
      "enum": [
        "BATCH_STATE_UNSPECIFIED",
        "BATCH_STATE_PENDING",
        "BATCH_STATE_RUNNING",
        "BATCH_STATE_SUCCEEDED",
        "BATCH_STATE_FAILED",
        "BATCH_STATE_CANCELLED",
        "BATCH_STATE_EXPIRED"
      ],
      "description": "Output only. The state of the batch."
    },
    "createTime": {
      "description": "Output only. The time at which the batch was created.",
      "format": "google-datetime",
      "type": "string",
      "readOnly": true
    },
    "endTime": {
      "readOnly": true,
      "type": "string",
      "format": "google-datetime",
      "description": "Output only. The time at which the batch processing completed."
    },
    "batchStats": {
      "$ref": "#/$defs/BatchStats",
      "description": "Output only. Stats about the batch."
    },
    "priority": {
      "type": "string",
      "format": "int64",
      "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0."
    },
    "model": {
      "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
      "type": "string"
    },
    "output": {
      "$ref": "#/$defs/GenerateContentBatchOutput",
      "description": "Output only. The output of the batch request."
    },
    "updateTime": {
      "format": "google-datetime",
      "description": "Output only. The time at which the batch was last updated.",
      "readOnly": true,
      "type": "string"
    },
    "displayName": {
      "description": "Required. The user-defined name of this batch.",
      "type": "string"
    }
  },
  "$defs": {
    "AttributionSourceId": {
      "description": "Identifier for the source contributing to this attribution.",
      "type": "object",
      "properties": {
        "semanticRetrieverChunk": {
          "$ref": "#/$defs/SemanticRetrieverChunk",
          "description": "Identifier for a `Chunk` fetched via Semantic Retriever."
        },
        "groundingPassage": {
          "$ref": "#/$defs/GroundingPassageId",
          "description": "Identifier for an inline passage."
        }
      }
    },
    "AudioResponseFormat": {
      "properties": {
        "bitRate": {
          "description": "Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).",
          "type": "integer",
          "format": "int32"
        },
        "sampleRate": {
          "description": "Optional. Sample rate in Hz.",
          "type": "integer",
          "format": "int32"
        },
        "mimeType": {
          "description": "Optional. The MIME type of the audio output.",
          "type": "string",
          "enum": [
            "MIME_TYPE_UNSPECIFIED",
            "AUDIO_MP3",
            "AUDIO_OGG_OPUS",
            "AUDIO_L16",
            "AUDIO_WAV",
            "AUDIO_ALAW",
            "AUDIO_MULAW"
          ]
        },
        "delivery": {
          "enum": [
            "DELIVERY_UNSPECIFIED",
            "INLINE",
            "URI"
          ],
          "type": "string",
          "description": "Optional. The delivery mode for the audio output."
        }
      },
      "description": "Configuration for audio output format.",
      "type": "object"
    },
    "AudioTranscription": {
      "type": "object",
      "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": {
          "items": {
            "$ref": "#/$defs/WordInfo"
          },
          "description": "Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set.",
          "type": "array"
        },
        "text": {
          "description": "Required. The transcription text of this audio segment.",
          "type": "string"
        },
        "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"
        }
      }
    },
    "AudioTranscriptionConfig": {
      "description": "The audio transcription configuration.",
      "properties": {
        "mode": {
          "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"
          ],
          "type": "string"
        },
        "customVocabulary": {
          "description": "Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms (product names, proper nouns, jargon).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "wordTimestamp": {
          "type": "boolean",
          "description": "Optional. Configures word-level timestamp generation."
        },
        "adaptationPhrases": {
          "description": "Optional. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms.",
          "items": {
            "type": "string"
          },
          "type": "array",
          "deprecated": true
        },
        "sourceText": {
          "type": "string",
          "description": "Optional. The source text to be edited or rewritten via voice instructions. When provided in `SMART` mode, the model evaluates the audio input against this text and emits the complete replacement text in the candidate response rather than appending to it."
        },
        "languageCodes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection."
        },
        "diarization": {
          "type": "boolean",
          "description": "Optional. Configures speaker diarization."
        },
        "languageHints": {
          "$ref": "#/$defs/LanguageHints",
          "description": "Optional. Specifies one or more languages in the audio."
        },
        "languageAuto": {
          "$ref": "#/$defs/LanguageAuto",
          "description": "Optional. The model will detect the language automatically."
        }
      },
      "type": "object"
    },
    "BatchStats": {
      "description": "Stats about the batch.",
      "properties": {
        "pendingRequestCount": {
          "description": "Output only. The number of requests that are still pending processing.",
          "format": "int64",
          "type": "string",
          "readOnly": true
        },
        "successfulRequestCount": {
          "description": "Output only. The number of requests that were successfully processed.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        },
        "failedRequestCount": {
          "description": "Output only. The number of requests that failed to be processed.",
          "format": "int64",
          "readOnly": true,
          "type": "string"
        },
        "requestCount": {
          "readOnly": true,
          "description": "Output only. The number of requests in the batch.",
          "type": "string",
          "format": "int64"
        }
      },
      "type": "object"
    },
    "Blob": {
      "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.",
      "properties": {
        "mimeType": {
          "type": "string",
          "description": "The IANA standard MIME type of the source data. Examples of supported types: - Images: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - Audio: audio/*, video/audio/s16le, video/audio/wav - Video: video/* - Text: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - Applications: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf For additional context, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types)."
        },
        "data": {
          "format": "byte",
          "description": "Raw bytes for media formats.",
          "type": "string"
        },
        "displayName": {
          "description": "Optional. Specifies the name used to refer to this blob to the model (e.g. \"my_blob.png\"). Used as the blob reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Candidate": {
      "description": "A response candidate generated from the model.",
      "properties": {
        "citationMetadata": {
          "$ref": "#/$defs/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."
        },
        "safetyRatings": {
          "items": {
            "$ref": "#/$defs/SafetyRating"
          },
          "description": "List of ratings for the safety of a response candidate. There is at most one rating per category.",
          "type": "array"
        },
        "tokenCount": {
          "type": "integer",
          "description": "Output only. Token count for this candidate.",
          "readOnly": true,
          "format": "int32"
        },
        "groundingMetadata": {
          "$ref": "#/$defs/GroundingMetadata",
          "description": "Output only. Grounding metadata for the candidate. This field is populated for `GenerateContent` calls."
        },
        "avgLogprobs": {
          "type": "number",
          "format": "double",
          "description": "Output only. Average log probability score of the candidate.",
          "readOnly": true
        },
        "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."
        },
        "urlContextMetadata": {
          "$ref": "#/$defs/UrlContextMetadata",
          "description": "Output only. Metadata related to url context retrieval tool."
        },
        "finishMessage": {
          "readOnly": true,
          "type": "string",
          "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set."
        },
        "logprobsResult": {
          "$ref": "#/$defs/LogprobsResult",
          "description": "Output only. Log-likelihood scores for the response tokens and top tokens"
        },
        "index": {
          "description": "Output only. Index of the candidate in the list of response candidates.",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        },
        "groundingAttributions": {
          "items": {
            "$ref": "#/$defs/GroundingAttribution"
          },
          "type": "array",
          "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls.",
          "readOnly": true
        },
        "content": {
          "$ref": "#/$defs/Content",
          "description": "Output only. Generated content returned from the model."
        },
        "finishReason": {
          "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"
          ],
          "description": "Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens."
        }
      },
      "type": "object"
    },
    "CitationMetadata": {
      "properties": {
        "citationSources": {
          "description": "Citations to sources for a specific response.",
          "items": {
            "$ref": "#/$defs/CitationSource"
          },
          "type": "array"
        }
      },
      "description": "A collection of source attributions for a piece of content.",
      "type": "object"
    },
    "CitationSource": {
      "type": "object",
      "description": "A citation to a source for a portion of a specific response.",
      "properties": {
        "license": {
          "type": "string",
          "description": "Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations."
        },
        "uri": {
          "type": "string",
          "description": "Optional. URI that is attributed as a source for a portion of the text."
        },
        "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"
        },
        "endIndex": {
          "format": "int32",
          "type": "integer",
          "description": "Optional. End of the attributed segment, exclusive."
        }
      }
    },
    "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.",
      "properties": {},
      "type": "object"
    },
    "CodeExecutionResult": {
      "type": "object",
      "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.",
      "properties": {
        "id": {
          "description": "Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id.",
          "type": "string"
        },
        "output": {
          "type": "string",
          "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise."
        },
        "outcome": {
          "type": "string",
          "enum": [
            "OUTCOME_UNSPECIFIED",
            "OUTCOME_OK",
            "OUTCOME_FAILED",
            "OUTCOME_DEADLINE_EXCEEDED"
          ],
          "description": "Required. Outcome of the code execution."
        }
      }
    },
    "ComputerUse": {
      "properties": {
        "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"
            ]
          }
        },
        "environment": {
          "enum": [
            "ENVIRONMENT_UNSPECIFIED",
            "ENVIRONMENT_BROWSER",
            "ENVIRONMENT_MOBILE",
            "ENVIRONMENT_DESKTOP"
          ],
          "type": "string",
          "description": "Required. The environment being operated."
        },
        "excludedPredefinedFunctions": {
          "description": "Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "enablePromptInjectionDetection": {
          "description": "Optional. Whether enable the prompt injection detection check on computer-use request.",
          "type": "boolean"
        }
      },
      "type": "object",
      "description": "Computer Use tool type."
    },
    "Content": {
      "properties": {
        "parts": {
          "type": "array",
          "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types.",
          "items": {
            "$ref": "#/$defs/Part"
          }
        },
        "role": {
          "description": "Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn."
    },
    "DynamicRetrievalConfig": {
      "type": "object",
      "properties": {
        "mode": {
          "description": "The mode of the predictor to be used in dynamic retrieval.",
          "enum": [
            "MODE_UNSPECIFIED",
            "MODE_DYNAMIC"
          ],
          "type": "string"
        },
        "dynamicThreshold": {
          "format": "float",
          "description": "The threshold to be used in dynamic retrieval. If not set, a system default value is used.",
          "type": "number"
        }
      },
      "description": "Describes the options to customize dynamic retrieval."
    },
    "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.",
      "properties": {
        "language": {
          "type": "string",
          "description": "Required. Programming language of the `code`.",
          "enum": [
            "LANGUAGE_UNSPECIFIED",
            "PYTHON"
          ]
        },
        "id": {
          "description": "Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`.",
          "type": "string"
        },
        "code": {
          "type": "string",
          "description": "Required. The code to be executed."
        }
      },
      "type": "object"
    },
    "FileData": {
      "properties": {
        "fileUri": {
          "description": "Required. URI.",
          "type": "string"
        },
        "displayName": {
          "description": "Optional. Specifies the name used to refer to this file to the model (e.g. \"my_file.pdf\"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`.",
          "type": "string"
        },
        "mimeType": {
          "description": "Optional. The IANA standard MIME type of the source data.",
          "type": "string"
        }
      },
      "description": "URI based data.",
      "type": "object"
    },
    "FileSearch": {
      "type": "object",
      "description": "The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.",
      "properties": {
        "topK": {
          "type": "integer",
          "description": "Optional. The number of semantic retrieval chunks to retrieve.",
          "format": "int32"
        },
        "metadataFilter": {
          "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks.",
          "type": "string"
        },
        "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"
        }
      }
    },
    "FunctionCall": {
      "properties": {
        "name": {
          "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.",
          "type": "string"
        },
        "args": {
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object."
          },
          "description": "Optional. The function parameters and values in JSON object format."
        },
        "id": {
          "description": "Optional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values."
    },
    "FunctionCallingConfig": {
      "description": "Configuration for specifying function calling behavior.",
      "type": "object",
      "properties": {
        "allowedFunctionNames": {
          "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.",
          "items": {
            "type": "string"
          }
        },
        "mode": {
          "description": "Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO.",
          "enum": [
            "MODE_UNSPECIFIED",
            "AUTO",
            "ANY",
            "NONE",
            "VALIDATED"
          ],
          "type": "string"
        }
      }
    },
    "FunctionDeclaration": {
      "properties": {
        "behavior": {
          "type": "string",
          "enum": [
            "UNSPECIFIED",
            "BLOCKING",
            "NON_BLOCKING"
          ],
          "description": "Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method."
        },
        "parameters": {
          "$ref": "#/$defs/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."
        },
        "description": {
          "type": "string",
          "description": "Required. A brief description of the function."
        },
        "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`."
        },
        "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`."
        },
        "response": {
          "$ref": "#/$defs/Schema",
          "description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function."
        },
        "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"
        }
      },
      "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."
    },
    "FunctionResponse": {
      "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.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`."
        },
        "scheduling": {
          "enum": [
            "SCHEDULING_UNSPECIFIED",
            "SILENT",
            "WHEN_IDLE",
            "INTERRUPT"
          ],
          "type": "string",
          "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."
        },
        "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` or `file_data.display_name` of a `FunctionResponsePart` holding the multimedia. See [Multimodal function responses](https://aistudio.google.com/docs/function-calling#multimodal)."
        },
        "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."
        },
        "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": {
          "type": "array",
          "description": "Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.",
          "items": {
            "$ref": "#/$defs/FunctionResponsePart"
          }
        }
      },
      "type": "object"
    },
    "FunctionResponseBlob": {
      "description": "Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.",
      "properties": {
        "displayName": {
          "description": "Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs, and to reference the blob from `FunctionResponse.response` (for example, via `{\"$ref\": \"DISPLAY_NAME\"}`).",
          "type": "string"
        },
        "data": {
          "type": "string",
          "description": "Raw bytes for media formats.",
          "format": "byte"
        },
        "mimeType": {
          "type": "string",
          "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://aistudio.google.com/docs/file-input-methods#supported-content-types)."
        }
      },
      "type": "object"
    },
    "FunctionResponseFileData": {
      "description": "URI based data for function response.",
      "properties": {
        "fileUri": {
          "description": "Required. URI.",
          "type": "string"
        },
        "mimeType": {
          "description": "The IANA standard MIME type of the source data. If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Multimodal function responses](https://aistudio.google.com/docs/function-calling#multimodal) and [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types).",
          "type": "string"
        },
        "displayName": {
          "type": "string",
          "description": "Optional. Display name of the file. Used to provide a label or filename to distinguish file data, and to reference the file from `FunctionResponse.response` (for example, via `{\"$ref\": \"DISPLAY_NAME\"}`)."
        }
      },
      "type": "object"
    },
    "FunctionResponsePart": {
      "properties": {
        "inlineData": {
          "$ref": "#/$defs/FunctionResponseBlob",
          "description": "Inline media bytes."
        },
        "mediaProcessing": {
          "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.",
          "enum": [
            "MEDIA_PROCESSING_UNSPECIFIED",
            "STATIC",
            "AGENTIC"
          ],
          "type": "string"
        },
        "fileData": {
          "$ref": "#/$defs/FunctionResponseFileData",
          "description": "URI based data."
        }
      },
      "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`. Media can be passed as raw bytes (`inline_data`) or by URI (`file_data`) with an IANA MIME type identifying the type and subtype of the media."
    },
    "GenerateContentBatchOutput": {
      "properties": {
        "responsesFile": {
          "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `GenerateContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests.",
          "type": "string",
          "readOnly": true
        },
        "inlinedResponses": {
          "$ref": "#/$defs/InlinedResponses",
          "description": "Output only. The responses to the requests in the batch. Returned when the batch was built using inlined requests. The responses will be in the same order as the input requests."
        }
      },
      "type": "object",
      "description": "The output of a batch request. This is returned in the `BatchGenerateContentResponse` or the `GenerateContentBatch.output` field."
    },
    "GenerateContentRequest": {
      "properties": {
        "toolConfig": {
          "$ref": "#/$defs/ToolConfig",
          "description": "Optional. Tool configuration for any `Tool` specified in the request. Refer to the [Function calling guide](https://aistudio.google.com/docs/function-calling#function_calling_modes) for a usage example."
        },
        "continuationToken": {
          "description": "Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request.",
          "type": "string",
          "format": "byte"
        },
        "model": {
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
          "type": "string"
        },
        "serviceTier": {
          "type": "string",
          "enum": [
            "unspecified",
            "standard",
            "flex",
            "priority"
          ],
          "description": "Optional. The service tier of the request."
        },
        "generationConfig": {
          "$ref": "#/$defs/GenerationConfig",
          "description": "Optional. Configuration options for model generation and outputs."
        },
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tool"
          },
          "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://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more."
        },
        "contents": {
          "items": {
            "$ref": "#/$defs/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://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request.",
          "type": "array"
        },
        "safetySettings": {
          "items": {
            "$ref": "#/$defs/SafetySetting"
          },
          "type": "array",
          "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://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications."
        },
        "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"
        },
        "cachedContent": {
          "type": "string",
          "description": "Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}`"
        },
        "systemInstruction": {
          "$ref": "#/$defs/Content",
          "description": "Optional. Developer set [system instruction(s)](https://aistudio.google.com/docs/text-generation#system-instructions). Currently, text only."
        },
        "store": {
          "description": "Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config.",
          "type": "boolean"
        }
      },
      "type": "object",
      "description": "Request to generate a completion from the model."
    },
    "GenerateContentResponse": {
      "type": "object",
      "description": "Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`.",
      "properties": {
        "modelVersion": {
          "description": "Output only. The model version used to generate the response.",
          "readOnly": true,
          "type": "string"
        },
        "responseId": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. response_id is used to identify each response."
        },
        "candidates": {
          "description": "Candidate responses from the model.",
          "items": {
            "$ref": "#/$defs/Candidate"
          },
          "type": "array"
        },
        "usageMetadata": {
          "$ref": "#/$defs/UsageMetadata",
          "description": "Output only. Metadata on the generation requests' token usage."
        },
        "promptFeedback": {
          "$ref": "#/$defs/PromptFeedback",
          "description": "Returns the prompt's feedback related to the content filters."
        },
        "modelStatus": {
          "$ref": "#/$defs/ModelStatus",
          "description": "Output only. The current model status of this model."
        }
      }
    },
    "GenerationConfig": {
      "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model.",
      "type": "object",
      "properties": {
        "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://aistudio.google.com/docs/file-input-methods#text-file-types) for a list of all supported text MIME types.",
          "type": "string"
        },
        "logprobs": {
          "description": "Optional. Only valid if response_logprobs=True. This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20].",
          "format": "int32",
          "type": "integer"
        },
        "speechConfig": {
          "$ref": "#/$defs/SpeechConfig",
          "description": "Optional. The speech generation config."
        },
        "frequencyPenalty": {
          "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.",
          "type": "number",
          "format": "float"
        },
        "responseFormat": {
          "$ref": "#/$defs/ResponseFormatConfig",
          "description": "Optional. Configuration for the response output format. Allows specifying output configuration per modality (text, audio, image) in a flat structure."
        },
        "imageConfig": {
          "$ref": "#/$defs/ImageConfig",
          "description": "Optional. Config for image generation. An error will be returned if this field is set for models that don't support these config options."
        },
        "_responseJsonSchema": {
          "description": "Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set. Deprecated. Use `response_format` instead.",
          "deprecated": true
        },
        "enableAffectiveDialog": {
          "type": "boolean",
          "description": "Optional. If enabled, the model will detect emotions and adapt its responses accordingly."
        },
        "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"
          ]
        },
        "presencePenalty": {
          "description": "Optional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response. This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequency_penalty for a penalty that increases with each use. A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary. A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary.",
          "type": "number",
          "format": "float"
        },
        "seed": {
          "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed.",
          "format": "int32",
          "type": "integer"
        },
        "responseSchema": {
          "$ref": "#/$defs/Schema",
          "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://aistudio.google.com/docs/structured-output) for more details. Deprecated. Use `response_format` instead."
        },
        "enableEnhancedCivicAnswers": {
          "description": "Optional. Enables enhanced civic answers. It may not be available for all models.",
          "type": "boolean"
        },
        "responseJsonSchema": {
          "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field."
        },
        "temperature": {
          "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned from the `getModel` function. Values can range from [0.0, 2.0]. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models.",
          "format": "float",
          "type": "number"
        },
        "thinkingConfig": {
          "$ref": "#/$defs/ThinkingConfig",
          "description": "Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking."
        },
        "candidateCount": {
          "type": "integer",
          "description": "Optional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family)",
          "format": "int32"
        },
        "maxOutputTokens": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. The maximum number of tokens to include in a response candidate. Note: The default value varies by model, see the `Model.output_token_limit` attribute of the `Model` returned from the `getModel` function."
        },
        "topP": {
          "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and Top-p (nucleus) sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models.",
          "type": "number",
          "format": "float"
        },
        "audioTranscriptionConfig": {
          "$ref": "#/$defs/AudioTranscriptionConfig",
          "description": "Optional. Config for audio transcription (speech recognition)."
        },
        "topK": {
          "format": "int32",
          "description": "Optional. The maximum number of tokens to consider when sampling. Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Models running with nucleus sampling don't allow top_k setting. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models.",
          "type": "integer"
        },
        "translationConfig": {
          "$ref": "#/$defs/TranslationConfig",
          "description": "Optional. Config for translation."
        },
        "responseModalities": {
          "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",
          "items": {
            "type": "string",
            "enum": [
              "MODALITY_UNSPECIFIED",
              "TEXT",
              "IMAGE",
              "AUDIO"
            ]
          }
        },
        "responseLogprobs": {
          "type": "boolean",
          "description": "Optional. If true, export the logprobs results in response."
        },
        "stopSequences": {
          "type": "array",
          "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."
        }
      }
    },
    "GoogleAiGenerativelanguageV1betaGroundingSupport": {
      "type": "object",
      "description": "Grounding support.",
      "properties": {
        "renderedParts": {
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "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,
          "type": "array"
        },
        "segment": {
          "$ref": "#/$defs/GoogleAiGenerativelanguageV1betaSegment",
          "description": "Segment of the content this support belongs to."
        },
        "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).",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "type": "array"
        },
        "confidenceScores": {
          "description": "Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.",
          "items": {
            "format": "float",
            "type": "number"
          },
          "type": "array"
        }
      }
    },
    "GoogleAiGenerativelanguageV1betaSegment": {
      "properties": {
        "startIndex": {
          "type": "integer",
          "format": "int32",
          "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero."
        },
        "partIndex": {
          "type": "integer",
          "format": "int32",
          "description": "The index of a Part object within its parent Content object."
        },
        "text": {
          "description": "The text corresponding to the segment from the response.",
          "type": "string"
        },
        "endIndex": {
          "description": "End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.",
          "type": "integer",
          "format": "int32"
        }
      },
      "type": "object",
      "description": "Segment of the content."
    },
    "GoogleMaps": {
      "properties": {
        "enableWidget": {
          "type": "boolean",
          "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."
        }
      },
      "description": "The GoogleMaps Tool that provides geospatial context for the user's query.",
      "type": "object"
    },
    "GoogleSearch": {
      "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.",
      "type": "object",
      "properties": {
        "searchTypes": {
          "$ref": "#/$defs/SearchTypes",
          "description": "Optional. The set of search types to enable. If not set, web search is enabled by default."
        },
        "timeRangeFilter": {
          "$ref": "#/$defs/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)."
        }
      }
    },
    "GoogleSearchRetrieval": {
      "description": "Tool to retrieve public web data for grounding, powered by Google.",
      "properties": {
        "dynamicRetrievalConfig": {
          "$ref": "#/$defs/DynamicRetrievalConfig",
          "description": "Specifies the dynamic retrieval configuration for the given source."
        }
      },
      "type": "object"
    },
    "GroundingAttribution": {
      "description": "Attribution for a source that contributed to an answer.",
      "properties": {
        "content": {
          "$ref": "#/$defs/Content",
          "description": "Grounding source content that makes up this attribution."
        },
        "sourceId": {
          "$ref": "#/$defs/AttributionSourceId",
          "description": "Output only. Identifier for the source contributing to this attribution."
        }
      },
      "type": "object"
    },
    "GroundingChunk": {
      "type": "object",
      "description": "A `GroundingChunk` represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps.",
      "properties": {
        "web": {
          "$ref": "#/$defs/Web",
          "description": "Grounding chunk from the web."
        },
        "maps": {
          "$ref": "#/$defs/Maps",
          "description": "Optional. Grounding chunk from Google Maps."
        },
        "retrievedContext": {
          "$ref": "#/$defs/RetrievedContext",
          "description": "Optional. Grounding chunk from context retrieved by the file search tool."
        },
        "image": {
          "$ref": "#/$defs/Image",
          "description": "Optional. Grounding chunk from image search."
        }
      }
    },
    "GroundingChunkCustomMetadata": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "Optional. The string value of the metadata."
        },
        "stringListValue": {
          "$ref": "#/$defs/GroundingChunkStringList",
          "description": "Optional. A list of string values for the metadata."
        },
        "numericValue": {
          "description": "Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used.",
          "format": "float",
          "type": "number"
        },
        "key": {
          "type": "string",
          "description": "The key of the metadata."
        }
      },
      "description": "User provided metadata about the GroundingFact."
    },
    "GroundingChunkStringList": {
      "description": "A list of string values.",
      "properties": {
        "values": {
          "type": "array",
          "description": "The string values of the list.",
          "items": {
            "type": "string"
          }
        }
      },
      "type": "object"
    },
    "GroundingMetadata": {
      "type": "object",
      "description": "Metadata returned to client when grounding is enabled.",
      "properties": {
        "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": "#/$defs/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."
        },
        "imageSearchQueries": {
          "description": "Image search queries used for grounding.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "retrievalMetadata": {
          "$ref": "#/$defs/RetrievalMetadata",
          "description": "Metadata related to retrieval in the grounding flow."
        },
        "searchEntryPoint": {
          "$ref": "#/$defs/SearchEntryPoint",
          "description": "Optional. Google search entry for the following-up web searches."
        },
        "groundingSupports": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GoogleAiGenerativelanguageV1betaGroundingSupport"
          },
          "description": "List of grounding support."
        },
        "webSearchQueries": {
          "items": {
            "type": "string"
          },
          "description": "Web search queries for the following-up web search.",
          "type": "array"
        }
      }
    },
    "GroundingPassageId": {
      "description": "Identifier for a part within a `GroundingPassage`.",
      "type": "object",
      "properties": {
        "passageId": {
          "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`.",
          "readOnly": true,
          "type": "string"
        },
        "partIndex": {
          "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`.",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        }
      }
    },
    "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": {
          "description": "The root domain of the web page that the image is from, e.g. \"example.com\".",
          "type": "string"
        },
        "imageUri": {
          "description": "The image asset URL.",
          "type": "string"
        },
        "sourceUri": {
          "type": "string",
          "description": "The web page URI for attribution."
        }
      }
    },
    "ImageConfig": {
      "properties": {
        "imageSize": {
          "type": "string",
          "description": "Optional. Specifies the size of generated images. Supported values are `512`, `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`."
        },
        "aspectRatio": {
          "description": "Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`. If not specified, the model will choose a default aspect ratio based on any reference images provided.",
          "type": "string"
        }
      },
      "description": "Config for image generation features.",
      "type": "object"
    },
    "ImageResponseFormat": {
      "description": "Configuration for image output format.",
      "properties": {
        "mimeType": {
          "type": "string",
          "enum": [
            "MIME_TYPE_UNSPECIFIED",
            "IMAGE_JPEG"
          ],
          "description": "Optional. The MIME type of the image output."
        },
        "imageSize": {
          "type": "string",
          "description": "Optional. The size of the image output.",
          "enum": [
            "IMAGE_SIZE_UNSPECIFIED",
            "IMAGE_SIZE_FIVE_TWELVE",
            "IMAGE_SIZE_ONE_K",
            "IMAGE_SIZE_TWO_K",
            "IMAGE_SIZE_FOUR_K"
          ]
        },
        "aspectRatio": {
          "type": "string",
          "description": "Optional. The aspect ratio for the image output.",
          "enum": [
            "ASPECT_RATIO_UNSPECIFIED",
            "ASPECT_RATIO_ONE_BY_ONE",
            "ASPECT_RATIO_TWO_BY_THREE",
            "ASPECT_RATIO_THREE_BY_TWO",
            "ASPECT_RATIO_THREE_BY_FOUR",
            "ASPECT_RATIO_FOUR_BY_THREE",
            "ASPECT_RATIO_FOUR_BY_FIVE",
            "ASPECT_RATIO_FIVE_BY_FOUR",
            "ASPECT_RATIO_NINE_BY_SIXTEEN",
            "ASPECT_RATIO_SIXTEEN_BY_NINE",
            "ASPECT_RATIO_TWENTY_ONE_BY_NINE",
            "ASPECT_RATIO_ONE_BY_EIGHT",
            "ASPECT_RATIO_EIGHT_BY_ONE",
            "ASPECT_RATIO_ONE_BY_FOUR",
            "ASPECT_RATIO_FOUR_BY_ONE"
          ]
        },
        "delivery": {
          "description": "Optional. The delivery mode for the image output.",
          "enum": [
            "DELIVERY_UNSPECIFIED",
            "INLINE",
            "URI"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "ImageSearch": {
      "properties": {},
      "description": "Image search for grounding and related configurations.",
      "type": "object"
    },
    "InlinedRequest": {
      "description": "The request to be processed in the batch.",
      "properties": {
        "request": {
          "$ref": "#/$defs/GenerateContentRequest",
          "description": "Required. The request to be processed in the batch."
        },
        "metadata": {
          "additionalProperties": {
            "description": "Properties of the object."
          },
          "description": "Optional. The metadata to be associated with the request.",
          "type": "object"
        }
      },
      "type": "object"
    },
    "InlinedRequests": {
      "properties": {
        "requests": {
          "description": "Required. The requests to be processed in the batch.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/InlinedRequest"
          }
        }
      },
      "description": "The requests to be processed in the batch if provided as part of the batch creation request.",
      "type": "object"
    },
    "InlinedResponse": {
      "type": "object",
      "description": "The response to a single request in the batch.",
      "properties": {
        "error": {
          "$ref": "#/$defs/Status",
          "description": "Output only. The error encountered while processing the request."
        },
        "metadata": {
          "description": "Output only. The metadata associated with the request.",
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object."
          },
          "readOnly": true
        },
        "response": {
          "$ref": "#/$defs/GenerateContentResponse",
          "description": "Output only. The response to the request."
        }
      }
    },
    "InlinedResponses": {
      "description": "The responses to the requests in the batch.",
      "properties": {
        "inlinedResponses": {
          "items": {
            "$ref": "#/$defs/InlinedResponse"
          },
          "description": "Output only. The responses to the requests in the batch.",
          "readOnly": true,
          "type": "array"
        }
      },
      "type": "object"
    },
    "InputConfig": {
      "description": "Configures the input to the batch request.",
      "properties": {
        "fileName": {
          "description": "The name of the `File` containing the input requests.",
          "type": "string"
        },
        "requests": {
          "$ref": "#/$defs/InlinedRequests",
          "description": "The requests to be processed in the batch."
        }
      },
      "type": "object"
    },
    "Interval": {
      "type": "object",
      "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.",
          "format": "google-datetime"
        },
        "endTime": {
          "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.",
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "LanguageAuto": {
      "properties": {},
      "description": "Indicates the language of the audio should be automatically detected.",
      "type": "object",
      "deprecated": true
    },
    "LanguageHints": {
      "properties": {
        "languageCodes": {
          "description": "Required. BCP-47 language codes.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "deprecated": true
        }
      },
      "type": "object",
      "description": "Provides hints to the model about possible languages present in the audio.",
      "deprecated": true
    },
    "LatLng": {
      "properties": {
        "latitude": {
          "type": "number",
          "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
          "format": "double"
        },
        "longitude": {
          "format": "double",
          "type": "number",
          "description": "The longitude in degrees. It must be in the range [-180.0, +180.0]."
        }
      },
      "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.",
      "type": "object"
    },
    "LogprobsResult": {
      "properties": {
        "chosenCandidates": {
          "items": {
            "$ref": "#/$defs/LogprobsResultCandidate"
          },
          "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.",
          "type": "array"
        },
        "topCandidates": {
          "description": "Length = total number of decoding steps.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TopCandidates"
          }
        },
        "logProbabilitySum": {
          "description": "Sum of log probabilities for all tokens.",
          "type": "number",
          "format": "float"
        }
      },
      "type": "object",
      "description": "Logprobs Result"
    },
    "LogprobsResultCandidate": {
      "type": "object",
      "description": "Candidate for the logprobs token and score.",
      "properties": {
        "logProbability": {
          "type": "number",
          "description": "The candidate's log probability.",
          "format": "float"
        },
        "token": {
          "type": "string",
          "description": "The candidate’s token string value."
        },
        "tokenId": {
          "format": "int32",
          "description": "The candidate’s token id value.",
          "type": "integer"
        }
      }
    },
    "Maps": {
      "properties": {
        "title": {
          "description": "Title of the place.",
          "type": "string"
        },
        "uri": {
          "description": "URI reference of the place.",
          "type": "string"
        },
        "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": {
          "type": "string",
          "description": "Text description of the place answer."
        },
        "placeAnswerSources": {
          "$ref": "#/$defs/PlaceAnswerSources",
          "description": "Sources that provide answers about the features of a given place in Google Maps."
        }
      },
      "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.",
      "type": "object"
    },
    "McpServer": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the MCPServer."
        },
        "streamableHttpTransport": {
          "$ref": "#/$defs/StreamableHttpTransport",
          "description": "A transport that can stream HTTP requests and responses."
        }
      },
      "type": "object",
      "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."
    },
    "ModalityTokenCount": {
      "type": "object",
      "properties": {
        "modality": {
          "enum": [
            "MODALITY_UNSPECIFIED",
            "TEXT",
            "IMAGE",
            "VIDEO",
            "AUDIO",
            "DOCUMENT"
          ],
          "description": "The modality associated with this token count.",
          "type": "string"
        },
        "tokenCount": {
          "format": "int32",
          "type": "integer",
          "description": "Number of tokens."
        }
      },
      "description": "Represents token counting info for a single modality."
    },
    "ModelStatus": {
      "description": "The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable.",
      "type": "object",
      "properties": {
        "modelStage": {
          "description": "The stage of the underlying model.",
          "type": "string",
          "enum": [
            "MODEL_STAGE_UNSPECIFIED",
            "UNSTABLE_EXPERIMENTAL",
            "EXPERIMENTAL",
            "PREVIEW",
            "STABLE",
            "LEGACY",
            "DEPRECATED",
            "RETIRED"
          ]
        },
        "retirementTime": {
          "format": "google-datetime",
          "description": "The time at which the model will be retired.",
          "type": "string"
        },
        "message": {
          "description": "A message explaining the model status.",
          "type": "string"
        }
      }
    },
    "MultiSpeakerVoiceConfig": {
      "type": "object",
      "description": "The configuration for the multi-speaker setup.",
      "properties": {
        "speakerVoiceConfigs": {
          "items": {
            "$ref": "#/$defs/SpeakerVoiceConfig"
          },
          "type": "array",
          "description": "Required. All the enabled speaker voices."
        }
      }
    },
    "Part": {
      "properties": {
        "executableCode": {
          "$ref": "#/$defs/ExecutableCode",
          "description": "Code generated by the model that is meant to be executed."
        },
        "codeExecutionResult": {
          "$ref": "#/$defs/CodeExecutionResult",
          "description": "Result of executing the `ExecutableCode`."
        },
        "functionResponse": {
          "$ref": "#/$defs/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."
        },
        "inlineData": {
          "$ref": "#/$defs/Blob",
          "description": "Inline media bytes."
        },
        "thought": {
          "description": "Optional. Indicates if the part is thought from the model.",
          "type": "boolean"
        },
        "toolResponse": {
          "$ref": "#/$defs/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`."
        },
        "toolCall": {
          "$ref": "#/$defs/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."
        },
        "videoMetadata": {
          "$ref": "#/$defs/VideoMetadata",
          "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data."
        },
        "mediaProcessing": {
          "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",
          "enum": [
            "MEDIA_PROCESSING_UNSPECIFIED",
            "STATIC",
            "AGENTIC"
          ]
        },
        "functionCall": {
          "$ref": "#/$defs/FunctionCall",
          "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values."
        },
        "mediaResolution": {
          "$ref": "#/$defs/V1mainMediaResolution",
          "description": "Optional. Media resolution for the input media."
        },
        "partMetadata": {
          "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.",
          "additionalProperties": {
            "description": "Properties of the object."
          },
          "type": "object"
        },
        "fileData": {
          "$ref": "#/$defs/FileData",
          "description": "URI based data."
        },
        "thoughtSignature": {
          "type": "string",
          "format": "byte",
          "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests."
        },
        "text": {
          "type": "string",
          "description": "Inline text."
        },
        "audioTranscription": {
          "$ref": "#/$defs/AudioTranscription",
          "description": "Optional. Audio (input or output) transcription. This is only set when this Part contains audio data."
        },
        "speechMetadata": {
          "$ref": "#/$defs/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."
        }
      },
      "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": {
      "type": "object",
      "properties": {
        "reviewSnippets": {
          "description": "Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/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."
    },
    "PrebuiltVoiceConfig": {
      "properties": {
        "voiceName": {
          "type": "string",
          "description": "Optional. The name of the preset voice to use."
        }
      },
      "type": "object",
      "description": "The configuration for the prebuilt speaker to use."
    },
    "PromptFeedback": {
      "properties": {
        "blockReason": {
          "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.",
          "type": "string",
          "enum": [
            "BLOCK_REASON_UNSPECIFIED",
            "SAFETY",
            "OTHER",
            "BLOCKLIST",
            "PROHIBITED_CONTENT",
            "IMAGE_SAFETY"
          ]
        },
        "safetyRatings": {
          "items": {
            "$ref": "#/$defs/SafetyRating"
          },
          "type": "array",
          "description": "Ratings for safety of the prompt. There is at most one rating per category."
        }
      },
      "type": "object",
      "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`."
    },
    "ResponseFormatConfig": {
      "type": "object",
      "properties": {
        "text": {
          "$ref": "#/$defs/TextResponseFormat",
          "description": "Optional. Text output format configuration."
        },
        "audio": {
          "$ref": "#/$defs/AudioResponseFormat",
          "description": "Optional. Audio output format configuration."
        },
        "image": {
          "$ref": "#/$defs/ImageResponseFormat",
          "description": "Optional. Image 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."
    },
    "RetrievalConfig": {
      "type": "object",
      "properties": {
        "latLng": {
          "$ref": "#/$defs/LatLng",
          "description": "Optional. The location of the user."
        },
        "languageCode": {
          "type": "string",
          "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)."
        }
      },
      "description": "Retrieval config."
    },
    "RetrievalMetadata": {
      "type": "object",
      "description": "Metadata related to retrieval in the grounding flow.",
      "properties": {
        "googleSearchDynamicRetrievalScore": {
          "type": "number",
          "description": "Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search.",
          "format": "float"
        }
      }
    },
    "RetrievedContext": {
      "properties": {
        "mediaId": {
          "type": "string",
          "description": "Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}"
        },
        "text": {
          "description": "Optional. Text of the chunk.",
          "type": "string"
        },
        "fileSearchStore": {
          "type": "string",
          "description": "Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`"
        },
        "uri": {
          "description": "Optional. URI reference of the semantic retrieval document.",
          "type": "string"
        },
        "pageNumber": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Page number of the retrieved context, if applicable."
        },
        "title": {
          "description": "Optional. Title of the document.",
          "type": "string"
        },
        "customMetadata": {
          "type": "array",
          "description": "Optional. User-provided metadata about the retrieved context.",
          "items": {
            "$ref": "#/$defs/GroundingChunkCustomMetadata"
          }
        }
      },
      "type": "object",
      "description": "Chunk from context retrieved by the file search tool."
    },
    "ReviewSnippet": {
      "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.",
      "properties": {
        "reviewId": {
          "description": "The ID of the review snippet.",
          "type": "string"
        },
        "googleMapsUri": {
          "description": "A link that corresponds to the user review on Google Maps.",
          "type": "string"
        },
        "title": {
          "description": "Title of the review.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SafetyRating": {
      "description": "Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.",
      "type": "object",
      "properties": {
        "blocked": {
          "type": "boolean",
          "description": "Was this content blocked because of this rating?"
        },
        "probability": {
          "enum": [
            "HARM_PROBABILITY_UNSPECIFIED",
            "NEGLIGIBLE",
            "LOW",
            "MEDIUM",
            "HIGH"
          ],
          "description": "Required. The probability of harm for this content.",
          "type": "string"
        },
        "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."
        }
      }
    },
    "SafetySetting": {
      "type": "object",
      "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.",
      "properties": {
        "category": {
          "description": "Required. The category for this setting.",
          "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"
        },
        "threshold": {
          "description": "Required. Controls the probability threshold at which harm is blocked.",
          "type": "string",
          "enum": [
            "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
            "BLOCK_LOW_AND_ABOVE",
            "BLOCK_MEDIUM_AND_ABOVE",
            "BLOCK_ONLY_HIGH",
            "BLOCK_NONE",
            "OFF"
          ]
        }
      }
    },
    "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": {
        "enum": {
          "type": "array",
          "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\"]}"
        },
        "minItems": {
          "format": "int64",
          "description": "Optional. Minimum number of the elements for Type.ARRAY.",
          "type": "string"
        },
        "minLength": {
          "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING",
          "format": "int64",
          "type": "string"
        },
        "minProperties": {
          "description": "Optional. Minimum number of the properties for Type.OBJECT.",
          "format": "int64",
          "type": "string"
        },
        "maximum": {
          "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER",
          "type": "number",
          "format": "double"
        },
        "required": {
          "items": {
            "type": "string"
          },
          "description": "Optional. Required properties of Type.OBJECT.",
          "type": "array"
        },
        "items": {
          "$ref": "#/$defs/Schema",
          "description": "Optional. Schema of the elements of Type.ARRAY."
        },
        "nullable": {
          "description": "Optional. Indicates if the value may be null.",
          "type": "boolean"
        },
        "anyOf": {
          "type": "array",
          "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.",
          "items": {
            "$ref": "#/$defs/Schema"
          }
        },
        "maxLength": {
          "type": "string",
          "description": "Optional. Maximum length of the Type.STRING",
          "format": "int64"
        },
        "maxProperties": {
          "type": "string",
          "format": "int64",
          "description": "Optional. Maximum number of the properties for Type.OBJECT."
        },
        "pattern": {
          "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression.",
          "type": "string"
        },
        "maxItems": {
          "description": "Optional. Maximum number of the elements for Type.ARRAY.",
          "type": "string",
          "format": "int64"
        },
        "minimum": {
          "format": "double",
          "type": "number",
          "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum 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."
        },
        "title": {
          "description": "Optional. The title of the schema.",
          "type": "string"
        },
        "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"
          }
        },
        "format": {
          "type": "string",
          "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality."
        },
        "properties": {
          "additionalProperties": {
            "$ref": "#/$defs/Schema"
          },
          "type": "object",
          "description": "Optional. Properties of Type.OBJECT."
        },
        "type": {
          "type": "string",
          "description": "Required. Data type.",
          "enum": [
            "TYPE_UNSPECIFIED",
            "STRING",
            "NUMBER",
            "INTEGER",
            "BOOLEAN",
            "ARRAY",
            "OBJECT",
            "NULL"
          ]
        },
        "description": {
          "type": "string",
          "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown."
        }
      }
    },
    "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": {
          "format": "byte",
          "description": "Optional. Base64 encoded JSON representing array of tuple.",
          "type": "string"
        }
      },
      "description": "Google search entry point."
    },
    "SearchTypes": {
      "description": "Different types of search that can be enabled on the GoogleSearch tool.",
      "type": "object",
      "properties": {
        "imageSearch": {
          "$ref": "#/$defs/ImageSearch",
          "description": "Optional. Enables image search. Image bytes are returned."
        },
        "webSearch": {
          "$ref": "#/$defs/WebSearch",
          "description": "Optional. Enables web search. Only text results are returned."
        }
      }
    },
    "SemanticRetrieverChunk": {
      "type": "object",
      "properties": {
        "source": {
          "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`",
          "type": "string",
          "readOnly": true
        },
        "chunk": {
          "type": "string",
          "readOnly": true,
          "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`."
    },
    "SpeakerVoiceConfig": {
      "description": "The configuration for a single speaker in a multi speaker setup.",
      "type": "object",
      "properties": {
        "voiceConfig": {
          "$ref": "#/$defs/VoiceConfig",
          "description": "Required. The configuration for the voice to use."
        },
        "speaker": {
          "description": "Required. The name of the speaker to use. Should be the same as in the prompt.",
          "type": "string"
        }
      }
    },
    "SpeechConfig": {
      "type": "object",
      "properties": {
        "multiSpeakerVoiceConfig": {
          "$ref": "#/$defs/MultiSpeakerVoiceConfig",
          "description": "Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field."
        },
        "voiceConfig": {
          "$ref": "#/$defs/VoiceConfig",
          "description": "The configuration in case of single-voice output."
        },
        "languageCode": {
          "description": "Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code that the user configured the app to use. Used for speech recognition and synthesis. Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`, `fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`, `ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and `th-TH`.",
          "type": "string"
        }
      },
      "description": "Config for speech generation and transcription."
    },
    "SpeechMetadata": {
      "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"
        }
      },
      "type": "object"
    },
    "Status": {
      "properties": {
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            }
          }
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "code": {
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object",
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
    },
    "StreamableHttpTransport": {
      "properties": {
        "url": {
          "type": "string",
          "description": "The full URL for the MCPServer endpoint. Example: \"https://api.example.com/mcp\""
        },
        "sseReadTimeout": {
          "description": "Timeout for SSE read operations.",
          "type": "string",
          "format": "google-duration"
        },
        "headers": {
          "description": "Optional: Fields for authentication headers, timeouts, etc., if needed.",
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "timeout": {
          "format": "google-duration",
          "description": "HTTP timeout for regular operations.",
          "type": "string"
        },
        "terminateOnClose": {
          "type": "boolean",
          "description": "Whether to close the client session when the transport closes."
        }
      },
      "description": "A transport that can stream HTTP requests and responses.",
      "type": "object"
    },
    "TextResponseFormat": {
      "description": "Configuration for text output format.",
      "properties": {
        "schema": {
          "description": "Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON."
        },
        "mimeType": {
          "description": "Optional. The MIME type of the text output.",
          "type": "string",
          "enum": [
            "MIME_TYPE_UNSPECIFIED",
            "APPLICATION_JSON",
            "TEXT_PLAIN"
          ]
        }
      },
      "type": "object"
    },
    "ThinkingConfig": {
      "description": "Config for thinking features.",
      "properties": {
        "includeThoughts": {
          "type": "boolean",
          "description": "Indicates whether to include thoughts in the response. If true, thoughts are returned only when available."
        },
        "thinkingBudget": {
          "format": "int32",
          "type": "integer",
          "description": "The number of thoughts tokens that the model should generate."
        },
        "thinkingLevel": {
          "enum": [
            "THINKING_LEVEL_UNSPECIFIED",
            "MINIMAL",
            "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://aistudio.google.com/docs/thinking#thinking-levels) for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Tool": {
      "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.",
      "type": "object",
      "properties": {
        "urlContext": {
          "$ref": "#/$defs/UrlContext",
          "description": "Optional. Tool to support URL context retrieval."
        },
        "googleSearchRetrieval": {
          "$ref": "#/$defs/GoogleSearchRetrieval",
          "description": "Optional. Retrieval tool that is powered by Google search."
        },
        "fileSearch": {
          "$ref": "#/$defs/FileSearch",
          "description": "Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora."
        },
        "googleSearch": {
          "$ref": "#/$defs/GoogleSearch",
          "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google."
        },
        "codeExecution": {
          "$ref": "#/$defs/CodeExecution",
          "description": "Optional. Enables the model to execute code as part of generation."
        },
        "mcpServers": {
          "type": "array",
          "description": "Optional. MCP Servers to connect to.",
          "items": {
            "$ref": "#/$defs/McpServer"
          }
        },
        "computerUse": {
          "$ref": "#/$defs/ComputerUse",
          "description": "Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations."
        },
        "functionDeclarations": {
          "items": {
            "$ref": "#/$defs/FunctionDeclaration"
          },
          "description": "Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role \"function\" generation context for the next model turn.",
          "type": "array"
        },
        "googleMaps": {
          "$ref": "#/$defs/GoogleMaps",
          "description": "Optional. Tool that allows grounding the model's response with geospatial context related to the user's query."
        }
      }
    },
    "ToolCall": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`.",
          "type": "string"
        },
        "toolName": {
          "type": "string",
          "description": "Optional. The name of the tool that was called."
        },
        "args": {
          "additionalProperties": {
            "description": "Properties of the object."
          },
          "type": "object",
          "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}"
        },
        "toolType": {
          "type": "string",
          "enum": [
            "TOOL_TYPE_UNSPECIFIED",
            "GOOGLE_SEARCH_WEB",
            "GOOGLE_SEARCH_IMAGE",
            "URL_CONTEXT",
            "GOOGLE_MAPS",
            "FILE_SEARCH",
            "MEDIA_PROCESSING"
          ],
          "description": "Required. The type of tool that was called."
        }
      },
      "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`."
    },
    "ToolConfig": {
      "type": "object",
      "description": "The Tool configuration containing parameters for specifying `Tool` use in the request.",
      "properties": {
        "includeServerSideToolInvocations": {
          "type": "boolean",
          "description": "Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions."
        },
        "retrievalConfig": {
          "$ref": "#/$defs/RetrievalConfig",
          "description": "Optional. Retrieval config."
        },
        "functionCallingConfig": {
          "$ref": "#/$defs/FunctionCallingConfig",
          "description": "Optional. Function calling config."
        }
      }
    },
    "ToolResponse": {
      "description": "The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Optional. The identifier of the tool call this response is for.",
          "type": "string"
        },
        "toolType": {
          "description": "Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`.",
          "enum": [
            "TOOL_TYPE_UNSPECIFIED",
            "GOOGLE_SEARCH_WEB",
            "GOOGLE_SEARCH_IMAGE",
            "URL_CONTEXT",
            "GOOGLE_MAPS",
            "FILE_SEARCH",
            "MEDIA_PROCESSING"
          ],
          "type": "string"
        },
        "response": {
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object."
          },
          "description": "Optional. The tool response."
        }
      }
    },
    "TopCandidates": {
      "properties": {
        "candidates": {
          "items": {
            "$ref": "#/$defs/LogprobsResultCandidate"
          },
          "description": "Sorted by log probability in descending order.",
          "type": "array"
        }
      },
      "type": "object",
      "description": "Candidates with top log probabilities at each decoding step."
    },
    "TranslationConfig": {
      "description": "Config for translation features.",
      "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": {
          "description": "Required. The target language for translation. Supported values are BCP-47 language codes (e.g. \"en\", \"es\", \"fr\").",
          "type": "string"
        }
      },
      "type": "object"
    },
    "UrlContext": {
      "description": "Tool to support URL context retrieval.",
      "properties": {},
      "type": "object"
    },
    "UrlContextMetadata": {
      "properties": {
        "urlMetadata": {
          "items": {
            "$ref": "#/$defs/UrlMetadata"
          },
          "type": "array",
          "description": "List of url context."
        }
      },
      "description": "Metadata related to url context retrieval tool.",
      "type": "object"
    },
    "UrlMetadata": {
      "description": "Context of the a single url retrieval.",
      "type": "object",
      "properties": {
        "retrievedUrl": {
          "type": "string",
          "description": "Retrieved url by the tool."
        },
        "urlRetrievalStatus": {
          "type": "string",
          "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."
        }
      }
    },
    "UsageMetadata": {
      "type": "object",
      "properties": {
        "thoughtsTokenCount": {
          "description": "Output only. Number of tokens of thoughts for thinking models.",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "candidatesTokenCount": {
          "format": "int32",
          "type": "integer",
          "description": "Total number of tokens across all the generated response candidates."
        },
        "promptTokensDetails": {
          "description": "Output only. List of modalities that were processed in the request input.",
          "items": {
            "$ref": "#/$defs/ModalityTokenCount"
          },
          "type": "array",
          "readOnly": true
        },
        "toolUsePromptTokenCount": {
          "type": "integer",
          "format": "int32",
          "description": "Output only. Number of tokens present in tool-use prompt(s).",
          "readOnly": true
        },
        "promptTokenCount": {
          "description": "Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.",
          "type": "integer",
          "format": "int32"
        },
        "cacheTokensDetails": {
          "description": "Output only. List of modalities of the cached content in the request input.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/ModalityTokenCount"
          }
        },
        "candidatesTokensDetails": {
          "description": "Output only. List of modalities that were returned in the response.",
          "items": {
            "$ref": "#/$defs/ModalityTokenCount"
          },
          "type": "array",
          "readOnly": true
        },
        "cachedContentTokenCount": {
          "description": "Number of tokens in the cached part of the prompt (the cached content)",
          "type": "integer",
          "format": "int32"
        },
        "totalTokenCount": {
          "description": "Total token count for the generation request (prompt + tool-use prompt + thoughts + response candidates).",
          "format": "int32",
          "type": "integer"
        },
        "serviceTier": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Service tier of the request.",
          "enum": [
            "unspecified",
            "standard",
            "flex",
            "priority"
          ]
        },
        "toolUsePromptTokensDetails": {
          "items": {
            "$ref": "#/$defs/ModalityTokenCount"
          },
          "description": "Output only. List of modalities that were processed for tool-use request inputs.",
          "readOnly": true,
          "type": "array"
        }
      },
      "description": "Metadata on the generation request's token usage."
    },
    "V1mainMediaResolution": {
      "properties": {
        "level": {
          "enum": [
            "MEDIA_RESOLUTION_UNSPECIFIED",
            "MEDIA_RESOLUTION_LOW",
            "MEDIA_RESOLUTION_MEDIUM",
            "MEDIA_RESOLUTION_HIGH",
            "MEDIA_RESOLUTION_ULTRA_HIGH"
          ],
          "description": "The tokenization quality used for given media. for Gemini API support .",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Media resolution for tokenization."
    },
    "VideoMetadata": {
      "properties": {
        "endOffset": {
          "type": "string",
          "format": "google-duration",
          "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"
        }
      },
      "description": "Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers).",
      "type": "object"
    },
    "VoiceConfig": {
      "properties": {
        "voice": {
          "type": "string",
          "description": "Optional. The speaker identifier for synthesis. Supported formats: * Speaker name for prebuilt voices (for example, `Orus` or `Kore`). * Voice ID for stored voices (for example, `voice_xxx`). * Voice replication key (for example, `voicekey_xxx`)."
        },
        "prebuiltVoiceConfig": {
          "$ref": "#/$defs/PrebuiltVoiceConfig",
          "description": "The configuration for the prebuilt voice to use."
        }
      },
      "description": "The configuration for the voice to use.",
      "type": "object"
    },
    "Web": {
      "description": "Chunk from the web.",
      "properties": {
        "title": {
          "description": "Output only. Title of the chunk.",
          "type": "string",
          "readOnly": true
        },
        "uri": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. URI reference of the chunk."
        }
      },
      "type": "object"
    },
    "WebSearch": {
      "properties": {},
      "description": "Standard web search for grounding and related configurations.",
      "type": "object"
    },
    "WordInfo": {
      "description": "Information about a single recognized word.",
      "properties": {
        "word": {
          "type": "string",
          "description": "Required. Transcript of the word."
        },
        "startOffset": {
          "format": "google-duration",
          "description": "Optional. Start offset in time of the word relative to the start of the audio.",
          "type": "string"
        },
        "endOffset": {
          "format": "google-duration",
          "description": "Optional. End offset in time of the word relative to the start of the audio.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}