openapi: 3.0.0
info:
  title: Gemini API
  description: 'The Gemini API allows developers to build generative AI
    applications using Gemini models. Gemini is our most capable model, built
    from the ground up to be multimodal. It can generalize and seamlessly
    understand, operate across, and combine different types of information
    including language, images, audio, video, and code. You can use the Gemini
    API for use cases like reasoning across text and images, content generation,
    dialogue agents, summarization and classification systems, and more.


    Generated from the official Google Discovery document for the Gemini API
    (generativelanguage v1beta).

    Source: https://ai.google.dev/gemini-api/docs'
  contact:
    name: Google
    url: https://google.com
  version: v1beta
  license:
    name: Creative Commons Attribution 3.0
    url: http://creativecommons.org/licenses/by/3.0/
  termsOfService: https://developers.google.com/terms/
paths:
  /v1beta/{+name}:
    get:
      description:
        Gets the latest state of a long-running operation. Clients can use this
        method to poll the operation result at intervals as recommended by the
        API service.
      operationId: generativelanguage.models.operations.get
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Operation'
      parameters:
        - name: name
          in: path
          description: The name of the operation resource.
          required: true
          schema:
            type: string
        - name: filter
          in: query
          description: The standard list filter.
          schema:
            type: string
        - name: pageSize
          in: query
          description: The standard list page size.
          schema:
            type: integer
        - name: pageToken
          in: query
          description: The standard list page token.
          schema:
            type: string
        - name: returnPartialSuccess
          in: query
          description:
            When set to `true`, operations that are reachable are returned as
            normal, and those that are unreachable are returned in the
            ListOperationsResponse.unreachable field. This can only be `true`
            when reading across collections. For example, when `parent` is set
            to `"projects/example/locations/-"`. This field is not supported by
            default and will result in an `UNIMPLEMENTED` error if set unless
            explicitly documented otherwise in service or product specific
            documentation.
          schema:
            type: boolean
      tags:
        - models
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
    delete:
      description: Deletes (revokes) an interaction auth token (HTTP).
      operationId: generativelanguage.interactions.auth_tokens.delete
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/HttpBody'
      parameters:
        - name: name
          in: path
          description:
            Required. Resource name of the token to revoke, in the form
            `interactions/{interaction_id}/auth_tokens/{token}`, where `{token}`
            is the hex token string returned by `CreateInteractionAuthToken`
            (the `auth_token` value without its `auth_tokens/` prefix).
          required: true
          schema:
            type: string
        - name: force
          in: query
          description:
            Optional. If set to true, any `Chunk`s and objects related to this
            `Document` will also be deleted. If false (the default), a
            `FAILED_PRECONDITION` error will be returned if `Document` contains
            any `Chunk`s.
          schema:
            type: boolean
      tags:
        - interactions
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
    patch:
      description: Updates the permission.
      operationId: generativelanguage.tunedModels.permissions.patch
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Permission'
      parameters:
        - name: name
          in: path
          description:
            'Output only. Identifier. The permission name. A unique name will be
            generated on create. Examples:
            tunedModels/{tuned_model}/permissions/{permission}
            corpora/{corpus}/permissions/{permission} Output only.'
          required: true
          schema:
            type: string
        - name: updateMask
          in: query
          description:
            'Required. The list of fields to update. Accepted ones: - role
            (`Permission.role` field)'
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/Permission'
      tags:
        - tunedModels
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/corpora:
    get:
      description: Lists all `Corpora` owned by the user.
      operationId: generativelanguage.corpora.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListCorporaResponse'
      parameters:
        - name: pageSize
          in: query
          description:
            Optional. The maximum number of `Corpora` to return (per page). The
            service may return fewer `Corpora`. If unspecified, at most 10
            `Corpora` will be returned. The maximum size limit is 20 `Corpora`
            per page.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token, received from a previous `ListCorpora` call.
            Provide the `next_page_token` returned in the response as an
            argument to the next request to retrieve the next page. When
            paginating, all other parameters provided to `ListCorpora` must
            match the call that provided the page token.
          schema:
            type: string
      tags:
        - corpora
    post:
      description: Creates an empty `Corpus`.
      operationId: generativelanguage.corpora.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Corpus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Corpus'
      tags:
        - corpora
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+parent}/permissions:
    post:
      description: Create a permission to a specific resource.
      operationId: generativelanguage.tunedModels.permissions.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Permission'
      parameters:
        - name: parent
          in: path
          description:
            'Required. The parent resource of the `Permission`. Formats:
            `tunedModels/{tuned_model}` `corpora/{corpus}`'
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/Permission'
      tags:
        - tunedModels
    get:
      description: Lists permissions for the specific resource.
      operationId: generativelanguage.tunedModels.permissions.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListPermissionsResponse'
      parameters:
        - name: parent
          in: path
          description:
            'Required. The parent resource of the permissions. Formats:
            `tunedModels/{tuned_model}` `corpora/{corpus}`'
          required: true
          schema:
            type: string
        - name: pageSize
          in: query
          description:
            Optional. The maximum number of `Permission`s to return (per page).
            The service may return fewer permissions. If unspecified, at most 10
            permissions will be returned. This method returns at most 1000
            permissions per page, even if you pass larger page_size.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token, received from a previous `ListPermissions`
            call. Provide the `page_token` returned by one request as an
            argument to the next request to retrieve the next page. When
            paginating, all other parameters provided to `ListPermissions` must
            match the call that provided the page token.
          schema:
            type: string
      tags:
        - tunedModels
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/cachedContents:
    post:
      description: Creates CachedContent resource.
      operationId: generativelanguage.cachedContents.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CachedContent'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CachedContent'
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - cachedContents
    get:
      description: Lists CachedContents.
      operationId: generativelanguage.cachedContents.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListCachedContentsResponse'
      parameters:
        - name: pageSize
          in: query
          description:
            Optional. The maximum number of cached contents to return. The
            service may return fewer than this value. If unspecified, some
            default (under maximum) number of items will be returned. The
            maximum value is 1000; values above 1000 will be coerced to 1000.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token, received from a previous
            `ListCachedContents` call. Provide this to retrieve the subsequent
            page. When paginating, all other parameters provided to
            `ListCachedContents` must match the call that provided the page
            token.
          schema:
            type: string
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - cachedContents
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:generateContent:
    post:
      description:
        Generates a model response given an input `GenerateContentRequest`.
        Refer to the [text generation
        guide](https://aistudio.google.com/docs/text-generation) for detailed
        usage information. Input capabilities differ between models, including
        tuned models. Refer to the [model
        guide](https://aistudio.google.com/docs/models) and [tuning
        guide](https://aistudio.google.com/docs/model-tuning) for details.
      operationId: generativelanguage.models.generateContent
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/GenerateContentRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:streamGenerateContent:
    post:
      description:
        Generates a [streamed
        response](https://aistudio.google.com/docs/text-generation#streaming-responses)
        from the model given an input `GenerateContentRequest`.
      operationId: generativelanguage.models.streamGenerateContent
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/GenerateContentRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:batchGenerateContent:
    post:
      description:
        Enqueues a batch of `GenerateContent` requests for batch processing.
      operationId: generativelanguage.models.batchGenerateContent
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Operation'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchGenerateContentRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/tunedModels:
    get:
      description: Lists created tuned models.
      operationId: generativelanguage.tunedModels.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListTunedModelsResponse'
      parameters:
        - name: filter
          in: query
          description:
            'Optional. A filter is a full text search over the tuned model''s
            description and display name. By default, results will not include
            tuned models shared with everyone. Additional operators: - owner:me
            - writers:me - readers:me - readers:everyone Examples: "owner:me"
            returns all tuned models to which caller has owner role "readers:me"
            returns all tuned models to which caller has reader role
            "readers:everyone" returns all tuned models that are shared with
            everyone'
          schema:
            type: string
        - name: pageSize
          in: query
          description:
            Optional. The maximum number of `TunedModels` to return (per page).
            The service may return fewer tuned models. If unspecified, at most
            10 tuned models will be returned. This method returns at most 1000
            models per page, even if you pass a larger page_size.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token, received from a previous `ListTunedModels`
            call. Provide the `page_token` returned by one request as an
            argument to the next request to retrieve the next page. When
            paginating, all other parameters provided to `ListTunedModels` must
            match the call that provided the page token.
          schema:
            type: string
      tags:
        - tunedModels
    post:
      description:
        'Creates a tuned model. Check intermediate tuning progress (if any)
        through the [google.longrunning.Operations] service. Access status and
        results through the Operations service. Example: GET
        /v1/tunedModels/az2mb0bpw6i/operations/000-111-222'
      operationId: generativelanguage.tunedModels.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Operation'
      parameters:
        - name: tunedModelId
          in: query
          description:
            'Optional. The unique id for the tuned model if specified. This
            value should be up to 40 characters, the first character must be a
            letter, the last could be a letter or a number. The id must match
            the regular expression: `[a-z]([a-z0-9-]{0,38}[a-z0-9])?`.'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunedModel'
      tags:
        - tunedModels
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:asyncBatchEmbedContent:
    post:
      description:
        Enqueues a batch of `EmbedContent` requests for batch processing. We
        have a `BatchEmbedContents` handler in `GenerativeService`, but it was
        synchronized. So we name this one to be `Async` to avoid confusion.
      operationId: generativelanguage.models.asyncBatchEmbedContent
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Operation'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AsyncBatchEmbedContentRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:generateText:
    post:
      description: Generates a response from the model given an input message.
      operationId: generativelanguage.models.generateText
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GenerateTextResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` or `TunedModel` to use for
            generating the completion. Examples: models/text-bison-001
            tunedModels/sentence-translator-u3b7m'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTextRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+name}:transferOwnership:
    post:
      description:
        Transfers ownership of the tuned model. This is the only way to change
        ownership of the tuned model. The current owner will be downgraded to
        writer role.
      operationId: generativelanguage.tunedModels.transferOwnership
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransferOwnershipResponse'
      parameters:
        - name: name
          in: path
          description:
            'Required. The resource name of the tuned model to transfer
            ownership. Format: `tunedModels/my-model-id`'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferOwnershipRequest'
      tags:
        - tunedModels
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+name}/operations:
    get:
      description:
        Lists operations that match the specified filter in the request. If the
        server doesn't support this method, it returns `UNIMPLEMENTED`.
      operationId: generativelanguage.models.operations.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListOperationsResponse'
      parameters:
        - name: name
          in: path
          description: The name of the operation's parent resource.
          required: true
          schema:
            type: string
        - name: filter
          in: query
          description: The standard list filter.
          schema:
            type: string
        - name: pageSize
          in: query
          description: The standard list page size.
          schema:
            type: integer
        - name: pageToken
          in: query
          description: The standard list page token.
          schema:
            type: string
        - name: returnPartialSuccess
          in: query
          description:
            When set to `true`, operations that are reachable are returned as
            normal, and those that are unreachable are returned in the
            ListOperationsResponse.unreachable field. This can only be `true`
            when reading across collections. For example, when `parent` is set
            to `"projects/example/locations/-"`. This field is not supported by
            default and will result in an `UNIMPLEMENTED` error if set unless
            explicitly documented otherwise in service or product specific
            documentation.
          schema:
            type: boolean
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/fileSearchStores:
    get:
      description: Lists all `FileSearchStores` owned by the user.
      operationId: generativelanguage.fileSearchStores.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListFileSearchStoresResponse'
      parameters:
        - name: pageSize
          in: query
          description:
            Optional. The maximum number of `FileSearchStores` to return (per
            page). The service may return fewer `FileSearchStores`. If
            unspecified, at most 10 `FileSearchStores` will be returned. The
            maximum size limit is 20 `FileSearchStores` per page.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token, received from a previous
            `ListFileSearchStores` call. Provide the `next_page_token` returned
            in the response as an argument to the next request to retrieve the
            next page. When paginating, all other parameters provided to
            `ListFileSearchStores` must match the call that provided the page
            token.
          schema:
            type: string
      tags:
        - fileSearchStores
    post:
      description: Creates an empty `FileSearchStore`.
      operationId: generativelanguage.fileSearchStores.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/FileSearchStore'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileSearchStore'
      tags:
        - fileSearchStores
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+fileSearchStoreName}:importFile:
    post:
      description: Imports a `File` from File Service to a `FileSearchStore`.
      operationId: generativelanguage.fileSearchStores.importFile
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Operation'
      parameters:
        - name: fileSearchStoreName
          in: path
          description:
            'Required. Immutable. The name of the `FileSearchStore` to import
            the file into. Example: `fileSearchStores/my-file-search-store-123`'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportFileRequest'
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - fileSearchStores
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+parent}/documents:
    get:
      description: Lists all `Document`s in a `Corpus`.
      operationId: generativelanguage.fileSearchStores.documents.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListDocumentsResponse'
      parameters:
        - name: parent
          in: path
          description:
            'Required. The name of the `FileSearchStore` containing `Document`s.
            Example: `fileSearchStores/my-file-search-store-123`'
          required: true
          schema:
            type: string
        - name: pageSize
          in: query
          description:
            Optional. The maximum number of `Document`s to return (per page).
            The service may return fewer `Document`s. If unspecified, at most 10
            `Document`s will be returned. The maximum size limit is 20
            `Document`s per page.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token, received from a previous `ListDocuments`
            call. Provide the `next_page_token` returned in the response as an
            argument to the next request to retrieve the next page. When
            paginating, all other parameters provided to `ListDocuments` must
            match the call that provided the page token.
          schema:
            type: string
      tags:
        - fileSearchStores
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/generatedFiles:
    get:
      description: Lists the generated files owned by the requesting project.
      operationId: generativelanguage.generatedFiles.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListGeneratedFilesResponse'
      parameters:
        - name: pageSize
          in: query
          description:
            Optional. Maximum number of `GeneratedFile`s to return per page. If
            unspecified, defaults to 10. Maximum `page_size` is 50.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            Optional. A page token from a previous `ListGeneratedFiles` call.
          schema:
            type: string
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - generatedFiles
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+name}:updateEmbedContentBatch:
    patch:
      description:
        Updates a batch of EmbedContent requests for batch processing.
      operationId: generativelanguage.batches.updateEmbedContentBatch
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmbedContentBatch'
      parameters:
        - name: name
          in: path
          description:
            'Output only. Identifier. Resource name of the batch. Format:
            `batches/{batch_id}`.'
          required: true
          schema:
            type: string
        - name: updateMask
          in: query
          description: Optional. The list of fields to update.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedContentBatch'
      tags:
        - batches
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+name}:cancel:
    post:
      description:
        Starts asynchronous cancellation on a long-running operation. The server
        makes a best effort to cancel the operation, but success is not
        guaranteed. If the server doesn't support this method, it returns
        `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation
        or other methods to check whether the cancellation succeeded or whether
        the operation completed despite cancellation. On successful
        cancellation, the operation is not deleted; instead, it becomes an
        operation with an Operation.error value with a google.rpc.Status.code of
        `1`, corresponding to `Code.CANCELLED`.
      operationId: generativelanguage.batches.cancel
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Empty'
      parameters:
        - name: name
          in: path
          description: The name of the operation resource to be cancelled.
          required: true
          schema:
            type: string
      tags:
        - batches
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+name}:updateGenerateContentBatch:
    patch:
      description:
        Updates a batch of GenerateContent requests for batch processing.
      operationId: generativelanguage.batches.updateGenerateContentBatch
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GenerateContentBatch'
      parameters:
        - name: name
          in: path
          description:
            'Output only. Identifier. Resource name of the batch. Format:
            `batches/{batch_id}`.'
          required: true
          schema:
            type: string
        - name: updateMask
          in: query
          description: Optional. The list of fields to update.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentBatch'
      tags:
        - batches
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/auth_tokens:
    post:
      description:
        Creates a token that can be used to constrain the behavior of a
        BidiGenerateContent session.
      operationId: generativelanguage.auth_tokens.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthToken'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthToken'
      tags:
        - auth_tokens
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/files:register:
    post:
      description:
        Registers a Google Cloud Storage files with FileService. The user is
        expected to provide Google Cloud Storage URIs and will receive a File
        resource for each URI in return. Note that the files are not copied,
        just registered with File API. If one file fails to register, the whole
        request fails.
      operationId: generativelanguage.files.register
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RegisterFilesResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterFilesRequest'
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - files
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/files:
    get:
      description:
        Lists the metadata for `File`s owned by the requesting project.
      operationId: generativelanguage.files.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListFilesResponse'
      parameters:
        - name: pageSize
          in: query
          description:
            Optional. Maximum number of `File`s to return per page. If
            unspecified, defaults to 10. Maximum `page_size` is 100.
          schema:
            type: integer
        - name: pageToken
          in: query
          description: Optional. A page token from a previous `ListFiles` call.
          schema:
            type: string
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - files
    post:
      description: Creates a `File`.
      operationId: generativelanguage.media.upload
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CreateFileResponse'
      requestBody:
        content:
          application/octet-stream:
            schema:
              $ref: '#/components/schemas/CreateFileRequest'
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - media
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/environments/{id}:get:
    get:
      description: Gets an environment.
      operationId: generativelanguage.environments.get
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Environment'
      parameters:
        - name: id
          in: path
          description:
            Required. Resource ID segment making up resource `name`. It
            identifies the resource within its parent collection as described in
            https://google.aip.dev/122.
          required: true
          schema:
            type: string
      tags:
        - environments
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/environments:create:
    post:
      description: Creates an environment.
      operationId: generativelanguage.environments.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Environment'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnvironmentRequest'
      tags:
        - environments
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/environments/{id}:delete:
    delete:
      description: Deletes an environment.
      operationId: generativelanguage.environments.delete
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Empty'
      parameters:
        - name: id
          in: path
          description:
            Required. Resource ID segment making up resource `name`. It
            identifies the resource within its parent collection as described in
            https://google.aip.dev/122.
          required: true
          schema:
            type: string
      tags:
        - environments
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/environments:list:
    get:
      description: Lists environments.
      operationId: generativelanguage.environments.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListEnvironmentsResponse'
      parameters:
        - name: mode
          in: query
          description: Optional. Filter environments by compute lifecycle mode.
          schema:
            type: string
            enum:
              - ENVIRONMENT_MODE_UNSPECIFIED
              - ON_DEMAND
              - SELF_HOSTED
        - name: pageSize
          in: query
          description:
            Optional. Maximum number of environments to return. If unspecified,
            defaults to 50. Maximum is 1000.
          schema:
            type: integer
        - name: pageToken
          in: query
          description: Optional. Pagination token.
          schema:
            type: string
      tags:
        - environments
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+parent}/files/{+path}:
    put:
      description:
        Uploads (creates or updates) a file in an environment's workspace.
      operationId: generativelanguage.environments.files.media.upload
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/UploadEnvironmentFileResponse'
      parameters:
        - name: parent
          in: path
          description:
            'Required. The resource name of the target environment. Format:
            `environments/{environment_id}`'
          required: true
          schema:
            type: string
        - name: path
          in: path
          description:
            'Required. The destination relative path of the file within the
            environment. Example: "workspace/src/main.py"'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              $ref: '#/components/schemas/UploadEnvironmentFileRequest'
      tags:
        - environments
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+parent}/files:
    get:
      description:
        Retrieves file metadata or directory contents from an environment's
        snapshot. To download file contents directly, pass ?alt=media or use the
        files.download helper.
      operationId: generativelanguage.environments.files.media.download
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GetEnvironmentFilesResponse'
      parameters:
        - name: parent
          in: path
          description:
            'Required. The resource name of the environment. Format:
            `environments/{environment_id}`'
          required: true
          schema:
            type: string
        - name: page_size
          in: query
          description:
            Optional. Maximum number of entries to return per page (for
            directory listing). If unspecified, defaults to 100. Maximum is
            1000. NOLINT
          schema:
            type: integer
        - name: page_token
          in: query
          description: Optional. Pagination token for directory listing. NOLINT
          schema:
            type: string
        - name: path
          in: query
          description:
            'Optional. The path of the file or directory within the environment.
            If empty, defaults to the root of the workspace. Example:
            "workspace/src/main.py"'
          schema:
            type: string
        - name: recursive
          in: query
          description:
            Optional. If true and the path is a directory, recursively lists all
            files and subdirectories. Defaults to false (immediate children
            only).
          schema:
            type: boolean
      tags:
        - environments
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+name}/auth_tokens:
    post:
      description:
        Creates a short-lived auth token for client-side authentication (HTTP).
      operationId: generativelanguage.interactions.auth_tokens.create
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/HttpBody'
      parameters:
        - name: name
          in: path
          description: Required. interaction_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HttpBody'
      tags:
        - interactions
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:countTokens:
    post:
      description:
        Runs a model's tokenizer on input `Content` and returns the token count.
        Refer to the [tokens guide](https://aistudio.google.com/docs/tokens) to
        learn more about tokens.
      operationId: generativelanguage.models.countTokens
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CountTokensResponse'
      parameters:
        - name: model
          in: path
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. This name should match a model name returned by the
            `ListModels` method. Format: `models/{model}`"
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountTokensRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:generateMessage:
    post:
      description:
        Generates a response from the model given an input `MessagePrompt`.
      operationId: generativelanguage.models.generateMessage
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GenerateMessageResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the model to use. Format:
            `name=models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateMessageRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:predictLongRunning:
    post:
      description:
        'Deprecated: Same as Predict but returns an LRO. Use the Interactions
        API instead.'
      operationId: generativelanguage.models.predictLongRunning
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Operation'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the model for prediction. Format:
            `name=models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictLongRunningRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:embedText:
    post:
      description: Generates an embedding from the model given an input message.
      operationId: generativelanguage.models.embedText
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmbedTextResponse'
      parameters:
        - name: model
          in: path
          description:
            Required. The model name to use with the format
            model=models/{model}.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedTextRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:predict:
    post:
      description:
        'Deprecated: Performs a prediction request. Use
        `GenerativeService.GenerateContent` instead.'
      operationId: generativelanguage.models.predict
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PredictResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the model for prediction. Format:
            `name=models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:countTextTokens:
    post:
      description:
        Runs a model's tokenizer on a text and returns the token count.
      operationId: generativelanguage.models.countTextTokens
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CountTextTokensResponse'
      parameters:
        - name: model
          in: path
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. This name should match a model name returned by the
            `ListModels` method. Format: `models/{model}`"
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountTextTokensRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:batchEmbedContents:
    post:
      description:
        Generates multiple embedding vectors from the input `Content` which
        consists of a batch of strings represented as `EmbedContentRequest`
        objects.
      operationId: generativelanguage.models.batchEmbedContents
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BatchEmbedContentsResponse'
      parameters:
        - name: model
          in: path
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. This name should match a model name returned by the
            `ListModels` method. Format: `models/{model}`"
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchEmbedContentsRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:generateAnswer:
    post:
      description:
        Generates a grounded answer from the model given an input
        `GenerateAnswerRequest`.
      operationId: generativelanguage.models.generateAnswer
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GenerateAnswerResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` to use for generating the
            grounded response. Format: `model=models/{model}`.'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateAnswerRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:embedContent:
    post:
      description:
        Generates a text embedding vector from the input `Content` using the
        specified [Gemini Embedding
        model](https://aistudio.google.com/docs/models#specialized-task-models).
      operationId: generativelanguage.models.embedContent
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmbedContentResponse'
      parameters:
        - name: model
          in: path
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. This name should match a model name returned by the
            `ListModels` method. Format: `models/{model}`"
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedContentRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:countMessageTokens:
    post:
      description:
        Runs a model's tokenizer on a string and returns the token count.
      operationId: generativelanguage.models.countMessageTokens
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CountMessageTokensResponse'
      parameters:
        - name: model
          in: path
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. This name should match a model name returned by the
            `ListModels` method. Format: `models/{model}`"
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountMessageTokensRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/models:
    get:
      description:
        Lists the [`Model`s](https://aistudio.google.com/docs/models) available
        through the Gemini API.
      operationId: generativelanguage.models.list
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
      parameters:
        - name: pageSize
          in: query
          description:
            The maximum number of `Models` to return (per page). If unspecified,
            50 models will be returned per page. This method returns at most
            1000 models per page, even if you pass a larger page_size.
          schema:
            type: integer
        - name: pageToken
          in: query
          description:
            A page token, received from a previous `ListModels` call. Provide
            the `page_token` returned by one request as an argument to the next
            request to retrieve the next page. When paginating, all other
            parameters provided to `ListModels` must match the call that
            provided the page token.
          schema:
            type: string
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+model}:batchEmbedText:
    post:
      description:
        Generates multiple embeddings from the model given input text in a
        synchronous call.
      operationId: generativelanguage.models.batchEmbedText
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BatchEmbedTextResponse'
      parameters:
        - name: model
          in: path
          description:
            'Required. The name of the `Model` to use for generating the
            embedding. Examples: models/embedding-gecko-001'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchEmbedTextRequest'
      tags:
        - models
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
  /v1beta/{+fileSearchStoreName}:uploadToFileSearchStore:
    post:
      description:
        Uploads data to a FileSearchStore, preprocesses and chunks before
        storing it in a FileSearchStore Document.
      operationId: generativelanguage.media.uploadToFileSearchStore
      responses:
        '200':
          description: Successful response
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomLongRunningOperation'
      parameters:
        - name: fileSearchStoreName
          in: path
          description:
            'Required. Immutable. The name of the `FileSearchStore` to upload
            the file into. Example: `fileSearchStores/my-file-search-store-123`'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              $ref: '#/components/schemas/UploadToFileSearchStoreRequest'
      security:
        - Oauth2:
            - https://www.googleapis.com/auth/devstorage.read_only
          Oauth2c:
            - https://www.googleapis.com/auth/devstorage.read_only
      tags:
        - media
    parameters:
      - $ref: '#/components/parameters/callback'
      - $ref: '#/components/parameters/key'
      - $ref: '#/components/parameters/oauth_token'
      - $ref: '#/components/parameters/prettyPrint'
      - $ref: '#/components/parameters/quotaUser'
      - $ref: '#/components/parameters/alt'
      - $ref: '#/components/parameters/upload_protocol'
      - $ref: '#/components/parameters/_.xgafv'
      - $ref: '#/components/parameters/uploadType'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/fields'
tags:
  - name: corpora
  - name: cachedContents
  - name: dynamic
  - name: tunedModels
  - name: fileSearchStores
  - name: generatedFiles
  - name: batches
  - name: auth_tokens
  - name: files
  - name: environments
  - name: interactions
  - name: models
  - name: media
externalDocs:
  url: https://developers.generativeai.google/api
servers:
  - url: https://generativelanguage.googleapis.com
components:
  parameters:
    callback:
      name: callback
      in: query
      description: JSONP
      schema:
        type: string
    key:
      name: key
      in: query
      description:
        API key. Your API key identifies your project and provides you with API
        access, quota, and reports. Required unless you provide an OAuth 2.0
        token.
      schema:
        type: string
    oauth_token:
      name: oauth_token
      in: query
      description: OAuth 2.0 token for the current user.
      schema:
        type: string
    prettyPrint:
      name: prettyPrint
      in: query
      description: Returns response with indentations and line breaks.
      schema:
        type: boolean
        default: true
    quotaUser:
      name: quotaUser
      in: query
      description:
        Available to use for quota purposes for server-side applications. Can be
        any arbitrary string assigned to a user, but should not exceed 40
        characters.
      schema:
        type: string
    alt:
      name: alt
      in: query
      description: Data format for response.
      schema:
        type: string
        enum:
          - json
          - media
          - proto
        default: json
    upload_protocol:
      name: upload_protocol
      in: query
      description: Upload protocol for media (e.g. "raw", "multipart").
      schema:
        type: string
    uploadType:
      name: uploadType
      in: query
      description: Legacy upload protocol for media (e.g. "media", "multipart").
      schema:
        type: string
    access_token:
      name: access_token
      in: query
      description: OAuth access token.
      schema:
        type: string
    fields:
      name: fields
      in: query
      description:
        Selector specifying which fields to include in a partial response.
      schema:
        type: string
    _.xgafv:
      name: $.xgafv
      in: query
      description: V1 error format.
      schema:
        type: string
        enum:
          - '1'
          - '2'
  requestBodies:
    Permission:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Permission'
    GenerateContentRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenerateContentRequest'
  securitySchemes:
    Oauth2:
      type: oauth2
      description: Oauth 2.0 implicit authentication
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          scopes:
            https://www.googleapis.com/auth/devstorage.read_only:
              View your data in Google Cloud Storage
    Oauth2c:
      type: oauth2
      description: Oauth 2.0 accessCode authentication
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://accounts.google.com/o/oauth2/token
          scopes:
            https://www.googleapis.com/auth/devstorage.read_only:
              View your data in Google Cloud Storage
  schemas:
    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
        id:
          type: string
          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`.
        args:
          additionalProperties:
            description: Properties of the object.
          type: object
          description:
            Optional. The function parameters and values in JSON object format.
      type: object
      description:
        A predicted `FunctionCall` returned from the model that contains a
        string representing the `FunctionDeclaration.name` with the arguments
        and their values.
    InlinedEmbedContentRequest:
      properties:
        metadata:
          description: Optional. The metadata to be associated with the request.
          additionalProperties:
            description: Properties of the object.
          type: object
        request:
          $ref: '#/components/schemas/EmbedContentRequest'
      description: The request to be processed in the batch.
      type: object
    GenerateAnswerRequest:
      description: Request to generate a grounded answer from the `Model`.
      type: object
      properties:
        semanticRetriever:
          $ref: '#/components/schemas/SemanticRetrieverConfig'
        temperature:
          description:
            Optional. Controls the randomness of the output. Values can range
            from [0.0,1.0], inclusive. A value closer to 1.0 will produce
            responses that are more varied and creative, while a value closer to
            0.0 will typically result in more straightforward responses from the
            model. A low temperature (~0.2) is usually recommended for
            Attributed-Question-Answering use cases.
          type: number
          format: float
        inlinePassages:
          $ref: '#/components/schemas/GroundingPassages'
        safetySettings:
          type: array
          items:
            $ref: '#/components/schemas/SafetySetting'
          description:
            Optional. A list of unique `SafetySetting` instances for blocking
            unsafe content. This will be enforced on the
            `GenerateAnswerRequest.contents` and
            `GenerateAnswerResponse.candidate`. 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 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.
        contents:
          description:
            'Required. The content of the current conversation with the `Model`.
            For single-turn queries, this is a single question to answer. For
            multi-turn queries, this is a repeated field that contains
            conversation history and the last `Content` in the list containing
            the question. Note: `GenerateAnswer` only supports queries in
            English.'
          type: array
          items:
            $ref: '#/components/schemas/Content'
        answerStyle:
          description: Required. Style in which answers should be returned.
          enum:
            - ANSWER_STYLE_UNSPECIFIED
            - ABSTRACTIVE
            - EXTRACTIVE
            - VERBOSE
          type: string
    SpeechConfig:
      description: Config for speech generation and transcription.
      type: object
      properties:
        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
        multiSpeakerVoiceConfig:
          $ref: '#/components/schemas/MultiSpeakerVoiceConfig'
        voiceConfig:
          $ref: '#/components/schemas/VoiceConfig'
        textNormalization:
          description:
            Optional. Controls text normalization before speech synthesis.
          type: string
          enum:
            - TEXT_NORMALIZATION_UNSPECIFIED
            - AUTO
            - ENABLED
            - DISABLED
    GroundingPassages:
      properties:
        passages:
          description: List of passages.
          items:
            $ref: '#/components/schemas/GroundingPassage'
          type: array
      type: object
      description: A repeated list of passages.
    FunctionResponseBlob:
      type: object
      description:
        Raw media bytes for function response. Text should not be sent as raw
        bytes, use the 'FunctionResponse.response' field.
      properties:
        data:
          description: Raw bytes for media formats.
          type: string
          format: byte
        displayName:
          type: string
          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"}`).'
        mimeType:
          description:
            'The IANA standard MIME type of the source data. Examples: -
            image/png - image/jpeg If an unsupported MIME type is provided, an
            error will be returned. For a complete list of supported types, see
            [Supported file
            formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types).'
          type: string
    Blob:
      type: object
      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).'
        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
        data:
          format: byte
          description: Raw bytes for media formats.
          type: string
      description:
        Raw media bytes. Text should not be sent as raw bytes, use the 'text'
        field.
    InlinedRequests:
      properties:
        requests:
          items:
            $ref: '#/components/schemas/InlinedRequest'
          description: Required. The requests to be processed in the batch.
          type: array
      type: object
      description:
        The requests to be processed in the batch if provided as part of the
        batch creation request.
    AuthToken:
      properties:
        newSessionExpireTime:
          format: google-datetime
          type: string
          description:
            Optional. Input only. Immutable. The time after which new Live API
            sessions using the token resulting from this request will be
            rejected. If not set this defaults to 60 seconds in the future. If
            set, this value must be less than 20 hours in the future.
        name:
          description: Output only. Identifier. The token itself.
          readOnly: true
          type: string
        expireTime:
          description:
            Optional. Input only. Immutable. An optional time after which, when
            using the resulting token, messages in BidiGenerateContent sessions
            will be rejected. (Gemini may preemptively close the session after
            this time.) If not set then this defaults to 30 minutes in the
            future. If set, this value must be less than 20 hours in the future.
          type: string
          format: google-datetime
        uses:
          description:
            Optional. Input only. Immutable. The number of times the token can
            be used. If this value is zero then no limit is applied. Resuming a
            Live API session does not count as a use. If unspecified, the
            default is 1.
          format: int32
          type: integer
        fieldMask:
          description:
            Optional. Input only. Immutable. If field_mask is empty, and
            `bidi_generate_content_setup` is not present, then the effective
            `BidiGenerateContentSetup` message is taken from the Live API
            connection. If field_mask is empty, and
            `bidi_generate_content_setup` _is_ present, then the effective
            `BidiGenerateContentSetup` message is taken entirely from
            `bidi_generate_content_setup` in this request. The setup message
            from the Live API connection is ignored. If field_mask is not empty,
            then the corresponding fields from `bidi_generate_content_setup`
            will overwrite the fields from the setup message in the Live API
            connection.
          type: string
          format: google-fieldmask
        bidiGenerateContentSetup:
          $ref: '#/components/schemas/BidiGenerateContentSetup'
      type: object
      description: A request to create an ephemeral authentication token.
    DownloadParameters:
      properties:
        allowGzipCompression:
          description:
            A boolean to be returned in the response to Scotty. Allows/disallows
            gzip encoding of the payload content when the server thinks it's
            advantageous (hence, does not guarantee compression) which allows
            Scotty to GZip the response to the client.
          type: boolean
        ignoreRange:
          type: boolean
          description:
            Determining whether or not Apiary should skip the inclusion of any
            Content-Range header on its response to Scotty.
      description: Parameters specific to media downloads.
      type: object
    CodeExecutionResult:
      description:
        Result of executing the `ExecutableCode`. Generated only when the
        `CodeExecution` tool is used.
      type: object
      properties:
        outcome:
          description: Required. Outcome of the code execution.
          type: string
          enum:
            - OUTCOME_UNSPECIFIED
            - OUTCOME_OK
            - OUTCOME_FAILED
            - OUTCOME_DEADLINE_EXCEEDED
        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.
    CreateEnvironmentRequest:
      description: Request for creating an environment.
      type: object
      properties:
        networkAllowlist:
          $ref: '#/components/schemas/EnvironmentNetworkEgressAllowlist'
        systemInstruction:
          description:
            Optional. System instruction applied to interactions running in this
            environment. Only supported for `SELF_HOSTED` environments, where it
            is recommended.
          type: string
        env:
          additionalProperties:
            $ref: '#/components/schemas/EnvVar'
          description: Environment variables to set in the sandbox environment.
          type: object
        networkMode:
          description: Network egress mode.
          enum:
            - NETWORK_MODE_UNSPECIFIED
            - DISABLED
          type: string
        fromEnvironment:
          description:
            'Optional. The source environment to copy/fork from. Format:
            `environments/{environment_id}` or `{environment_id}`. When
            specified, `sources` and `env` must be empty.'
          type: string
        customConfig:
          type: object
          additionalProperties:
            description: Properties of the object.
          description:
            Optional. Arbitrary customer-defined JSON configuration passed
            through to the self-hosted environment poller. Only supported when
            `mode` is `SELF_HOSTED`.
        sources:
          description: Sources to be mounted into the environment.
          type: array
          items:
            $ref: '#/components/schemas/Source'
        mode:
          enum:
            - ENVIRONMENT_MODE_UNSPECIFIED
            - ON_DEMAND
            - SELF_HOSTED
          description: The compute lifecycle mode for this environment.
          type: string
    CountTokensResponse:
      properties:
        promptTokensDetails:
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
          description:
            Output only. List of modalities that were processed in the request
            input.
        totalTokens:
          type: integer
          description:
            The number of tokens that the `Model` tokenizes the `prompt` into.
            Always non-negative.
          format: int32
        cacheTokensDetails:
          description:
            Output only. List of modalities that were processed in the cached
            content.
          type: array
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
        cachedContentTokenCount:
          description:
            Number of tokens in the cached part of the prompt (the cached
            content).
          format: int32
          type: integer
      type: object
      description:
        A response from `CountTokens`. It returns the model's `token_count` for
        the `prompt`.
    AutomaticActivityDetection:
      properties:
        disabled:
          type: boolean
          description:
            Optional. If enabled (the default), detected voice and text input
            count as activity. If disabled, the client must send activity
            signals.
        prefixPaddingMs:
          type: integer
          description:
            Optional. The required duration of detected speech before
            start-of-speech is committed. The lower this value, the more
            sensitive the start-of-speech detection is and shorter speech can be
            recognized. However, this also increases the probability of false
            positives.
          format: int32
        startOfSpeechSensitivity:
          type: string
          description: Optional. Determines how likely speech is to be detected.
          enum:
            - START_SENSITIVITY_UNSPECIFIED
            - START_SENSITIVITY_HIGH
            - START_SENSITIVITY_LOW
        silenceDurationMs:
          format: int32
          description:
            Optional. The required duration of detected non-speech (e.g.
            silence) before end-of-speech is committed. The larger this value,
            the longer speech gaps can be without interrupting the user's
            activity but this will increase the model's latency.
          type: integer
        endOfSpeechSensitivity:
          enum:
            - END_SENSITIVITY_UNSPECIFIED
            - END_SENSITIVITY_HIGH
            - END_SENSITIVITY_LOW
          description: Optional. Determines how likely detected speech is ended.
          type: string
      description: Configures automatic detection of activity.
      type: object
    CreateFileResponse:
      properties:
        file:
          $ref: '#/components/schemas/File'
      description: Response for `CreateFile`.
      type: object
    ModalityTokenCount:
      properties:
        modality:
          type: string
          enum:
            - MODALITY_UNSPECIFIED
            - TEXT
            - IMAGE
            - VIDEO
            - AUDIO
            - DOCUMENT
          description: The modality associated with this token count.
        tokenCount:
          type: integer
          description: Number of tokens.
          format: int32
      type: object
      description: Represents token counting info for a single modality.
    GoogleMaps:
      description:
        The GoogleMaps Tool that provides geospatial context for the user's
        query.
      type: object
      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.
    SpreadsheetMetadata:
      type: object
      description:
        Metadata describes the input spreadsheet content. Set this in
        `Part.spreadsheet_metadata` or
        `FunctionResponsePart.spreadsheet_metadata` when `inline_data` or
        `file_data` contains a spreadsheet to configure static spreadsheet
        preprocessing.
      properties:
        visibleCells:
          description:
            Optional. The range of cells to extract, in A1 notation (e.g.
            "A1:D10"). If not set, the full occupied area of the sheet is used.
          type: string
        contentLayers:
          description:
            Optional. Content layers to return. If empty, defaults to [DATA,
            FORMULAS] when SpreadsheetMetadata is set.
          items:
            type: string
            enum:
              - CONTENT_LAYER_UNSPECIFIED
              - DATA
              - FORMULAS
              - VISUAL
          type: array
        sheetIndex:
          format: int32
          type: integer
          description:
            Optional. The 1-indexed index of the sheet to extract, in workbook
            order. If not set, all sheets are extracted.
    GroundingChunkStringList:
      properties:
        values:
          type: array
          description: The string values of the list.
          items:
            type: string
      description: A list of string values.
      type: object
    GenerationConfig:
      properties:
        speechConfig:
          $ref: '#/components/schemas/SpeechConfig'
        responseJsonSchema:
          description:
            Optional. An internal detail. Use `responseJsonSchema` rather than
            this field.
        enableEnhancedCivicAnswers:
          description:
            Optional. Enables enhanced civic answers. It may not be available
            for all models.
          type: boolean
        imageConfig:
          $ref: '#/components/schemas/ImageConfig'
        candidateCount:
          description:
            Optional. Number of generated responses to return. If unset, this
            will default to 1. Please note that this doesn't work for previous
            generation models (Gemini 1.0 family)
          format: int32
          type: integer
        enableAffectiveDialog:
          type: boolean
          description:
            Optional. If enabled, the model will detect emotions and adapt its
            responses accordingly.
        responseMimeType:
          type: string
          description:
            'Optional. MIME type of the generated candidate text. Supported MIME
            types are: `text/plain`: (default) Text output. `application/json`:
            JSON response in the response candidates. `text/x.enum`: ENUM as a
            string response in the response candidates. Refer to the
            [docs](https://aistudio.google.com/docs/file-input-methods#text-file-types)
            for a list of all supported text MIME types.'
        audioTranscriptionConfig:
          $ref: '#/components/schemas/AudioTranscriptionConfig'
        topP:
          format: float
          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
        responseSchema:
          $ref: '#/components/schemas/Schema'
        stopSequences:
          description:
            Optional. The set of character sequences (up to 5) that will stop
            output generation. If specified, the API will stop at the first
            appearance of a `stop_sequence`. The stop sequence will not be
            included as part of the response.
          items:
            type: string
          type: array
        frequencyPenalty:
          format: float
          type: number
          description:
            "Optional. Frequency penalty applied to the next token's logprobs,
            multiplied by the number of times each token has been seen in the
            respponse so far. A positive penalty will discourage the use of
            tokens that have already been used, proportional to the number of
            times the token has been used: The more a token is used, the more
            difficult it is for the model to use that token again increasing the
            vocabulary of responses. Caution: A _negative_ penalty will
            encourage the model to reuse tokens proportional to the number of
            times the token has been used. Small negative values will reduce the
            vocabulary of a response. Larger negative values will cause the
            model to start repeating a common token until it hits the
            max_output_tokens limit."
        responseFormat:
          $ref: '#/components/schemas/ResponseFormatConfig'
        translationConfig:
          $ref: '#/components/schemas/TranslationConfig'
        temperature:
          format: float
          type: number
          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.'
        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
        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.'
        responseModalities:
          type: array
          items:
            type: string
            enum:
              - MODALITY_UNSPECIFIED
              - TEXT
              - IMAGE
              - AUDIO
          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.
        logprobs:
          format: int32
          description:
            Optional. Only valid if response_logprobs=True. This sets the number
            of top logprobs, including the chosen candidate, to return at each
            decoding step in the Candidate.logprobs_result. The number must be
            in the range of [0, 20].
          type: integer
        seed:
          type: integer
          description:
            Optional. Seed used in decoding. If not set, the request uses a
            randomly generated seed.
          format: int32
        thinkingConfig:
          $ref: '#/components/schemas/ThinkingConfig'
        mediaResolution:
          enum:
            - MEDIA_RESOLUTION_UNSPECIFIED
            - MEDIA_RESOLUTION_LOW
            - MEDIA_RESOLUTION_MEDIUM
            - MEDIA_RESOLUTION_HIGH
          type: string
          description:
            Optional. If specified, the media resolution specified will be used.
        _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
        responseLogprobs:
          type: boolean
          description:
            Optional. If true, export the logprobs results in response.
        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
      description:
        Configuration options for model generation and outputs. Not all
        parameters are configurable for every model.
      type: object
    EmbedContentBatchOutput:
      type: object
      description:
        The output of a batch request. This is returned in the
        `AsyncBatchEmbedContentResponse` or the `EmbedContentBatch.output`
        field.
      properties:
        responsesFile:
          type: string
          readOnly: true
          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 `EmbedContentResponse` messages formatted as JSON.
            The responses will be written in the same order as the input
            requests.
        inlinedResponses:
          $ref: '#/components/schemas/InlinedEmbedContentResponses'
    SessionResumptionConfig:
      properties:
        handle:
          description:
            The handle of a previous session. If not present then a new session
            is created. Session handles come from
            `SessionResumptionUpdate.token` values in previous connections.
          type: string
      type: object
      description:
        Session resumption configuration. This message is included in the
        session configuration as `BidiGenerateContentSetup.session_resumption`.
        If configured, the server will send `SessionResumptionUpdate` messages.
    GetEnvironmentFilesResponse:
      properties:
        next_page_token:
          description: Pagination token for directory listing. NOLINT
          type: string
        files:
          items:
            $ref: '#/components/schemas/EnvironmentFile'
          type: array
          description:
            If the requested path is a directory, this contains its contents. If
            the requested path is a file, this contains a single entry with the
            file's metadata. If alt=media was specified, this is empty (content
            is served via `blob`).
      description: Response for getting an environment's files.
      type: object
    ExecutableCode:
      properties:
        language:
          description: Required. Programming language of the `code`.
          enum:
            - LANGUAGE_UNSPECIFIED
            - PYTHON
          type: string
        code:
          description: Required. The code to be executed.
          type: string
        id:
          description:
            Optional. Unique identifier of the `ExecutableCode` part. The server
            returns the `CodeExecutionResult` with the matching `id`.
          type: string
      description:
        Code generated by the model that is meant to be executed, and the result
        returned to the model. Only generated when using the `CodeExecution`
        tool, in which the code will be automatically executed, and a
        corresponding `CodeExecutionResult` will also be generated.
      type: object
    CitationMetadata:
      properties:
        citationSources:
          items:
            $ref: '#/components/schemas/CitationSource'
          description: Citations to sources for a specific response.
          type: array
      description: A collection of source attributions for a piece of content.
      type: object
    VideoFileMetadata:
      properties:
        videoDuration:
          format: google-duration
          type: string
          description: Duration of the video.
      description: Metadata for a video `File`.
      type: object
    AttributionSourceId:
      type: object
      properties:
        groundingPassage:
          $ref: '#/components/schemas/GroundingPassageId'
        semanticRetrieverChunk:
          $ref: '#/components/schemas/SemanticRetrieverChunk'
      description: Identifier for the source contributing to this attribution.
    CodeExecution:
      type: object
      properties: {}
      description:
        Tool that executes code generated by the model, and automatically
        returns the result to the model. See also `ExecutableCode` and
        `CodeExecutionResult` which are only generated when using this tool.
    UploadEnvironmentFileRequest:
      properties:
        overwrite:
          type: boolean
          description:
            Optional. Whether to overwrite the destination file if it already
            exists.
        extract:
          type: boolean
          description:
            Optional. If true, treats the uploaded file as a tar/tar.gz archive
            and unpacks it into `path`.
      type: object
      description: Request for `UploadEnvironmentFile`.
    Interval:
      properties:
        endTime:
          description:
            Optional. Exclusive end of the interval. If specified, a Timestamp
            matching this interval will have to be before the end.
          format: google-datetime
          type: string
        startTime:
          description:
            Optional. Inclusive start of the interval. If specified, a Timestamp
            matching this interval will have to be the same or after the start.
          type: string
          format: google-datetime
      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.
    TuningTask:
      description: Tuning tasks that create tuned models.
      properties:
        startTime:
          readOnly: true
          type: string
          description:
            Output only. The timestamp when tuning this model started.
          format: google-datetime
        snapshots:
          readOnly: true
          type: array
          description: Output only. Metrics collected during tuning.
          items:
            $ref: '#/components/schemas/TuningSnapshot'
        hyperparameters:
          $ref: '#/components/schemas/Hyperparameters'
        completeTime:
          type: string
          format: google-datetime
          readOnly: true
          description:
            Output only. The timestamp when tuning this model completed.
        trainingData:
          $ref: '#/components/schemas/Dataset'
      type: object
    ContentFilter:
      properties:
        reason:
          enum:
            - BLOCKED_REASON_UNSPECIFIED
            - SAFETY
            - OTHER
          description: The reason content was blocked during request processing.
          type: string
        message:
          description:
            A string that describes the filtering behavior in more detail.
          type: string
      type: object
      description:
        Content filtering metadata associated with processing a single request.
        ContentFilter contains a reason and an optional supporting string. The
        reason may be unspecified.
    TunedModel:
      description:
        A fine-tuned model created using ModelService.CreateTunedModel.
      properties:
        createTime:
          format: google-datetime
          readOnly: true
          description: Output only. The timestamp when this model was created.
          type: string
        updateTime:
          description: Output only. The timestamp when this model was updated.
          readOnly: true
          format: google-datetime
          type: string
        baseModel:
          description:
            'Immutable. The name of the `Model` to tune. Example:
            `models/gemini-1.5-flash-001`'
          type: string
        name:
          type: string
          description:
            'Output only. The tuned model name. A unique name will be generated
            on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set
            on create, the id portion of the name will be set by concatenating
            the words of the display_name with hyphens and adding a random
            portion for uniqueness. Example: * display_name = `Sentence
            Translator` * name = `tunedModels/sentence-translator-u3b7m`'
          readOnly: true
        displayName:
          type: string
          description:
            Optional. The name to display for this model in user interfaces. The
            display name must be up to 40 characters including spaces.
        topP:
          description:
            Optional. For Nucleus sampling. Nucleus sampling considers the
            smallest set of tokens whose probability sum is at least `top_p`.
            This value specifies default to be the one used by the base model
            while creating the model.
          format: float
          type: number
        topK:
          type: integer
          description:
            Optional. For Top-k sampling. Top-k sampling considers the set of
            `top_k` most probable tokens. This value specifies default to be
            used by the backend while making the call to the model. This value
            specifies default to be the one used by the base model while
            creating the model.
          format: int32
        temperature:
          type: number
          description:
            Optional. Controls the randomness of the output. Values can range
            over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce
            responses that are more varied, while a value closer to `0.0` will
            typically result in less surprising responses from the model. This
            value specifies default to be the one used by the base model while
            creating the model.
          format: float
        state:
          readOnly: true
          description: Output only. The state of the tuned model.
          type: string
          enum:
            - STATE_UNSPECIFIED
            - CREATING
            - ACTIVE
            - FAILED
        tunedModelSource:
          $ref: '#/components/schemas/TunedModelSource'
        description:
          type: string
          description: Optional. A short description of this model.
        tuningTask:
          $ref: '#/components/schemas/TuningTask'
        readerProjectNumbers:
          description:
            Optional. List of project numbers that have read access to the tuned
            model.
          items:
            format: int64
            type: string
          type: array
      type: object
    InlinedResponse:
      description: The response to a single request in the batch.
      type: object
      properties:
        response:
          $ref: '#/components/schemas/GenerateContentResponse'
        metadata:
          description: Output only. The metadata associated with the request.
          type: object
          additionalProperties:
            description: Properties of the object.
          readOnly: true
        error:
          $ref: '#/components/schemas/Status'
    CachedContentUsageMetadata:
      properties:
        totalTokenCount:
          description: Total number of tokens that the cached content consumes.
          type: integer
          format: int32
      description: Metadata on the usage of the cached content.
      type: object
    BidiGenerateContentSetup:
      type: object
      description:
        Message to be sent in the first (and only in the first)
        `BidiGenerateContentClientMessage`. Contains configuration that will
        apply for the duration of the streaming RPC. Clients should wait for a
        `BidiGenerateContentSetupComplete` message before sending any additional
        messages.
      properties:
        historyConfig:
          $ref: '#/components/schemas/HistoryConfig'
        generationConfig:
          $ref: '#/components/schemas/GenerationConfig'
        tools:
          type: array
          description:
            Optional. A list of `Tools` the model may use to generate the next
            response. A `Tool` is a piece of code that enables the system to
            interact with external systems to perform an action, or set of
            actions, outside of knowledge and scope of the model.
          items:
            $ref: '#/components/schemas/Tool'
        proactivity:
          $ref: '#/components/schemas/ProactivityConfig'
        sessionResumption:
          $ref: '#/components/schemas/SessionResumptionConfig'
        systemInstruction:
          $ref: '#/components/schemas/Content'
        labels:
          description:
            'Optional. Labels with user-defined metadata for the request.
            Optional. Labels must follow standard unified Cloud label
            requirements: - Label keys must start with a letter. - Label keys
            and values can be no longer than 63 characters (Unicode codepoints)
            and can only contain lowercase letters, numeric characters,
            underscores, and dashes. - International characters are allowed.
            Usage: - Safety identifiers from aggregators: Use the key
            `safety_identifier` (e.g. `{"safety_identifier":
            "user_session_123"}`)'
          type: object
          additionalProperties:
            type: string
        inputAudioTranscription:
          $ref: '#/components/schemas/AudioTranscriptionConfig'
        contextWindowCompression:
          $ref: '#/components/schemas/ContextWindowCompressionConfig'
        outputAudioTranscription:
          $ref: '#/components/schemas/AudioTranscriptionConfig'
        model:
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. Format: `models/{model}`"
          type: string
        realtimeInputConfig:
          $ref: '#/components/schemas/RealtimeInputConfig'
    GroundingPassage:
      description: Passage included inline with a grounding configuration.
      type: object
      properties:
        id:
          type: string
          description:
            Identifier for the passage for attributing this passage in grounded
            answers.
        content:
          $ref: '#/components/schemas/Content'
    RegisterFilesRequest:
      type: object
      properties:
        uris:
          items:
            type: string
          description:
            'Required. The Google Cloud Storage URIs to register. Example:
            `gs://bucket/object`.'
          type: array
      description: Request for `RegisterFiles`.
    LogprobsResultCandidate:
      properties:
        token:
          description: The candidate’s token string value.
          type: string
        tokenId:
          description: The candidate’s token id value.
          format: int32
          type: integer
        logProbability:
          format: float
          type: number
          description: The candidate's log probability.
      type: object
      description: Candidate for the logprobs token and score.
    TextResponseFormat:
      properties:
        schema:
          description:
            Optional. The JSON schema that the output should conform to. Only
            applicable when mime_type is APPLICATION_JSON.
        mimeType:
          description: Optional. The MIME type of the text output.
          enum:
            - MIME_TYPE_UNSPECIFIED
            - APPLICATION_JSON
            - TEXT_PLAIN
          type: string
      type: object
      description: Configuration for text output format.
    ListFileSearchStoresResponse:
      properties:
        nextPageToken:
          type: string
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no more pages.
        fileSearchStores:
          description: The returned rag_stores.
          type: array
          items:
            $ref: '#/components/schemas/FileSearchStore'
      description:
        Response from `ListFileSearchStores` containing a paginated list of
        `FileSearchStores`. The results are sorted by ascending
        `file_search_store.create_time`.
      type: object
    UploadEnvironmentFileResponse:
      description: Response for `UploadEnvironmentFile`.
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentFile'
          description: List of files created or extracted in the environment.
      type: object
    UploadToFileSearchStoreRequest:
      properties:
        displayName:
          type: string
          description: Optional. Display name of the created document.
        chunkingConfig:
          $ref: '#/components/schemas/ChunkingConfig'
        customMetadata:
          description: Custom metadata to be associated with the data.
          items:
            $ref: '#/components/schemas/CustomMetadata'
          type: array
        mimeType:
          type: string
          description:
            Optional. MIME type of the data. If not provided, it will be
            inferred from the uploaded content.
      type: object
      description: Request for `UploadToFileSearchStore`.
    Schema:
      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).
      type: object
      properties:
        nullable:
          description: Optional. Indicates if the value may be null.
          type: boolean
        enum:
          description:
            'Optional. Possible values of the element of Type.STRING with enum
            format. For example we can define an Enum Direction as :
            {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}'
          type: array
          items:
            type: string
        propertyOrdering:
          type: array
          items:
            type: string
          description:
            Optional. The order of the properties. Not a standard field in open
            api spec. Used to determine the order of the properties in the
            response.
        minProperties:
          format: int64
          description:
            Optional. Minimum number of the properties for Type.OBJECT.
          type: string
        maxLength:
          type: string
          description: Optional. Maximum length of the Type.STRING
          format: int64
        description:
          description:
            Optional. A brief description of the parameter. This could contain
            examples of use. Parameter description may be formatted as Markdown.
          type: string
        example:
          description:
            Optional. Example of the object. Will only populated when the object
            is the root.
        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.
        type:
          type: string
          description: Required. Data type.
          enum:
            - TYPE_UNSPECIFIED
            - STRING
            - NUMBER
            - INTEGER
            - BOOLEAN
            - ARRAY
            - OBJECT
            - 'NULL'
        format:
          description:
            Optional. The format of the data. Any value is allowed, but most do
            not trigger any special functionality.
          type: string
        minItems:
          format: int64
          description: Optional. Minimum number of the elements for Type.ARRAY.
          type: string
        required:
          type: array
          items:
            type: string
          description: Optional. Required properties of Type.OBJECT.
        properties:
          additionalProperties:
            $ref: '#/components/schemas/Schema'
          type: object
          description: Optional. Properties of Type.OBJECT.
        anyOf:
          items:
            $ref: '#/components/schemas/Schema'
          description:
            Optional. The value should be validated against any (one or more) of
            the subschemas in the list.
          type: array
        pattern:
          description:
            Optional. Pattern of the Type.STRING to restrict a string to a
            regular expression.
          type: string
        minLength:
          format: int64
          description:
            Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the
            Type.STRING
          type: string
        items:
          $ref: '#/components/schemas/Schema'
        minimum:
          type: number
          format: double
          description:
            Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of
            the Type.INTEGER and Type.NUMBER
        title:
          type: string
          description: Optional. The title of the schema.
        maximum:
          description:
            Optional. Maximum value of the Type.INTEGER and Type.NUMBER
          format: double
          type: number
        maxProperties:
          format: int64
          type: string
          description:
            Optional. Maximum number of the properties for Type.OBJECT.
        maxItems:
          format: int64
          type: string
          description: Optional. Maximum number of the elements for Type.ARRAY.
    McpServer:
      description:
        A MCPServer is a server that can be called by the model to perform
        actions. It is a server that implements the MCP protocol.
      type: object
      properties:
        streamableHttpTransport:
          $ref: '#/components/schemas/StreamableHttpTransport'
        name:
          description: The name of the MCPServer.
          type: string
    GroundingMetadata:
      properties:
        searchEntryPoint:
          $ref: '#/components/schemas/SearchEntryPoint'
        googleMapsWidgetContextToken:
          type: string
          description:
            Optional. Resource name of the Google Maps widget context token that
            can be used with the PlacesContextElement widget in order to render
            contextual data. Only populated in the case that grounding with
            Google Maps is enabled.
        webSearchQueries:
          type: array
          items:
            type: string
          description: Web search queries for the following-up web search.
        groundingChunks:
          items:
            $ref: '#/components/schemas/GroundingChunk'
          type: array
          description:
            List of supporting references retrieved from specified grounding
            source. When streaming, this only contains the grounding chunks that
            have not been included in the grounding metadata of previous
            responses.
        groundingSupports:
          items:
            $ref: '#/components/schemas/GoogleAiGenerativelanguageV1betaGroundingSupport'
          type: array
          description: List of grounding support.
        imageSearchQueries:
          items:
            type: string
          type: array
          description: Image search queries used for grounding.
        retrievalMetadata:
          $ref: '#/components/schemas/RetrievalMetadata'
      type: object
      description: Metadata returned to client when grounding is enabled.
    AudioMetadata:
      type: object
      description:
        Metadata describes the input audio content. Set this in
        `Part.audio_metadata` or `FunctionResponsePart.audio_metadata` when
        `inline_data` or `file_data` contains audio to configure static audio
        preprocessing.
      properties:
        endOffset:
          description:
            Optional. The end offset of the audio, relative to the start of the
            audio stream.
          format: google-duration
          type: string
        startOffset:
          format: google-duration
          type: string
          description:
            Optional. The start offset of the audio, relative to the start of
            the audio stream.
    TunedModelSource:
      properties:
        baseModel:
          type: string
          readOnly: true
          description:
            'Output only. The name of the base `Model` this `TunedModel` was
            tuned from. Example: `models/gemini-1.5-flash-001`'
        tunedModel:
          description:
            'Immutable. The name of the `TunedModel` to use as the starting
            point for training the new model. Example:
            `tunedModels/my-tuned-model`'
          type: string
      description: Tuned model as a source for training a new model.
      type: object
    FileSearch:
      properties:
        fileSearchStoreNames:
          items:
            type: string
          description:
            'Required. The names of the file_search_stores to retrieve from.
            Example: `fileSearchStores/my-file-search-store-123`'
          type: array
        metadataFilter:
          type: string
          description:
            Optional. Metadata filter to apply to the semantic retrieval
            documents and chunks.
        topK:
          type: integer
          description:
            Optional. The number of semantic retrieval chunks to retrieve.
          format: int32
      type: object
      description:
        The FileSearch tool that retrieves knowledge from Semantic Retrieval
        corpora. Files are imported to Semantic Retrieval corpora using the
        ImportFile API.
    TuningExamples:
      properties:
        examples:
          items:
            $ref: '#/components/schemas/TuningExample'
          type: array
          description:
            The examples. Example input can be for text or discuss, but all
            examples in a set must be of the same type.
      description: A set of tuning examples. Can be training or validation data.
      type: object
    ListModelsResponse:
      description:
        Response from `ListModel` containing a paginated list of Models.
      type: object
      properties:
        models:
          items:
            $ref: '#/components/schemas/Model'
          description: The returned Models.
          type: array
        nextPageToken:
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no more pages.
          type: string
    InlinedEmbedContentResponse:
      properties:
        error:
          $ref: '#/components/schemas/Status'
        response:
          $ref: '#/components/schemas/EmbedContentResponse'
        metadata:
          readOnly: true
          description: Output only. The metadata associated with the request.
          additionalProperties:
            description: Properties of the object.
          type: object
      description: The response to a single request in the batch.
      type: object
    ThinkingConfig:
      type: object
      description: Config for thinking features.
      properties:
        includeThoughts:
          description:
            Indicates whether to include thoughts in the response. If true,
            thoughts are returned only when available.
          type: boolean
        thinkingBudget:
          description:
            The number of thoughts tokens that the model should generate.
          format: int32
          type: integer
        thinkingLevel:
          type: string
          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.
          enum:
            - THINKING_LEVEL_UNSPECIFIED
            - MINIMAL
            - LOW
            - MEDIUM
            - HIGH
            - XHIGH
    Model:
      description: Information about a Generative Language Model.
      properties:
        topK:
          format: int32
          description:
            For Top-k sampling. Top-k sampling considers the set of `top_k` most
            probable tokens. This value specifies default to be used by the
            backend while making the call to the model. If empty, indicates the
            model doesn't use top-k sampling, and `top_k` isn't allowed as a
            generation parameter.
          type: integer
        temperature:
          format: float
          description:
            Controls the randomness of the output. Values can range over
            `[0.0,max_temperature]`, inclusive. A higher value will produce
            responses that are more varied, while a value closer to `0.0` will
            typically result in less surprising responses from the model. This
            value specifies default to be used by the backend while making the
            call to the model.
          type: number
        maxTemperature:
          type: number
          format: float
          description: The maximum temperature this model can use.
        thinking:
          description: Whether the model supports thinking.
          type: boolean
        name:
          type: string
          description:
            'Required. The resource name of the `Model`. Refer to [Model
            variants](https://aistudio.google.com/docs/models#model-versions)
            for all allowed values. Format: `models/{model}` with a `{model}`
            naming convention of: * "{base_model_id}-{version}" Examples: *
            `models/gemini-1.5-flash-001`'
        outputTokenLimit:
          type: integer
          format: int32
          description: Maximum number of output tokens available for this model.
        topP:
          description:
            For [Nucleus
            sampling](https://aistudio.google.com/docs/prompting-strategies#model-parameters).
            Nucleus sampling considers the smallest set of tokens whose
            probability sum is at least `top_p`. This value specifies default to
            be used by the backend while making the call to the model.
          type: number
          format: float
        inputTokenLimit:
          description: Maximum number of input tokens allowed for this model.
          type: integer
          format: int32
        supportedGenerationMethods:
          description:
            The model's supported generation methods. The corresponding API
            method names are defined as Pascal case strings, such as
            `generateMessage` and `generateContent`.
          items:
            type: string
          type: array
        baseModelId:
          type: string
          description:
            'Required. The name of the base model, pass this to the generation
            request. Examples: * `gemini-1.5-flash`'
        displayName:
          description:
            The human-readable name of the model. E.g. "Gemini 1.5 Flash". The
            name can be up to 128 characters long and can consist of any UTF-8
            characters.
          type: string
        version:
          description:
            Required. The version number of the model. This represents the major
            version (`1.0` or `1.5`)
          type: string
        description:
          type: string
          description: A short description of the model.
      type: object
    GroundingChunk:
      description:
        A `GroundingChunk` represents a segment of supporting evidence that
        grounds the model's response. It can be a chunk from the web, a
        retrieved context from a file, or information from Google Maps.
      properties:
        maps:
          $ref: '#/components/schemas/Maps'
        retrievedContext:
          $ref: '#/components/schemas/RetrievedContext'
        image:
          $ref: '#/components/schemas/Image'
        web:
          $ref: '#/components/schemas/Web'
      type: object
    LanguageAuto:
      type: object
      properties: {}
      deprecated: true
      description:
        Indicates the language of the audio should be automatically detected.
    EmbedTextRequest:
      type: object
      description: Request to get a text embedding from the model.
      properties:
        text:
          description:
            Optional. The free-form input text that the model will turn into an
            embedding.
          type: string
        model:
          type: string
          description:
            Required. The model name to use with the format
            model=models/{model}.
    ToolConfig:
      description:
        The Tool configuration containing parameters for specifying `Tool` use
        in the request.
      type: object
      properties:
        retrievalConfig:
          $ref: '#/components/schemas/RetrievalConfig'
        includeServerSideToolInvocations:
          description:
            Optional. If true, the API response will include the server-side
            tool calls and responses within the `Content` message. This allows
            clients to observe the server's tool interactions.
          type: boolean
        functionCallingConfig:
          $ref: '#/components/schemas/FunctionCallingConfig'
    VideoMetadata:
      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).
      properties:
        startOffset:
          type: string
          format: google-duration
          description: Optional. The start offset of the video.
        fps:
          format: double
          type: number
          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].
        contentLayers:
          type: array
          description:
            Optional. Content layers to return. If empty, defaults to [FRAMES,
            AUDIO].
          items:
            type: string
            enum:
              - CONTENT_LAYER_UNSPECIFIED
              - FRAMES
              - AUDIO
              - TRANSCRIPT
        endOffset:
          description: Optional. The end offset of the video.
          format: google-duration
          type: string
      type: object
    TextCompletion:
      description: Output text returned from a model.
      properties:
        citationMetadata:
          $ref: '#/components/schemas/CitationMetadata'
        output:
          description: Output only. The generated text returned from the model.
          type: string
          readOnly: true
        safetyRatings:
          description:
            Ratings for the safety of a response. There is at most one rating
            per category.
          items:
            $ref: '#/components/schemas/SafetyRating'
          type: array
      type: object
    TranslationConfig:
      type: object
      description: Config for translation features.
      properties:
        targetLanguageCode:
          type: string
          description:
            Required. The target language for translation. Supported values are
            BCP-47 language codes (e.g. "en", "es", "fr").
        echoTargetLanguage:
          description:
            Optional. If true, the model will generate audio when the target
            language is spoken, essentially it will parrot the input. If false,
            we will not produce audio for the target language.
          type: boolean
    GenerateAnswerResponse:
      description: Response from the model for a grounded answer.
      properties:
        inputFeedback:
          $ref: '#/components/schemas/InputFeedback'
        answer:
          $ref: '#/components/schemas/Candidate'
        answerableProbability:
          type: number
          format: float
          readOnly: true
          description:
            'Output only. The model''s estimate of the probability that its
            answer is correct and grounded in the input passages. A low
            `answerable_probability` indicates that the answer might not be
            grounded in the sources. When `answerable_probability` is low, you
            may want to: * Display a message to the effect of "We couldn’t
            answer that question" to the user. * Fall back to a general-purpose
            LLM that answers the question from world knowledge. The threshold
            and nature of such fallbacks will depend on individual use cases.
            `0.5` is a good starting threshold.'
      type: object
    Document:
      properties:
        name:
          description:
            'Immutable. Identifier. The `Document` resource name. The ID (name
            excluding the "fileSearchStores/*/documents/" prefix) can contain up
            to 40 characters that are lowercase alphanumeric or dashes (-). The
            ID cannot start or end with a dash. If the name is empty on create,
            a unique name will be derived from `display_name` along with a 12
            character random suffix. Example:
            `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`'
          type: string
        updateTime:
          readOnly: true
          format: google-datetime
          type: string
          description:
            Output only. The Timestamp of when the `Document` was last updated.
        createTime:
          type: string
          description:
            Output only. The Timestamp of when the `Document` was created.
          format: google-datetime
          readOnly: true
        customMetadata:
          items:
            $ref: '#/components/schemas/CustomMetadata'
          type: array
          description:
            Optional. User provided custom metadata stored as key-value pairs
            used for querying. A `Document` can have a maximum of 20
            `CustomMetadata`.
        mimeType:
          description: Output only. The mime type of the Document.
          readOnly: true
          type: string
        sizeBytes:
          description:
            Output only. The size of raw bytes ingested into the Document.
          readOnly: true
          format: int64
          type: string
        displayName:
          type: string
          description:
            'Optional. The human-readable display name for the `Document`. The
            display name must be no more than 512 characters in length,
            including spaces. Example: "Semantic Retriever Documentation"'
        state:
          type: string
          description: Output only. Current state of the `Document`.
          readOnly: true
          enum:
            - STATE_UNSPECIFIED
            - STATE_PENDING
            - STATE_ACTIVE
            - STATE_FAILED
      description: A `Document` is a collection of `Chunk`s.
      type: object
    AudioResponseFormat:
      type: object
      description: Configuration for audio output format.
      properties:
        delivery:
          description: Optional. The delivery mode for the audio output.
          enum:
            - DELIVERY_UNSPECIFIED
            - INLINE
            - URI
          type: string
        mimeType:
          type: string
          enum:
            - MIME_TYPE_UNSPECIFIED
            - AUDIO_MP3
            - AUDIO_OGG_OPUS
            - AUDIO_L16
            - AUDIO_WAV
            - AUDIO_ALAW
            - AUDIO_MULAW
          description: Optional. The MIME type of the audio output.
        bitRate:
          type: integer
          format: int32
          description:
            Optional. Bit rate in bits per second (bps). Only applicable for
            compressed formats (MP3, Opus).
        sampleRate:
          type: integer
          description: Optional. Sample rate in Hz.
          format: int32
    GenerateContentBatch:
      type: object
      properties:
        inputConfig:
          $ref: '#/components/schemas/InputConfig'
        endTime:
          readOnly: true
          type: string
          format: google-datetime
          description:
            Output only. The time at which the batch processing completed.
        priority:
          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.
          type: string
          format: int64
        state:
          description: Output only. The state of the batch.
          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
        displayName:
          type: string
          description: Required. The user-defined name of this batch.
        createTime:
          type: string
          format: google-datetime
          description: Output only. The time at which the batch was created.
          readOnly: true
        updateTime:
          type: string
          description:
            Output only. The time at which the batch was last updated.
          readOnly: true
          format: google-datetime
        batchStats:
          $ref: '#/components/schemas/BatchStats'
        output:
          $ref: '#/components/schemas/GenerateContentBatchOutput'
        name:
          type: string
          readOnly: true
          description:
            'Output only. Identifier. Resource name of the batch. Format:
            `batches/{batch_id}`.'
        model:
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          type: string
      description:
        A resource representing a batch of `GenerateContent` requests.
    Maps:
      properties:
        text:
          type: string
          description: Text description of the place answer.
        placeAnswerSources:
          $ref: '#/components/schemas/PlaceAnswerSources'
        placeId:
          type: string
          description:
            The ID of the place, in `places/{place_id}` format. A user can use
            this ID to look up that place.
        uri:
          description: URI reference of the place.
          type: string
        title:
          description: Title of the place.
          type: string
      type: object
      description:
        A grounding chunk from Google Maps. A Maps chunk corresponds to a single
        place.
    GenerateMessageResponse:
      description:
        The response from the model. This includes candidate messages and
        conversation history in the form of chronologically-ordered messages.
      properties:
        candidates:
          type: array
          description: Candidate response messages from the model.
          items:
            $ref: '#/components/schemas/Message'
        filters:
          items:
            $ref: '#/components/schemas/ContentFilter'
          type: array
          description:
            A set of content filtering metadata for the prompt and response
            text. This indicates which `SafetyCategory`(s) blocked a candidate
            from this response, the lowest `HarmProbability` that triggered a
            block, and the HarmThreshold setting for that category.
        messages:
          items:
            $ref: '#/components/schemas/Message'
          description: The conversation history used by the model.
          type: array
      type: object
    Status:
      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).'
      type: object
      properties:
        message:
          type: string
          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.
        code:
          type: integer
          format: int32
          description:
            The status code, which should be an enum value of google.rpc.Code.
        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.
    MessagePrompt:
      type: object
      description:
        All of the structured input text passed to the model as a prompt. A
        `MessagePrompt` contains a structured set of fields that provide context
        for the conversation, examples of user input/model output message pairs
        that prime the model to respond in different ways, and the conversation
        history or list of messages representing the alternating turns of the
        conversation between the user and the model.
      properties:
        examples:
          type: array
          items:
            $ref: '#/components/schemas/Example'
          description:
            "Optional. Examples of what the model should generate. This includes
            both user input and the response that the model should emulate.
            These `examples` are treated identically to conversation messages
            except that they take precedence over the history in `messages`: If
            the total input size exceeds the model's `input_token_limit` the
            input will be truncated. Items will be dropped from `messages`
            before `examples`."
        messages:
          type: array
          description:
            "Required. A snapshot of the recent conversation history sorted
            chronologically. Turns alternate between two authors. If the total
            input size exceeds the model's `input_token_limit` the input will be
            truncated: The oldest items will be dropped from `messages`."
          items:
            $ref: '#/components/schemas/Message'
        context:
          description:
            'Optional. Text that should be provided to the model first to ground
            the response. If not empty, this `context` will be given to the
            model first before the `examples` and `messages`. When using a
            `context` be sure to provide it with every request to maintain
            continuity. This field can be a description of your prompt to the
            model to help provide context and guide the responses. Examples:
            "Translate the phrase from English to French." or "Given a
            statement, classify the sentiment as happy, sad or neutral."
            Anything included in this field will take precedence over message
            history if the total input size exceeds the model''s
            `input_token_limit` and the input request is truncated.'
          type: string
    ReviewSnippet:
      type: object
      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
    EmbedContentConfig:
      type: object
      description: Configurations for the EmbedContent request.
      properties:
        audioTrackExtraction:
          type: boolean
          description: Optional. Whether to extract audio from video content.
        outputDimensionality:
          description:
            Optional. Reduced dimension for the output embedding. If set,
            excessive values in the output embedding are truncated from the end.
          format: int32
          type: integer
        taskType:
          description: Optional. The task type of the embedding.
          enum:
            - TASK_TYPE_UNSPECIFIED
            - RETRIEVAL_QUERY
            - RETRIEVAL_DOCUMENT
            - SEMANTIC_SIMILARITY
            - CLASSIFICATION
            - CLUSTERING
            - QUESTION_ANSWERING
            - FACT_VERIFICATION
            - CODE_RETRIEVAL_QUERY
          type: string
        autoTruncate:
          type: boolean
          description:
            Optional. Whether to silently truncate the input content if it's
            longer than the maximum sequence length.
        documentOcr:
          description: Optional. Whether to enable OCR for document content.
          type: boolean
        title:
          type: string
          description: Optional. The title for the text.
    SafetyRating:
      type: object
      properties:
        blocked:
          description: Was this content blocked because of this rating?
          type: boolean
        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
          enumDeprecated:
            - false
            - true
            - true
            - true
            - true
            - true
            - true
            - false
            - false
            - false
            - false
            - true
            - false
          description: Required. The category for this rating.
          type: string
        probability:
          type: string
          enum:
            - HARM_PROBABILITY_UNSPECIFIED
            - NEGLIGIBLE
            - LOW
            - MEDIUM
            - HIGH
          description: Required. The probability of harm for this content.
      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.
    V1mainCreateTunedModelMetadata:
      description:
        Metadata about the state and progress of creating a tuned model returned
        from the long-running operation
      properties:
        tunedModel:
          type: string
          description:
            Name of the tuned model associated with the tuning operation.
        completedPercent:
          description: The completed percentage for the tuning operation.
          format: float
          type: number
        snapshots:
          description: Metrics collected during tuning.
          items:
            $ref: '#/components/schemas/V1mainTuningSnapshot'
          type: array
        completedSteps:
          format: int32
          type: integer
          description: The number of steps completed.
        totalSteps:
          description: The total number of tuning steps.
          type: integer
          format: int32
      type: object
    EmbedContentRequest:
      type: object
      properties:
        embedContentConfig:
          $ref: '#/components/schemas/EmbedContentConfig'
        taskType:
          description:
            'Optional. Deprecated: Please use EmbedContentConfig.task_type
            instead. Optional task type for which the embeddings will be used.
            Not supported on earlier models (`models/embedding-001`).'
          type: string
          deprecated: true
          enum:
            - TASK_TYPE_UNSPECIFIED
            - RETRIEVAL_QUERY
            - RETRIEVAL_DOCUMENT
            - SEMANTIC_SIMILARITY
            - CLASSIFICATION
            - CLUSTERING
            - QUESTION_ANSWERING
            - FACT_VERIFICATION
            - CODE_RETRIEVAL_QUERY
        model:
          description:
            "Required. The model's resource name. This serves as an ID for the
            Model to use. This name should match a model name returned by the
            `ListModels` method. Format: `models/{model}`"
          type: string
        outputDimensionality:
          deprecated: true
          type: integer
          format: int32
          description:
            'Optional. Deprecated: Please use
            EmbedContentConfig.output_dimensionality instead. Optional reduced
            dimension for the output embedding. If set, excessive values in the
            output embedding are truncated from the end. Supported by newer
            models since 2024 only. You cannot set this value if using the
            earlier model (`models/embedding-001`).'
        content:
          $ref: '#/components/schemas/Content'
        title:
          type: string
          deprecated: true
          description:
            'Optional. Deprecated: Please use EmbedContentConfig.title instead.
            An optional title for the text. Only applicable when TaskType is
            `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for
            `RETRIEVAL_DOCUMENT` provides better quality embeddings for
            retrieval.'
      description: Request containing the `Content` for the model to embed.
    GenerateContentBatchOutput:
      description:
        The output of a batch request. This is returned in the
        `BatchGenerateContentResponse` or the `GenerateContentBatch.output`
        field.
      type: object
      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.
          readOnly: true
          type: string
        inlinedResponses:
          $ref: '#/components/schemas/InlinedResponses'
    DocumentMetadata:
      properties:
        contentLayers:
          items:
            type: string
            enum:
              - CONTENT_LAYER_UNSPECIFIED
              - PAGE_IMAGE
              - PAGE_TEXT
          type: array
          description:
            Optional. Content layers to return. If empty, defaults to
            [PAGE_IMAGE] when DocumentMetadata is set. When DocumentMetadata is
            not set, default document processing is used (for example, page
            images for PDFs).
        startPage:
          description: Optional. 1-indexed inclusive start page.
          type: integer
          format: int32
        endPage:
          type: integer
          format: int32
          description: Optional. 1-indexed inclusive end page.
      type: object
      description:
        Metadata describes the input document content. Set this in
        `Part.document_metadata` or `FunctionResponsePart.document_metadata`
        when `inline_data` or `file_data` contains a document to configure
        static document preprocessing.
    GenerateTextRequest:
      type: object
      description:
        Request to generate a text completion response from the model.
      properties:
        safetySettings:
          description:
            Optional. A list of unique `SafetySetting` instances for blocking
            unsafe content. that will be enforced on the
            `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`.
            There should not be more than one setting for each `SafetyCategory`
            type. The API will block any prompts 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_DEROGATORY, HARM_CATEGORY_TOXICITY,
            HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL, HARM_CATEGORY_MEDICAL,
            HARM_CATEGORY_DANGEROUS are supported in text service.
          items:
            $ref: '#/components/schemas/SafetySetting'
          type: array
        topK:
          description:
            'Optional. The maximum number of tokens to consider when sampling.
            The model uses combined Top-k and nucleus sampling. Top-k sampling
            considers the set of `top_k` most probable tokens. Defaults to 40.
            Note: The default value varies by model, see the `Model.top_k`
            attribute of the `Model` returned the `getModel` function.'
          format: int32
          type: integer
        maxOutputTokens:
          format: int32
          description:
            Optional. The maximum number of tokens to include in a candidate. If
            unset, this will default to output_token_limit specified in the
            `Model` specification.
          type: integer
        prompt:
          $ref: '#/components/schemas/TextPrompt'
        topP:
          format: float
          type: number
          description:
            'Optional. The maximum cumulative probability of tokens to consider
            when sampling. The model uses combined Top-k and 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 number of tokens based on the cumulative
            probability. Note: The default value varies by model, see the
            `Model.top_p` attribute of the `Model` returned the `getModel`
            function.'
        candidateCount:
          format: int32
          description:
            Optional. Number of generated responses to return. This value must
            be between [1, 8], inclusive. If unset, this will default to 1.
          type: integer
        temperature:
          type: number
          description:
            'Optional. Controls the randomness of the output. Note: The default
            value varies by model, see the `Model.temperature` attribute of the
            `Model` returned the `getModel` function. Values can range from
            [0.0,1.0], inclusive. A value closer to 1.0 will produce responses
            that are more varied and creative, while a value closer to 0.0 will
            typically result in more straightforward responses from the model.'
          format: float
        stopSequences:
          type: array
          items:
            type: string
          description:
            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.
    BatchEmbedTextResponse:
      properties:
        embeddings:
          items:
            $ref: '#/components/schemas/Embedding'
          description:
            Output only. The embeddings generated from the input text.
          readOnly: true
          type: array
      type: object
      description: The response to a EmbedTextRequest.
    DynamicRetrievalConfig:
      type: object
      properties:
        mode:
          description:
            The mode of the predictor to be used in dynamic retrieval.
          type: string
          enum:
            - MODE_UNSPECIFIED
            - MODE_DYNAMIC
        dynamicThreshold:
          description:
            The threshold to be used in dynamic retrieval. If not set, a system
            default value is used.
          type: number
          format: float
      description: Describes the options to customize dynamic retrieval.
    Blobstore2Info:
      properties:
        downloadExternalReadToken:
          description:
            A serialized External Read Token passed from Bigstore -> Scotty for
            a GCS download. This field must never be consumed outside of
            Bigstore, and is not applicable to non-GCS media uploads.
          type: string
          format: byte
        downloadReadHandle:
          type: string
          description:
            Read handle passed from Bigstore -> Scotty for a GCS download. This
            is a signed, serialized blobstore2.ReadHandle proto which must never
            be set outside of Bigstore, and is not applicable to non-GCS media
            downloads.
          format: byte
        uploadMetadataContainer:
          format: byte
          type: string
          description:
            Metadata passed from Blobstore -> Scotty for a new GCS upload. This
            is a signed, serialized blobstore2.BlobMetadataContainer proto which
            must never be consumed outside of Bigstore, and is not applicable to
            non-GCS media uploads.
        blobId:
          description: The blob id, e.g., /blobstore/prod/playground/scotty
          type: string
        blobGeneration:
          type: string
          description: The blob generation id.
          format: int64
        readToken:
          type: string
          description:
            The blob read token. Needed to read blobs that have not been
            replicated. Might not be available until the final call.
        uploadFragmentListCreationInfo:
          description:
            A serialized Object Fragment List Creation Info passed from Bigstore
            -> Scotty for a GCS upload. This field must never be consumed
            outside of Bigstore, and is not applicable to non-GCS media uploads.
          type: string
          format: byte
      description: Information to read/write to blobstore2.
      type: object
    EmbedTextResponse:
      properties:
        embedding:
          $ref: '#/components/schemas/Embedding'
      type: object
      description: The response to a EmbedTextRequest.
    FunctionResponseFileData:
      type: object
      properties:
        displayName:
          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: 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
        fileUri:
          description: Required. URI.
          type: string
      description: URI based data for function response.
    ContentEmbedding:
      description: A list of floats representing an embedding.
      properties:
        values:
          type: array
          description:
            The embedding values. This is for 3P users only and will not be
            populated for 1P calls.
          items:
            format: float
            type: number
        shape:
          items:
            type: integer
            format: int32
          description:
            This field stores the soft tokens tensor frame shape (e.g. [1, 1,
            256, 2048]).
          type: array
      type: object
    ImageConfig:
      type: object
      description: Config for image generation features.
      properties:
        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
        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`.
    DiffUploadResponse:
      description:
        Backend response for a Diff upload request. For details on the Scotty
        Diff protocol, visit http://go/scotty-diff-protocol.
      properties:
        originalObject:
          $ref: '#/components/schemas/CompositeMedia'
        objectVersion:
          type: string
          description:
            The object version of the object at the server. Must be included in
            the end notification response. The version in the end notification
            response must correspond to the new version of the object that is
            now stored at the server, after the upload.
      type: object
    HttpBody:
      type: object
      description:
        "Message that represents an arbitrary HTTP body. It should only be used
        for payload formats that can't be represented as JSON, such as raw
        binary or an HTML page. This message can be used both in streaming and
        non-streaming API methods in the request as well as the response. It can
        be used as a top-level request field, which is convenient if one wants
        to extract parameters from either the URL or HTTP template into the
        request fields and also want access to the raw HTTP body. Example:
        message GetResourceRequest { // A unique request id. string request_id =
        1; // The raw HTTP body is bound to this field. google.api.HttpBody
        http_body = 2; } service ResourceService { rpc
        GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
        UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); }
        Example with streaming methods: service CaldavService { rpc
        GetCalendar(stream google.api.HttpBody) returns (stream
        google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody)
        returns (stream google.api.HttpBody); } Use of this type only changes
        how the request and response bodies are handled, all other features will
        continue to work unchanged."
      properties:
        contentType:
          description:
            The HTTP Content-Type header value specifying the content type of
            the body.
          type: string
        data:
          format: byte
          type: string
          description: The HTTP request/response body as raw binary.
        extensions:
          items:
            type: object
            additionalProperties:
              description:
                Properties of the object. Contains field @type with type URL.
          description:
            Application specific response metadata. Must be set in the first
            response for streaming APIs.
          type: array
    ResponseFormatConfig:
      description:
        Configuration for the response output format. This is a flat object
        where each optional sub-field configures a specific output modality.
      properties:
        audio:
          $ref: '#/components/schemas/AudioResponseFormat'
        image:
          $ref: '#/components/schemas/ImageResponseFormat'
        text:
          $ref: '#/components/schemas/TextResponseFormat'
      type: object
    GoogleAiGenerativelanguageV1betaSegment:
      description: Segment of the content.
      type: object
      properties:
        text:
          description: The text corresponding to the segment from the response.
          type: string
        startIndex:
          type: integer
          description:
            Start index in the given Part, measured in bytes. Offset from the
            start of the Part, inclusive, starting at zero.
          format: int32
        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
        partIndex:
          description:
            The index of a Part object within its parent Content object.
          format: int32
          type: integer
    DiffChecksumsResponse:
      description:
        Backend response for a Diff get checksums response. For details on the
        Scotty Diff protocol, visit http://go/scotty-diff-protocol.
      type: object
      properties:
        objectLocation:
          $ref: '#/components/schemas/CompositeMedia'
        objectVersion:
          description:
            The object version of the object the checksums are being returned
            for.
          type: string
        objectSizeBytes:
          type: string
          description: The total size of the server object.
          format: int64
        checksumsLocation:
          $ref: '#/components/schemas/CompositeMedia'
        chunkSizeBytes:
          type: string
          format: int64
          description: The chunk size of checksums. Must be a multiple of 256KB.
    CountTextTokensResponse:
      properties:
        tokenCount:
          format: int32
          type: integer
          description:
            The number of tokens that the `model` tokenizes the `prompt` into.
            Always non-negative.
      type: object
      description:
        A response from `CountTextTokens`. It returns the model's `token_count`
        for the `prompt`.
    DiffVersionResponse:
      type: object
      description:
        Backend response for a Diff get version response. For details on the
        Scotty Diff protocol, visit http://go/scotty-diff-protocol.
      properties:
        objectSizeBytes:
          description: The total size of the server object.
          type: string
          format: int64
        objectVersion:
          type: string
          description: The version of the object stored at the server.
    FileSearchStore:
      type: object
      properties:
        displayName:
          description:
            'Optional. The human-readable display name for the
            `FileSearchStore`. The display name must be no more than 512
            characters in length, including spaces. Example: "Docs on Semantic
            Retriever"'
          type: string
        pendingDocumentsCount:
          description:
            Output only. The number of documents in the `FileSearchStore` that
            are being processed.
          readOnly: true
          type: string
          format: int64
        createTime:
          description:
            Output only. The Timestamp of when the `FileSearchStore` was
            created.
          type: string
          readOnly: true
          format: google-datetime
        updateTime:
          readOnly: true
          format: google-datetime
          description:
            Output only. The Timestamp of when the `FileSearchStore` was last
            updated.
          type: string
        embeddingModel:
          description:
            "Optional. The embedding model to use for the `FileSearchStore`. The
            model's resource name. This serves as an ID for the Model to use.
            Format: `models/{model}`. If not specified, the default embedding
            model will be used."
          type: string
        name:
          type: string
          readOnly: true
          description:
            'Output only. Immutable. Identifier. The `FileSearchStore` resource
            name. It is an ID (name excluding the "fileSearchStores/" prefix)
            that can contain up to 40 characters that are lowercase alphanumeric
            or dashes (-). It is output only. The unique name will be derived
            from `display_name` along with a 12 character random suffix.
            Example:
            `fileSearchStores/my-awesome-file-search-store-123a456b789c` If
            `display_name` is not provided, the name will be randomly generated.'
        sizeBytes:
          format: int64
          readOnly: true
          type: string
          description:
            Output only. The size of raw bytes ingested into the
            `FileSearchStore`. This is the total size of all the documents in
            the `FileSearchStore`.
        activeDocumentsCount:
          type: string
          description:
            Output only. The number of documents in the `FileSearchStore` that
            are active and ready for retrieval.
          readOnly: true
          format: int64
        failedDocumentsCount:
          readOnly: true
          type: string
          description:
            Output only. The number of documents in the `FileSearchStore` that
            have failed processing.
          format: int64
      description: A `FileSearchStore` is a collection of `Document`s.
    PlaceAnswerSources:
      properties:
        reviewSnippets:
          items:
            $ref: '#/components/schemas/ReviewSnippet'
          description:
            Snippets of reviews that are used to generate answers about the
            features of a given place in Google Maps.
          type: array
      type: object
      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.'
    ListPermissionsResponse:
      description:
        Response from `ListPermissions` containing a paginated list of
        permissions.
      properties:
        permissions:
          items:
            $ref: '#/components/schemas/Permission'
          description: Returned permissions.
          type: array
        nextPageToken:
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no more pages.
          type: string
      type: object
    DiffDownloadResponse:
      description:
        Backend response for a Diff download response. For details on the Scotty
        Diff protocol, visit http://go/scotty-diff-protocol.
      properties:
        objectLocation:
          $ref: '#/components/schemas/CompositeMedia'
      type: object
    Example:
      description:
        An input/output example used to instruct the Model. It demonstrates how
        the model should respond or format its response.
      properties:
        input:
          $ref: '#/components/schemas/Message'
        output:
          $ref: '#/components/schemas/Message'
      type: object
    CachedContent:
      description:
        Content that has been preprocessed and can be used in subsequent request
        to GenerativeService. Cached content can be only used with model it was
        created for.
      type: object
      properties:
        contents:
          items:
            $ref: '#/components/schemas/Content'
          type: array
          description: Optional. Input only. Immutable. The content to cache.
        usageMetadata:
          $ref: '#/components/schemas/CachedContentUsageMetadata'
        systemInstruction:
          $ref: '#/components/schemas/Content'
        name:
          readOnly: true
          type: string
          description:
            'Output only. Identifier. The resource name referring to the cached
            content. Format: `cachedContents/{id}`'
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          description:
            Optional. Input only. Immutable. A list of `Tools` the model may use
            to generate the next response
          type: array
        expireTime:
          format: google-datetime
          description:
            Timestamp in UTC of when this resource is considered expired. This
            is *always* provided on output, regardless of what was sent on
            input.
          type: string
        toolConfig:
          $ref: '#/components/schemas/ToolConfig'
        model:
          type: string
          description:
            'Required. Immutable. The name of the `Model` to use for cached
            content Format: `models/{model}`'
        createTime:
          type: string
          format: google-datetime
          description: Output only. Creation time of the cache entry.
          readOnly: true
        updateTime:
          readOnly: true
          description:
            Output only. When the cache entry was last updated in UTC time.
          type: string
          format: google-datetime
        displayName:
          type: string
          description:
            Optional. Immutable. The user-generated meaningful display name of
            the cached content. Maximum 128 Unicode characters.
        ttl:
          description: Input only. New TTL for this resource, input only.
          format: google-duration
          type: string
    ProactivityConfig:
      properties:
        proactiveAudio:
          description:
            Optional. If enabled, the model can reject responding to the last
            prompt. For example, this allows the model to ignore out of context
            speech or to stay silent if the user did not make a request, yet.
          type: boolean
        proactiveVideo:
          type: boolean
          description:
            Optional. If enabled, the system might trigger a generation on each
            received image. This requires that `proactive_audio` is enabled. The
            rate of generation depends on the rate of incoming images and can
            cause a significant increase in cost.
      type: object
      description: Config for proactivity features.
    GenerateContentRequest:
      description: Request to generate a completion from the model.
      type: object
      properties:
        safetySettings:
          type: array
          items:
            $ref: '#/components/schemas/SafetySetting'
          description:
            Optional. A list of unique `SafetySetting` instances for blocking
            unsafe content. This will be enforced on the
            `GenerateContentRequest.contents` and
            `GenerateContentResponse.candidates`. There should not be more than
            one setting for each `SafetyCategory` type. The API will block any
            contents and responses that fail to meet the thresholds set by these
            settings. This list overrides the default settings for each
            `SafetyCategory` specified in the safety_settings. If there is no
            `SafetySetting` for a given `SafetyCategory` provided in the list,
            the API will use the default safety setting for that category. Harm
            categories HARM_CATEGORY_HATE_SPEECH,
            HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,
            HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY,
            HARM_CATEGORY_JAILBREAK are supported. Refer to the
            [guide](https://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.
        contents:
          items:
            $ref: '#/components/schemas/Content'
          description:
            Required. The content of the current conversation with the model.
            For single-turn queries, this is a single instance. For multi-turn
            queries like
            [chat](https://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
        toolConfig:
          $ref: '#/components/schemas/ToolConfig'
        generationConfig:
          $ref: '#/components/schemas/GenerationConfig'
        continuationToken:
          description:
            Optional. An opaque continuation token used to resume generation
            from a previous `GenerateContent` or `StreamGenerateContent`
            response that stopped with `finish_reason` set to `CONTINUATION`.
            Note that `contents` is mandatory and must identically replicate the
            prompt and conversation history from the initial request when
            continuation token is provided in a request.
          format: byte
          type: string
        cachedContent:
          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}`'
          type: string
        store:
          description:
            Optional. Configures the logging behavior for a given request. If
            set, it takes precedence over the project-level logging config.
          type: boolean
        systemInstruction:
          $ref: '#/components/schemas/Content'
        model:
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          type: string
        serviceTier:
          enum:
            - unspecified
            - standard
            - flex
            - priority
          description: Optional. The service tier of the request.
          type: string
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          description:
            Optional. A list of `Tools` the `Model` may use to generate the next
            response. A `Tool` is a piece of code that enables the system to
            interact with external systems to perform an action, or set of
            actions, outside of knowledge and scope of the `Model`. Supported
            `Tool`s are `Function` and `code_execution`. Refer to the [Function
            calling](https://aistudio.google.com/docs/function-calling) and the
            [Code execution](https://aistudio.google.com/docs/code-execution)
            guides to learn more.
        labels:
          description:
            'Optional. Labels with user-defined metadata for the request.
            Optional. Labels must follow standard unified Cloud label
            requirements: - Label keys must start with a letter. - Label keys
            and values can be no longer than 63 characters (Unicode codepoints)
            and can only contain lowercase letters, numeric characters,
            underscores, and dashes. - International characters are allowed.
            Usage: - Safety identifiers from aggregators: Use the key
            `safety_identifier` (e.g. `{"safety_identifier":
            "user_session_123"}`)'
          type: object
          additionalProperties:
            type: string
    ListFilesResponse:
      description: Response for `ListFiles`.
      properties:
        nextPageToken:
          type: string
          description:
            A token that can be sent as a `page_token` into a subsequent
            `ListFiles` call.
        files:
          description: The list of `File`s.
          type: array
          items:
            $ref: '#/components/schemas/File'
      type: object
    UrlContextMetadata:
      properties:
        urlMetadata:
          type: array
          items:
            $ref: '#/components/schemas/UrlMetadata'
          description: List of url context.
      type: object
      description: Metadata related to url context retrieval tool.
    Dataset:
      description: Dataset for training or validation.
      properties:
        examples:
          $ref: '#/components/schemas/TuningExamples'
      type: object
    RealtimeInputConfig:
      type: object
      description:
        Configures the realtime input behavior in `BidiGenerateContent`.
      properties:
        turnCoverage:
          description:
            Optional. Defines which input is included in the user's turn.
          enum:
            - TURN_COVERAGE_UNSPECIFIED
            - TURN_INCLUDES_ONLY_ACTIVITY
            - TURN_INCLUDES_ALL_INPUT
            - TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO
          type: string
        activityHandling:
          description: Optional. Defines what effect activity has.
          type: string
          enum:
            - ACTIVITY_HANDLING_UNSPECIFIED
            - START_OF_ACTIVITY_INTERRUPTS
            - NO_INTERRUPTION
        automaticActivityDetection:
          $ref: '#/components/schemas/AutomaticActivityDetection'
        interimTranscriptTimestampEnabled:
          description: Optional. Configures interim transcript timestamps.
          type: boolean
    TopCandidates:
      type: object
      properties:
        candidates:
          description: Sorted by log probability in descending order.
          type: array
          items:
            $ref: '#/components/schemas/LogprobsResultCandidate'
      description: Candidates with top log probabilities at each decoding step.
    InlinedEmbedContentRequests:
      description:
        The requests to be processed in the batch if provided as part of the
        batch creation request.
      properties:
        requests:
          type: array
          description: Required. The requests to be processed in the batch.
          items:
            $ref: '#/components/schemas/InlinedEmbedContentRequest'
      type: object
    Operation:
      type: object
      description:
        This resource represents a long-running operation that is the result of
        a network API call.
      properties:
        done:
          description:
            If the value is `false`, it means the operation is still in
            progress. If `true`, the operation is completed, and either `error`
            or `response` is available.
          type: boolean
        metadata:
          additionalProperties:
            description:
              Properties of the object. Contains field @type with type URL.
          description:
            Service-specific metadata associated with the operation. It
            typically contains progress information and common metadata such as
            create time. Some services might not provide such metadata. Any
            method that returns a long-running operation should document the
            metadata type, if any.
          type: object
        response:
          description:
            The normal, successful response of the operation. If the original
            method returns no data on success, such as `Delete`, the response is
            `google.protobuf.Empty`. If the original method is standard
            `Get`/`Create`/`Update`, the response should be the resource. For
            other methods, the response should have the type `XxxResponse`,
            where `Xxx` is the original method name. For example, if the
            original method name is `TakeSnapshot()`, the inferred response type
            is `TakeSnapshotResponse`.
          additionalProperties:
            description:
              Properties of the object. Contains field @type with type URL.
          type: object
        error:
          $ref: '#/components/schemas/Status'
        name:
          type: string
          description:
            The server-assigned name, which is only unique within the same
            service that originally returns it. If you use the default HTTP
            mapping, the `name` should be a resource name ending with
            `operations/{unique_id}`.
    EnvironmentFile:
      properties:
        name:
          type: string
          readOnly: true
          description:
            Output only. The name of the file or directory (e.g., "main.py" or
            "src").
        created:
          description: Output only. The creation time of the file/directory.
          readOnly: true
          type: string
          format: google-datetime
        modified:
          readOnly: true
          format: google-datetime
          description: Output only. The modification time of the file/directory.
          type: string
        mime_type:
          readOnly: true
          type: string
          description:
            Output only. The MIME type of the file (e.g., "text/python",
            "image/png"). Empty for directories. NOLINT
        type:
          description: Output only. The type of the entry.
          enum:
            - TYPE_UNSPECIFIED
            - FILE
            - DIRECTORY
          readOnly: true
          type: string
        path:
          readOnly: true
          type: string
          description:
            Output only. The full relative path within the environment (e.g.,
            "workspace/src/main.py").
        size_bytes:
          description:
            Output only. The size of the file/directory in bytes. NOLINT
          readOnly: true
          type: string
          format: int64
      type: object
      description: Metadata for a file or directory within an environment.
    TransferOwnershipResponse:
      description: Response from `TransferOwnership`.
      type: object
      properties: {}
    Embedding:
      properties:
        value:
          description: The embedding values.
          type: array
          items:
            format: float
            type: number
      type: object
      description: A list of floats representing the embedding.
    ListGeneratedFilesResponse:
      properties:
        generatedFiles:
          items:
            $ref: '#/components/schemas/GeneratedFile'
          type: array
          description: The list of `GeneratedFile`s.
        nextPageToken:
          description:
            A token that can be sent as a `page_token` into a subsequent
            `ListGeneratedFiles` call.
          type: string
      description: Response for `ListGeneratedFiles`.
      type: object
    FunctionDeclaration:
      properties:
        parametersJsonSchema:
          description:
            'Optional. Describes the parameters to the function in JSON Schema
            format. The schema must describe an object where the properties are
            the parameters to the function. For example: ``` { "type": "object",
            "properties": { "name": { "type": "string" }, "age": { "type":
            "integer" } }, "additionalProperties": false, "required": ["name",
            "age"], "propertyOrdering": ["name", "age"] } ``` This field is
            mutually exclusive with `parameters`.'
        parameters:
          $ref: '#/components/schemas/Schema'
        response:
          $ref: '#/components/schemas/Schema'
        responseJsonSchema:
          description:
            Optional. Describes the output from this function in JSON Schema
            format. The value specified by the schema is the response value of
            the function. This field is mutually exclusive with `response`.
        behavior:
          description:
            Optional. Specifies the function Behavior. Currently only supported
            by the BidiGenerateContent method.
          type: string
          enum:
            - UNSPECIFIED
            - BLOCKING
            - NON_BLOCKING
        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
        description:
          type: string
          description: Required. A brief description of the function.
      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.
    LatLng:
      description:
        An object that represents a latitude/longitude pair. This is expressed
        as a pair of doubles to represent degrees latitude and degrees
        longitude. Unless specified otherwise, this object must conform to the
        WGS84 standard. Values must be within normalized ranges.
      type: object
      properties:
        latitude:
          format: double
          type: number
          description:
            The latitude in degrees. It must be in the range [-90.0, +90.0].
        longitude:
          description:
            The longitude in degrees. It must be in the range [-180.0, +180.0].
          format: double
          type: number
    RetrievalConfig:
      properties:
        latLng:
          $ref: '#/components/schemas/LatLng'
        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.
      type: object
    Permission:
      properties:
        emailAddress:
          description:
            Optional. Immutable. The email address of the user of group which
            this permission refers. Field is not set when permission's grantee
            type is EVERYONE.
          type: string
        granteeType:
          description: Optional. Immutable. The type of the grantee.
          enum:
            - GRANTEE_TYPE_UNSPECIFIED
            - USER
            - GROUP
            - EVERYONE
          type: string
        name:
          readOnly: true
          description:
            'Output only. Identifier. The permission name. A unique name will be
            generated on create. Examples:
            tunedModels/{tuned_model}/permissions/{permission}
            corpora/{corpus}/permissions/{permission} Output only.'
          type: string
        role:
          enum:
            - ROLE_UNSPECIFIED
            - OWNER
            - WRITER
            - READER
          type: string
          description: Required. The role granted by this permission.
      type: object
      description:
        "Permission resource grants user, group or the rest of the world access
        to the PaLM API resource (e.g. a tuned model, corpus). A role is a
        collection of permitted operations that allows users to perform specific
        actions on PaLM API resources. To make them available to users, groups,
        or service accounts, you assign roles. When you assign a role, you grant
        permissions that the role contains. There are three concentric roles.
        Each role is a superset of the previous role's permitted operations: -
        reader can use the resource (e.g. tuned model, corpus) for inference -
        writer has reader's permissions and additionally can edit and share -
        owner has writer's permissions and additionally can delete"
    ContextWindowCompressionConfig:
      properties:
        triggerTokens:
          format: int64
          type: string
          description:
            The number of tokens (before running a turn) required to trigger a
            context window compression. This can be used to balance quality
            against latency as shorter context windows may result in faster
            model responses. However, any compression operation will cause a
            temporary latency increase, so they should not be triggered
            frequently. If not set, the default is 80% of the model's context
            window limit. This leaves 20% for the next user request/model
            response.
        slidingWindow:
          $ref: '#/components/schemas/SlidingWindow'
      type: object
      description:
        Enables context window compression — a mechanism for managing the
        model's context window so that it does not exceed a given length.
    UrlContext:
      description: Tool to support URL context retrieval.
      type: object
      properties: {}
    ModelStatus:
      type: object
      properties:
        retirementTime:
          type: string
          format: google-datetime
          description: The time at which the model will be retired.
        modelStage:
          enumDeprecated:
            - false
            - true
            - false
            - false
            - false
            - false
            - true
            - false
          type: string
          description: The stage of the underlying model.
          enum:
            - MODEL_STAGE_UNSPECIFIED
            - UNSTABLE_EXPERIMENTAL
            - EXPERIMENTAL
            - PREVIEW
            - STABLE
            - LEGACY
            - DEPRECATED
            - RETIRED
        message:
          type: string
          description: A message explaining the model status.
      description:
        The status of the underlying model. This is used to indicate the stage
        of the underlying model and the retirement time if applicable.
    CountTokensRequest:
      properties:
        generateContentRequest:
          $ref: '#/components/schemas/GenerateContentRequest'
        contents:
          description:
            Optional. The input given to the model as a prompt. This field is
            ignored when `generate_content_request` is set.
          items:
            $ref: '#/components/schemas/Content'
          type: array
      type: object
      description:
        Counts the number of tokens in the `prompt` sent to a model. Models may
        tokenize text differently, so each model may return a different
        `token_count`.
    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
    GroundingChunkCustomMetadata:
      properties:
        key:
          description: The key of the metadata.
          type: string
        stringListValue:
          $ref: '#/components/schemas/GroundingChunkStringList'
        numericValue:
          description:
            Optional. The numeric value of the metadata. The expected range for
            this value depends on the specific `key` used.
          type: number
          format: float
        stringValue:
          type: string
          description: Optional. The string value of the metadata.
      type: object
      description: User provided metadata about the GroundingFact.
    HistoryConfig:
      description:
        History configuration. This message is included in the session
        configuration as `BidiGenerateContentSetup.history_config`. Configures
        the exchange of history messages.
      type: object
      properties:
        initialHistoryInClientContent:
          type: boolean
          description:
            Optional. If true, after sending `setup_complete`, the server will
            wait and at first process `client_content` messages until
            `turn_complete` is `true`. This initial history will not trigger a
            model call and may end with role `MODEL`. After `turn_complete` is
            `true`, the client can start the realtime conversation via
            `realtime_input`.
    CountMessageTokensResponse:
      description:
        A response from `CountMessageTokens`. It returns the model's
        `token_count` for the `prompt`.
      properties:
        tokenCount:
          type: integer
          format: int32
          description:
            The number of tokens that the `model` tokenizes the `prompt` into.
            Always non-negative.
      type: object
    SemanticRetrieverConfig:
      description:
        Configuration for retrieving grounding content from a `Corpus` or
        `Document` created using the Semantic Retriever API.
      properties:
        maxChunksCount:
          type: integer
          description:
            Optional. Maximum number of relevant `Chunk`s to retrieve.
          format: int32
        query:
          $ref: '#/components/schemas/Content'
        source:
          type: string
          description:
            'Required. Name of the resource for retrieval. Example:
            `corpora/123` or `corpora/123/documents/abc`.'
        minimumRelevanceScore:
          format: float
          type: number
          description:
            Optional. Minimum relevance score for retrieved relevant `Chunk`s.
        metadataFilters:
          items:
            $ref: '#/components/schemas/MetadataFilter'
          description:
            Optional. Filters for selecting `Document`s and/or `Chunk`s from the
            resource.
          type: array
      type: object
    RetrievedContext:
      description: Chunk from context retrieved by the file search tool.
      type: object
      properties:
        title:
          type: string
          description: Optional. Title of the document.
        fileSearchStore:
          type: string
          description:
            'Optional. Name of the `FileSearchStore` containing the document.
            Example: `fileSearchStores/123`'
        mediaId:
          description:
            'Optional. The media blob resource name for multimodal file search
            results. Format:
            fileSearchStores/{file_search_store_id}/media/{blob_id}'
          type: string
        customMetadata:
          type: array
          items:
            $ref: '#/components/schemas/GroundingChunkCustomMetadata'
          description:
            Optional. User-provided metadata about the retrieved context.
        text:
          type: string
          description: Optional. Text of the chunk.
        uri:
          type: string
          description:
            Optional. URI reference of the semantic retrieval document.
        pageNumber:
          type: integer
          format: int32
          description:
            Optional. Page number of the retrieved context, if applicable.
    V1mainTuningSnapshot:
      properties:
        step:
          description: Output only. The tuning step.
          readOnly: true
          type: integer
          format: int32
        epoch:
          description: Output only. The epoch this step was part of.
          format: int32
          type: integer
          readOnly: true
        computeTime:
          type: string
          readOnly: true
          description: Output only. The timestamp when this metric was computed.
          format: google-datetime
        meanLoss:
          format: float
          description:
            Output only. The mean loss of the training examples for this step.
          readOnly: true
          type: number
      type: object
      description: Record for a single tuning step.
    SemanticRetrieverChunk:
      description:
        Identifier for a `Chunk` retrieved via Semantic Retriever specified in
        the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.
      type: object
      properties:
        source:
          type: string
          description:
            "Output only. Name of the source matching the request's
            `SemanticRetrieverConfig.source`. Example: `corpora/123` or
            `corpora/123/documents/abc`"
          readOnly: true
        chunk:
          description:
            'Output only. Name of the `Chunk` containing the attributed text.
            Example: `corpora/123/documents/abc/chunks/xyz`'
          type: string
          readOnly: true
    EmbedContentBatch:
      description: A resource representing a batch of `EmbedContent` requests.
      properties:
        inputConfig:
          $ref: '#/components/schemas/InputEmbedContentConfig'
        priority:
          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.
          type: string
        name:
          readOnly: true
          description:
            'Output only. Identifier. Resource name of the batch. Format:
            `batches/{batch_id}`.'
          type: string
        createTime:
          format: google-datetime
          type: string
          description: Output only. The time at which the batch was created.
          readOnly: true
        updateTime:
          description:
            Output only. The time at which the batch was last updated.
          type: string
          format: google-datetime
          readOnly: true
        batchStats:
          $ref: '#/components/schemas/EmbedContentBatchStats'
        output:
          $ref: '#/components/schemas/EmbedContentBatchOutput'
        state:
          enum:
            - BATCH_STATE_UNSPECIFIED
            - BATCH_STATE_PENDING
            - BATCH_STATE_RUNNING
            - BATCH_STATE_SUCCEEDED
            - BATCH_STATE_FAILED
            - BATCH_STATE_CANCELLED
            - BATCH_STATE_EXPIRED
          readOnly: true
          type: string
          description: Output only. The state of the batch.
        endTime:
          readOnly: true
          format: google-datetime
          description:
            Output only. The time at which the batch processing completed.
          type: string
        displayName:
          description: Required. The user-defined name of this batch.
          type: string
        model:
          description:
            'Required. The name of the `Model` to use for generating the
            completion. Format: `models/{model}`.'
          type: string
      type: object
    EnvironmentNetworkEgressAllowlist:
      description: Network egress configuration for the environment.
      type: object
      properties:
        allowlist:
          items:
            $ref: '#/components/schemas/EgressRule'
          description:
            List of allowed domains and their configurations. Set to
            `"disabled"` to block all network egress.
          type: array
    ObjectId:
      properties:
        generation:
          format: int64
          description:
            Generation of the object. Generations are monotonically increasing
            across writes, allowing them to be be compared to determine which
            generation is newer. If this is omitted in a request, then you are
            requesting the live object. See http://go/bigstore-versions
          type: string
        bucketName:
          description: The name of the bucket to which this object belongs.
          type: string
        objectName:
          type: string
          description: The name of the object.
      description:
        This is a copy of the tech.blob.ObjectId proto, which could not be used
        directly here due to transitive closure issues with JavaScript support;
        see http://b/8801763.
      type: object
    UsageMetadata:
      description: Metadata on the generation request's token usage.
      type: object
      properties:
        cachedContentTokenCount:
          description:
            Number of tokens in the cached part of the prompt (the cached
            content)
          type: integer
          format: int32
        candidatesTokensDetails:
          description:
            Output only. List of modalities that were returned in the response.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          type: array
          readOnly: true
        toolUsePromptTokensDetails:
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          type: array
          readOnly: true
          description:
            Output only. List of modalities that were processed for tool-use
            request inputs.
        candidatesTokenCount:
          format: int32
          description:
            Total number of tokens across all the generated response candidates.
          type: integer
        promptTokenCount:
          format: int32
          type: integer
          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.
        toolUsePromptTokenCount:
          format: int32
          description:
            Output only. Number of tokens present in tool-use prompt(s).
          type: integer
          readOnly: true
        totalTokenCount:
          format: int32
          type: integer
          description:
            Total token count for the generation request (prompt + tool-use
            prompt + thoughts + response candidates).
        thoughtsTokenCount:
          readOnly: true
          type: integer
          format: int32
          description:
            Output only. Number of tokens of thoughts for thinking models.
        cacheTokensDetails:
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          type: array
          readOnly: true
          description:
            Output only. List of modalities of the cached content in the request
            input.
        promptTokensDetails:
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          type: array
          description:
            Output only. List of modalities that were processed in the request
            input.
          readOnly: true
        serviceTier:
          readOnly: true
          enum:
            - unspecified
            - standard
            - flex
            - priority
          description: Output only. Service tier of the request.
          type: string
    ToolResponse:
      properties:
        id:
          description:
            Optional. The identifier of the tool call this response is for.
          type: string
        toolType:
          type: string
          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
        response:
          additionalProperties:
            description: Properties of the object.
          type: object
          description: Optional. The tool response.
      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
    DownloadFileResponse:
      description: Response for `DownloadFile`.
      properties: {}
      type: object
    CountTextTokensRequest:
      type: object
      description:
        Counts the number of tokens in the `prompt` sent to a model. Models may
        tokenize text differently, so each model may return a different
        `token_count`.
      properties:
        prompt:
          $ref: '#/components/schemas/TextPrompt'
    Hyperparameters:
      properties:
        learningRate:
          type: number
          description:
            Optional. Immutable. The learning rate hyperparameter for tuning. If
            not set, a default of 0.001 or 0.0002 will be calculated based on
            the number of training examples.
          format: float
        epochCount:
          type: integer
          format: int32
          description:
            Immutable. The number of training epochs. An epoch is one pass
            through the training data. If not set, a default of 5 will be used.
        batchSize:
          type: integer
          description:
            Immutable. The batch size hyperparameter for tuning. If not set, a
            default of 4 or 16 will be used based on the number of training
            examples.
          format: int32
        learningRateMultiplier:
          format: float
          type: number
          description:
            Optional. Immutable. The learning rate multiplier is used to
            calculate a final learning_rate based on the default (recommended)
            value. Actual learning rate := learning_rate_multiplier * default
            learning rate Default learning rate is dependent on base model and
            dataset size. If not set, a default of 1.0 will be used.
      description:
        Hyperparameters controlling the tuning process. Read more at
        https://aistudio.google.com/docs/model-tuning
      type: object
    ListDocumentsResponse:
      type: object
      properties:
        nextPageToken:
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no more pages.
          type: string
        documents:
          description: The returned `Document`s.
          type: array
          items:
            $ref: '#/components/schemas/Document'
      description:
        Response from `ListDocuments` containing a paginated list of
        `Document`s. The `Document`s are sorted by ascending
        `document.create_time`.
    Candidate:
      description: A response candidate generated from the model.
      properties:
        tokenCount:
          format: int32
          readOnly: true
          description: Output only. Token count for this candidate.
          type: integer
        citationMetadata:
          $ref: '#/components/schemas/CitationMetadata'
        groundingAttributions:
          type: array
          readOnly: true
          description:
            Output only. Attribution information for sources that contributed to
            a grounded answer. This field is populated for `GenerateAnswer`
            calls.
          items:
            $ref: '#/components/schemas/GroundingAttribution'
        content:
          $ref: '#/components/schemas/Content'
        groundingMetadata:
          $ref: '#/components/schemas/GroundingMetadata'
        index:
          readOnly: true
          description:
            Output only. Index of the candidate in the list of response
            candidates.
          type: integer
          format: int32
        urlContextMetadata:
          $ref: '#/components/schemas/UrlContextMetadata'
        logprobsResult:
          $ref: '#/components/schemas/LogprobsResult'
        avgLogprobs:
          format: double
          description:
            Output only. Average log probability score of the candidate.
          readOnly: true
          type: number
        safetyRatings:
          type: array
          description:
            List of ratings for the safety of a response candidate. There is at
            most one rating per category.
          items:
            $ref: '#/components/schemas/SafetyRating'
        finishReason:
          type: string
          description:
            Optional. Output only. The reason why the model stopped generating
            tokens. If empty, the model has not stopped generating tokens.
          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
          readOnly: true
        continuationToken:
          description:
            An optional opaque continuation token returned when `finish_reason`
            is `CONTINUATION`. Clients can pass this token in a subsequent
            `GenerateContentRequest` to continue generation.
          format: byte
          type: string
        finishMessage:
          description:
            Optional. Output only. Details the reason why the model stopped
            generating tokens. This is populated only when `finish_reason` is
            set.
          readOnly: true
          type: string
      type: object
    GenerateTextResponse:
      type: object
      description: The response from the model, including candidate completions.
      properties:
        filters:
          description:
            A set of content filtering metadata for the prompt and response
            text. This indicates which `SafetyCategory`(s) blocked a candidate
            from this response, the lowest `HarmProbability` that triggered a
            block, and the HarmThreshold setting for that category. This
            indicates the smallest change to the `SafetySettings` that would be
            necessary to unblock at least 1 response. The blocking is configured
            by the `SafetySettings` in the request (or the default
            `SafetySettings` of the API).
          type: array
          items:
            $ref: '#/components/schemas/ContentFilter'
        candidates:
          items:
            $ref: '#/components/schemas/TextCompletion'
          description: Candidate responses from the model.
          type: array
        safetyFeedback:
          description: Returns any safety feedback related to content filtering.
          items:
            $ref: '#/components/schemas/SafetyFeedback'
          type: array
    ListCachedContentsResponse:
      type: object
      description: Response with CachedContents list.
      properties:
        cachedContents:
          type: array
          description: List of cached contents.
          items:
            $ref: '#/components/schemas/CachedContent'
        nextPageToken:
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no subsequent pages.
          type: string
    ListTunedModelsResponse:
      description:
        Response from `ListTunedModels` containing a paginated list of Models.
      properties:
        tunedModels:
          items:
            $ref: '#/components/schemas/TunedModel'
          description: The returned Models.
          type: array
        nextPageToken:
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no more pages.
          type: string
      type: object
    BatchEmbedTextRequest:
      properties:
        texts:
          items:
            type: string
          type: array
          description:
            Optional. The free-form input texts that the model will turn into an
            embedding. The current limit is 100 texts, over which an error will
            be thrown.
        requests:
          type: array
          items:
            $ref: '#/components/schemas/EmbedTextRequest'
          description:
            Optional. Embed requests for the batch. Only one of `texts` or
            `requests` can be set.
      type: object
      description: Batch request to get a text embedding from the model.
    EgressRule:
      properties:
        domain:
          description:
            Domain to allow outbound requests to. Supports wildcards (e.g.
            '*.googleapis.com'). Use '*' to allow all domains.
          type: string
        credential:
          description:
            Optional. Reference to a server-managed Credential resource by ID.
          type: string
        transform:
          type: object
          description:
            'Headers to inject into requests matching this rule. Key: header
            name (e.g., "Authorization"). Value: header value (e.g., "Bearer
            your-token").'
          additionalProperties:
            type: string
        mode:
          enum:
            - NETWORK_MODE_UNSPECIFIED
            - DISABLED
          description:
            'Network egress mode. Set via the `"allowlist": "disabled"` short
            form; must be the only rule in the allowlist and cannot be combined
            with `domain`, `transform` or `credential`.'
          type: string
      description:
        A single domain allowlist rule with optional header injection.
      type: object
    ImageResponseFormat:
      description: Configuration for image output format.
      type: object
      properties:
        imageSize:
          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
          type: string
        delivery:
          enum:
            - DELIVERY_UNSPECIFIED
            - INLINE
            - URI
          type: string
          description: Optional. The delivery mode for the image output.
        aspectRatio:
          description: Optional. The aspect ratio for the image output.
          type: string
          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
        mimeType:
          description: Optional. The MIME type of the image output.
          type: string
          enum:
            - MIME_TYPE_UNSPECIFIED
            - IMAGE_JPEG
    GenerateMessageRequest:
      type: object
      description: Request to generate a message response from the model.
      properties:
        topK:
          type: integer
          description:
            Optional. The maximum number of tokens to consider when sampling.
            The model uses combined Top-k and nucleus sampling. Top-k sampling
            considers the set of `top_k` most probable tokens.
          format: int32
        temperature:
          type: number
          description:
            Optional. Controls the randomness of the output. Values can range
            over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce
            responses that are more varied, while a value closer to `0.0` will
            typically result in less surprising responses from the model.
          format: float
        topP:
          description:
            Optional. The maximum cumulative probability of tokens to consider
            when sampling. The model uses combined Top-k and nucleus sampling.
            Nucleus sampling considers the smallest set of tokens whose
            probability sum is at least `top_p`.
          format: float
          type: number
        candidateCount:
          description:
            Optional. The number of generated response messages to return. This
            value must be between `[1, 8]`, inclusive. If unset, this will
            default to `1`.
          type: integer
          format: int32
        prompt:
          $ref: '#/components/schemas/MessagePrompt'
    PromptFeedback:
      properties:
        safetyRatings:
          type: array
          description:
            Ratings for safety of the prompt. There is at most one rating per
            category.
          items:
            $ref: '#/components/schemas/SafetyRating'
        blockReason:
          type: string
          description:
            Optional. If set, the prompt was blocked and no candidates are
            returned. Rephrase the prompt.
          enum:
            - BLOCK_REASON_UNSPECIFIED
            - SAFETY
            - OTHER
            - BLOCKLIST
            - PROHIBITED_CONTENT
            - IMAGE_SAFETY
      type: object
      description:
        A set of the feedback metadata the prompt specified in
        `GenerateContentRequest.content`.
    CustomMetadata:
      description: User provided metadata stored as key-value pairs.
      type: object
      properties:
        numericValue:
          format: float
          type: number
          description: The numeric value of the metadata to store.
        key:
          description: Required. The key of the metadata to store.
          type: string
        stringValue:
          description: The string value of the metadata to store.
          type: string
        stringListValue:
          $ref: '#/components/schemas/StringList'
    WordInfo:
      type: object
      properties:
        endOffset:
          description:
            Optional. End offset in time of the word relative to the start of
            the audio.
          type: string
          format: google-duration
        startOffset:
          description:
            Optional. Start offset in time of the word relative to the start of
            the audio.
          type: string
          format: google-duration
        word:
          description: Required. Transcript of the word.
          type: string
      description: Information about a single recognized word.
    GenerateContentResponse:
      description:
        'Response from the model supporting multiple candidate responses. Safety
        ratings and content filtering are reported for both prompt in
        `GenerateContentResponse.prompt_feedback` and for each candidate in
        `finish_reason` and in `safety_ratings`. The API: - Returns either all
        requested candidates or none of them - Returns no candidates at all only
        if there was something wrong with the prompt (check `prompt_feedback`) -
        Reports feedback on each candidate in `finish_reason` and
        `safety_ratings`.'
      properties:
        modelVersion:
          type: string
          readOnly: true
          description:
            Output only. The model version used to generate the response.
        modelStatus:
          $ref: '#/components/schemas/ModelStatus'
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/Candidate'
          description: Candidate responses from the model.
        usageMetadata:
          $ref: '#/components/schemas/UsageMetadata'
        promptFeedback:
          $ref: '#/components/schemas/PromptFeedback'
        responseId:
          type: string
          readOnly: true
          description:
            Output only. response_id is used to identify each response.
      type: object
    ImageSearch:
      properties: {}
      description: Image search for grounding and related configurations.
      type: object
    WebSearch:
      description: Standard web search for grounding and related configurations.
      properties: {}
      type: object
    GroundingAttribution:
      description: Attribution for a source that contributed to an answer.
      properties:
        sourceId:
          $ref: '#/components/schemas/AttributionSourceId'
        content:
          $ref: '#/components/schemas/Content'
      type: object
    BatchEmbedContentsResponse:
      type: object
      description: The response to a `BatchEmbedContentsRequest`.
      properties:
        embeddings:
          items:
            $ref: '#/components/schemas/ContentEmbedding'
          readOnly: true
          description:
            Output only. The embeddings for each request, in the same order as
            provided in the batch request.
          type: array
        usageMetadata:
          $ref: '#/components/schemas/EmbeddingUsageMetadata'
    ImportFileRequest:
      description:
        Request for `ImportFile` to import a File API file with a
        `FileSearchStore`.
      type: object
      properties:
        customMetadata:
          description: Custom metadata to be associated with the file.
          type: array
          items:
            $ref: '#/components/schemas/CustomMetadata'
        fileName:
          type: string
          description:
            'Required. The name of the `File` to import. Example:
            `files/abc-123`'
        chunkingConfig:
          $ref: '#/components/schemas/ChunkingConfig'
    ToolCall:
      description:
        A predicted server-side `ToolCall` returned from the model. This message
        contains information about a tool that the model wants to invoke. The
        client is NOT expected to execute this `ToolCall`. Instead, the client
        should pass this `ToolCall` back to the API in a subsequent turn within
        a `Content` message, along with the corresponding `ToolResponse`.
      properties:
        toolName:
          description: Optional. The name of the tool that was called.
          type: string
        toolType:
          type: string
          description: Required. The type of tool that was called.
          enum:
            - TOOL_TYPE_UNSPECIFIED
            - GOOGLE_SEARCH_WEB
            - GOOGLE_SEARCH_IMAGE
            - URL_CONTEXT
            - GOOGLE_MAPS
            - FILE_SEARCH
            - MEDIA_PROCESSING
        id:
          description:
            Optional. Unique identifier of the tool call. The server returns the
            tool response with the matching `id`.
          type: string
        args:
          type: object
          description:
            'Optional. The tool call arguments. Example: {"arg1" : "value1",
            "arg2" : "value2" , ...}'
          additionalProperties:
            description: Properties of the object.
      type: object
    SafetyFeedback:
      type: object
      description:
        Safety feedback for an entire request. This field is populated if
        content in the input and/or response is blocked due to safety settings.
        SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback
        will return the safety settings used by the request as well as the
        lowest HarmProbability that should be allowed in order to return a
        result.
      properties:
        setting:
          $ref: '#/components/schemas/SafetySetting'
        rating:
          $ref: '#/components/schemas/SafetyRating'
    Empty:
      description:
        'A generic empty message that you can re-use to avoid defining
        duplicated empty messages in your APIs. A typical example is to use it
        as the request or the response type of an API method. For instance:
        service Foo { rpc Bar(google.protobuf.Empty) returns
        (google.protobuf.Empty); }'
      type: object
      properties: {}
    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:
          enumDeprecated:
            - false
            - true
            - true
            - true
            - true
            - true
            - true
            - false
            - false
            - false
            - false
            - true
            - false
          type: string
          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
        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
            - false
    GoogleSearchRetrieval:
      description:
        Tool to retrieve public web data for grounding, powered by Google.
      type: object
      properties:
        dynamicRetrievalConfig:
          $ref: '#/components/schemas/DynamicRetrievalConfig'
    Content:
      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.
      type: object
      properties:
        parts:
          type: array
          items:
            $ref: '#/components/schemas/Part'
          description:
            Ordered `Parts` that constitute a single message. Parts may have
            different MIME types.
        role:
          type: string
          description:
            Optional. The producer of the content. Must be either 'user' or
            'model'. Useful to set for multi-turn conversations, otherwise can
            be left blank or unset.
    CustomLongRunningOperation:
      properties:
        name:
          type: string
          description:
            The server-assigned name, which is only unique within the same
            service that originally returns it. If you use the default HTTP
            mapping, the `name` should be a resource name ending with
            `operations/{unique_id}`.
        done:
          type: boolean
          description:
            If the value is `false`, it means the operation is still in
            progress. If `true`, the operation is completed, and either `error`
            or `response` is available.
        response:
          additionalProperties:
            description:
              Properties of the object. Contains field @type with type URL.
          type: object
          description:
            The normal, successful response of the operation. If the original
            method returns no data on success, such as `Delete`, the response is
            `google.protobuf.Empty`. If the original method is standard
            `Get`/`Create`/`Update`, the response should be the resource. For
            other methods, the response should have the type `XxxResponse`,
            where `Xxx` is the original method name. For example, if the
            original method name is `TakeSnapshot()`, the inferred response type
            is `TakeSnapshotResponse`.
        metadata:
          type: object
          additionalProperties:
            description:
              Properties of the object. Contains field @type with type URL.
          description:
            Service-specific metadata associated with the operation. It
            typically contains progress information and common metadata such as
            create time. Some services might not provide such metadata. Any
            method that returns a long-running operation should document the
            metadata type, if any.
        error:
          $ref: '#/components/schemas/Status'
      type: object
    Tool:
      properties:
        functionDeclarations:
          items:
            $ref: '#/components/schemas/FunctionDeclaration'
          description:
            Optional. A list of `FunctionDeclarations` available to the model
            that can be used for function calling. The model or system does not
            execute the function. Instead the defined function may be returned
            as a FunctionCall with arguments to the client side for execution.
            The model may decide to call a subset of these functions by
            populating FunctionCall in the response. The next conversation turn
            may contain a FunctionResponse with the Content.role "function"
            generation context for the next model turn.
          type: array
        googleSearch:
          $ref: '#/components/schemas/GoogleSearch'
        googleMaps:
          $ref: '#/components/schemas/GoogleMaps'
        computerUse:
          $ref: '#/components/schemas/ComputerUse'
        urlContext:
          $ref: '#/components/schemas/UrlContext'
        fileSearch:
          $ref: '#/components/schemas/FileSearch'
        codeExecution:
          $ref: '#/components/schemas/CodeExecution'
        googleSearchRetrieval:
          $ref: '#/components/schemas/GoogleSearchRetrieval'
        mcpServers:
          items:
            $ref: '#/components/schemas/McpServer'
          description: Optional. MCP Servers to connect to.
          type: array
      type: object
      description:
        Tool details that the model may use to generate response. A `Tool` is a
        piece of code that enables the system to interact with external systems
        to perform an action, or set of actions, outside of knowledge and scope
        of the model.
    AsyncBatchEmbedContentRequest:
      properties:
        batch:
          $ref: '#/components/schemas/EmbedContentBatch'
      description: Request for an `AsyncBatchEmbedContent` operation.
      type: object
    SlidingWindow:
      properties:
        targetTokens:
          format: int64
          description:
            The target number of tokens to keep. The default value is
            trigger_tokens/2. Discarding parts of the context window causes a
            temporary latency increase so this value should be calibrated to
            avoid frequent compression operations.
          type: string
      type: object
      description:
        The SlidingWindow method operates by discarding content at the beginning
        of the context window. The resulting context will always begin at the
        start of a USER role turn. System instructions and any
        `BidiGenerateContentSetup.prefix_turns` will always remain at the
        beginning of the result.
    SearchTypes:
      type: object
      description:
        Different types of search that can be enabled on the GoogleSearch tool.
      properties:
        webSearch:
          $ref: '#/components/schemas/WebSearch'
        imageSearch:
          $ref: '#/components/schemas/ImageSearch'
    RetrievalMetadata:
      properties:
        googleSearchDynamicRetrievalScore:
          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.
          type: number
          format: float
      description: Metadata related to retrieval in the grounding flow.
      type: object
    ChunkingConfig:
      type: object
      properties:
        whiteSpaceConfig:
          $ref: '#/components/schemas/WhiteSpaceConfig'
      description:
        Parameters for telling the service how to chunk the file. inspired by
        google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto
    CitationSource:
      properties:
        endIndex:
          description: Optional. End of the attributed segment, exclusive.
          format: int32
          type: integer
        uri:
          type: string
          description:
            Optional. URI that is attributed as a source for a portion of the
            text.
        license:
          description:
            Optional. License for the GitHub project that is attributed as a
            source for segment. License info is required for code citations.
          type: string
        startIndex:
          format: int32
          description:
            Optional. Start of segment of the response that is attributed to
            this source. Index indicates the start of the segment, measured in
            bytes.
          type: integer
      type: object
      description: A citation to a source for a portion of a specific response.
    EmbedContentResponse:
      properties:
        embedding:
          $ref: '#/components/schemas/ContentEmbedding'
        usageMetadata:
          $ref: '#/components/schemas/EmbeddingUsageMetadata'
      description: The response to an `EmbedContentRequest`.
      type: object
    InputConfig:
      properties:
        requests:
          $ref: '#/components/schemas/InlinedRequests'
        fileName:
          type: string
          description: The name of the `File` containing the input requests.
      type: object
      description: Configures the input to the batch request.
    DownloadMediaResponse:
      type: object
      description: Response for DownloadMedia.
      properties:
        blob:
          $ref: '#/components/schemas/GdataMedia'
    AudioTranscriptionConfig:
      description: The audio transcription configuration.
      type: object
      properties:
        adaptationPhrases:
          deprecated: true
          items:
            type: string
          type: array
          description:
            Optional. A list of phrases used for speech adaptation, which biases
            the ASR model to improve recognition of these specific terms.
        diarization:
          description: Optional. Configures speaker diarization.
          type: boolean
        languageAuto:
          $ref: '#/components/schemas/LanguageAuto'
        mode:
          enum:
            - MODE_UNSPECIFIED
            - VERBATIM
            - SMART
          description:
            'Optional. Configures transcription mode. Supported values:
            `VERBATIM`, `SMART`. If unspecified, defaults to `VERBATIM`
            transcription. In `SMART` mode, the model performs disfluency
            removal (eliminating filler words, repetitions, and false starts),
            light grammatical cleanup, automatic formatting (paragraphs, bullet
            points, numbered lists), and minor user edits (inline
            self-corrections). Timestamps and diarization are incompatible with
            mode `SMART`.'
          type: string
        languageHints:
          $ref: '#/components/schemas/LanguageHints'
        wordTimestamp:
          type: boolean
          description: Optional. Configures word-level timestamp generation.
        languageCodes:
          type: array
          description:
            Optional. BCP-47 language codes providing hints about the languages
            present in the audio. If omitted or empty, defaults to automatic
            language detection.
          items:
            type: string
        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.
        customVocabulary:
          items:
            type: string
          description:
            Optional. A list of custom vocabulary phrases to bias the speech
            recognition model toward recognizing specific terms (product names,
            proper nouns, jargon).
          type: array
    ListCorporaResponse:
      type: object
      description:
        Response from `ListCorpora` containing a paginated list of `Corpora`.
        The results are sorted by ascending `corpus.create_time`.
      properties:
        corpora:
          type: array
          description: The returned corpora.
          items:
            $ref: '#/components/schemas/Corpus'
        nextPageToken:
          description:
            A token, which can be sent as `page_token` to retrieve the next
            page. If this field is omitted, there are no more pages.
          type: string
    V1mainMediaResolution:
      properties:
        level:
          type: string
          enum:
            - MEDIA_RESOLUTION_UNSPECIFIED
            - MEDIA_RESOLUTION_LOW
            - MEDIA_RESOLUTION_MEDIUM
            - MEDIA_RESOLUTION_HIGH
            - MEDIA_RESOLUTION_ULTRA_HIGH
          description:
            The tokenization quality used for given media. for Gemini API
            support .
      description: Media resolution for tokenization.
      type: object
    FunctionResponsePart:
      properties:
        audioMetadata:
          $ref: '#/components/schemas/AudioMetadata'
        documentMetadata:
          $ref: '#/components/schemas/DocumentMetadata'
        inlineData:
          $ref: '#/components/schemas/FunctionResponseBlob'
        videoMetadata:
          $ref: '#/components/schemas/VideoMetadata'
        mediaProcessing:
          type: string
          enum:
            - MEDIA_PROCESSING_UNSPECIFIED
            - STATIC
            - AGENTIC
          description:
            Optional. How the model processes this part's media for
            understanding. Only meaningful for video parts (`inline_data` or
            `file_data` with video mime). Non-video parts ignore this field.
        mediaResolution:
          $ref: '#/components/schemas/V1mainMediaResolution'
        spreadsheetMetadata:
          $ref: '#/components/schemas/SpreadsheetMetadata'
        fileData:
          $ref: '#/components/schemas/FunctionResponseFileData'
      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.
    GoogleSearch:
      properties:
        timeRangeFilter:
          $ref: '#/components/schemas/Interval'
        searchTypes:
          $ref: '#/components/schemas/SearchTypes'
      description:
        GoogleSearch tool type. Tool to support Google Search in Model. Powered
        by Google.
      type: object
    Environment:
      description: An execution environment for an agent.
      type: object
      properties:
        mode:
          enum:
            - ENVIRONMENT_MODE_UNSPECIFIED
            - ON_DEMAND
            - SELF_HOSTED
          readOnly: true
          description:
            Output only. The compute lifecycle mode for this environment.
          type: string
        sources:
          description: Sources to be mounted into the environment.
          type: array
          items:
            $ref: '#/components/schemas/Source'
        created:
          description:
            Output only. The time at which the environment was created in ISO
            8601 format (YYYY-MM-DDThh:mm:ssZ).
          type: string
          readOnly: true
        lastAccessed:
          type: string
          description:
            Output only. The time at which the environment was last accessed in
            ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
          readOnly: true
        id:
          description: Required. Output only. The ID of the environment.
          readOnly: true
          type: string
        updated:
          type: string
          readOnly: true
          description:
            Output only. The time at which the environment was last updated in
            ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
        customConfig:
          type: object
          additionalProperties:
            description: Properties of the object.
          description:
            Output only. Arbitrary customer-defined JSON configuration passed
            through to the self-hosted environment poller. Only populated for
            `self_hosted` environments when configured.
          readOnly: true
        networkAllowlist:
          $ref: '#/components/schemas/EnvironmentNetworkEgressAllowlist'
        fileCount:
          readOnly: true
          description:
            Output only. The number of files in the environment, output only.
          format: int64
          type: string
        sizeBytes:
          format: int64
          readOnly: true
          description:
            Output only. The total size of the environment files in bytes,
            output only.
          type: string
        environmentKey:
          type: string
          description:
            Output only. Secret token generated upon environment creation for
            self_hosted environments. Used by the self-hosted sandbox daemon to
            authenticate polling and streaming requests. Only returned when the
            environment is created; omitted when getting or listing environments
            later.
          readOnly: true
        networkMode:
          enum:
            - NETWORK_MODE_UNSPECIFIED
            - DISABLED
          description: Network egress mode.
          type: string
        status:
          type: string
          readOnly: true
          description: Output only. The status of the environment container.
          enum:
            - STATUS_UNSPECIFIED
            - ACTIVE
            - EXPIRED
    ContentTypeInfo:
      properties:
        bestGuess:
          type: string
          description:
            Scotty's best guess of what the content type of the file is.
        fromHeader:
          type: string
          description:
            The content type of the file as specified in the request headers,
            multipart headers, or RUPIO start request.
        fromBytes:
          description:
            The content type of the file derived by looking at specific bytes
            (i.e. "magic bytes") of the actual file.
          type: string
        fromUrlPath:
          type: string
          description:
            The content type of the file derived from the file extension of the
            URL path. The URL path is assumed to represent a file name (which is
            typically only true for agents that are providing a REST API).
        fromFileName:
          type: string
          description:
            The content type of the file derived from the file extension of the
            original file name used by the client.
        fromFusionId:
          type: string
          description:
            The content type of the file detected by Fusion ID. go/fusionid
        fusionIdDetectionMetadata:
          type: string
          description:
            Metadata information from Fusion ID detection. Serialized
            FusionIdDetectionMetadata proto. Only set if from_fusion_id is set.
          format: byte
      description:
        Detailed Content-Type information from Scotty. The Content-Type of the
        media will typically be filled in by the header or Scotty's best_guess,
        but this extended information provides the backend with more information
        so that it can make a better decision if needed. This is only used on
        media upload requests from Scotty.
      type: object
    CreateFileRequest:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/File'
      description: Request for `CreateFile`.
    EmbeddingUsageMetadata:
      type: object
      properties:
        promptTokenCount:
          format: int32
          type: integer
          readOnly: true
          description: Output only. Number of tokens in the prompt.
        promptTokenDetails:
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          type: array
          description:
            Output only. List of modalities that were processed in the request
            input.
          readOnly: true
      description: Metadata on the usage of the embedding request.
    InlinedEmbedContentResponses:
      type: object
      description: The responses to the requests in the batch.
      properties:
        inlinedResponses:
          readOnly: true
          items:
            $ref: '#/components/schemas/InlinedEmbedContentResponse'
          type: array
          description: Output only. The responses to the requests in the batch.
    PredictRequest:
      type: object
      description: Request message for PredictionService.Predict.
      properties:
        instances:
          items: {}
          type: array
          description:
            Required. The instances that are the input to the prediction call.
        labels:
          type: object
          description:
            'Optional. Labels with user-defined metadata for the request.
            Optional. Labels must follow standard unified Cloud label
            requirements: - Label keys must start with a letter. - Label keys
            and values can be no longer than 63 characters (Unicode codepoints)
            and can only contain lowercase letters, numeric characters,
            underscores, and dashes. - International characters are allowed.
            Usage: - Safety identifiers from aggregators: Use the key
            `safety_identifier` (e.g. `{"safety_identifier":
            "user_session_123"}`)'
          additionalProperties:
            type: string
        parameters:
          description: Optional. The parameters that govern the prediction call.
    MetadataFilter:
      description:
        'User provided filter to limit retrieval based on `Chunk` or `Document`
        level metadata values. Example (genre = drama OR genre = action): key =
        "document.custom_metadata.genre" conditions = [{string_value = "drama",
        operation = EQUAL}, {string_value = "action", operation = EQUAL}]'
      type: object
      properties:
        key:
          type: string
          description: Required. The key of the metadata to filter on.
        conditions:
          type: array
          description:
            Required. The `Condition`s for the given key that will trigger this
            filter. Multiple `Condition`s are joined by logical ORs.
          items:
            $ref: '#/components/schemas/Condition'
    InputEmbedContentConfig:
      description: Configures the input to the batch request.
      properties:
        fileName:
          description: The name of the `File` containing the input requests.
          type: string
        requests:
          $ref: '#/components/schemas/InlinedEmbedContentRequests'
      type: object
    Image:
      properties:
        sourceUri:
          type: string
          description: The web page URI for attribution.
        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
        title:
          type: string
          description: The title of the web page that the image is from.
      type: object
      description: Chunk from image search.
    Condition:
      description: Filter condition applicable to a single key.
      type: object
      properties:
        stringValue:
          type: string
          description: The string value to filter the metadata on.
        numericValue:
          format: float
          description: The numeric value to filter the metadata on.
          type: number
        operation:
          enum:
            - OPERATOR_UNSPECIFIED
            - LESS
            - LESS_EQUAL
            - EQUAL
            - GREATER_EQUAL
            - GREATER
            - NOT_EQUAL
            - INCLUDES
            - EXCLUDES
          type: string
          description:
            Required. Operator applied to the given key-value pair to trigger
            the condition.
    GroundingPassageId:
      description: Identifier for a part within a `GroundingPassage`.
      type: object
      properties:
        partIndex:
          description:
            Output only. Index of the part within the `GenerateAnswerRequest`'s
            `GroundingPassage.content`.
          type: integer
          readOnly: true
          format: int32
        passageId:
          description:
            Output only. ID of the passage matching the
            `GenerateAnswerRequest`'s `GroundingPassage.id`.
          readOnly: true
          type: string
    AudioTranscription:
      description:
        The transcription of an audio part. For multi-speaker audio, each
        speaker segment is a separate Part with its own AudioTranscription
        carrying the speaker_label.
      type: object
      properties:
        text:
          description: Required. The transcription text of this audio segment.
          type: string
        speakerLabel:
          type: string
          description:
            Optional. A label identifying the speaker of this audio segment
            (e.g. "spk_1", "spk_2"). Present when diarization is set.
        words:
          description:
            Optional. Detailed word-level transcriptions and timing details.
            Present when word_timestamp is set.
          type: array
          items:
            $ref: '#/components/schemas/WordInfo'
    ComputerUse:
      description: Computer Use tool type.
      properties:
        enablePromptInjectionDetection:
          description:
            Optional. Whether enable the prompt injection detection check on
            computer-use request.
          type: boolean
        environment:
          enum:
            - ENVIRONMENT_UNSPECIFIED
            - ENVIRONMENT_BROWSER
            - ENVIRONMENT_MOBILE
            - ENVIRONMENT_DESKTOP
          description: Required. The environment being operated.
          type: string
        disabledSafetyPolicies:
          type: array
          description: Optional. Disabled safety policies for computer use.
          items:
            enum:
              - SAFETY_POLICY_UNSPECIFIED
              - FINANCIAL_TRANSACTIONS
              - SENSITIVE_DATA_MODIFICATION
              - COMMUNICATION_TOOL
              - ACCOUNT_CREATION
              - DATA_MODIFICATION
              - USER_CONSENT_MANAGEMENT
              - LEGAL_TERMS_AND_AGREEMENTS
            type: string
        excludedPredefinedFunctions:
          type: array
          description:
            'Optional. By default, predefined functions are included in the
            final model call. Some of them can be explicitly excluded from being
            automatically included. This can serve two purposes: 1. Using a more
            restricted / different action space. 2. Improving the definitions /
            instructions of predefined functions.'
          items:
            type: string
      type: object
    Source:
      type: object
      properties:
        encoding:
          type: string
          description: Optional encoding for inline content (e.g. `base64`).
        target:
          description: Where the source should appear in the environment.
          type: string
        content:
          type: string
          description: The inline content if `type` is `INLINE`.
        type:
          enum:
            - TYPE_UNSPECIFIED
            - GCS
            - INLINE
            - REPOSITORY
          type: string
        source:
          description:
            The source of the environment. For Cloud Storage, this is the Cloud
            Storage path. For GitHub, this is the GitHub path.
          type: string
      description: A source to be mounted into the environment.
    FileData:
      type: object
      description: URI based data.
      properties:
        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:
          type: string
          description: Optional. The IANA standard MIME type of the source data.
        fileUri:
          description: Required. URI.
          type: string
    SearchEntryPoint:
      properties:
        renderedContent:
          description:
            Optional. Web content snippet that can be embedded in a web page or
            an app webview.
          type: string
        sdkBlob:
          type: string
          format: byte
          description:
            Optional. Base64 encoded JSON representing array of tuple.
      type: object
      description: Google search entry point.
    PredictLongRunningRequest:
      type: object
      properties:
        parameters:
          description: Optional. The parameters that govern the prediction call.
        labels:
          description:
            'Optional. Labels with user-defined metadata for the request.
            Optional. Labels must follow standard unified Cloud label
            requirements: - Label keys must start with a letter. - Label keys
            and values can be no longer than 63 characters (Unicode codepoints)
            and can only contain lowercase letters, numeric characters,
            underscores, and dashes. - International characters are allowed.
            Usage: - Safety identifiers from aggregators: Use the key
            `safety_identifier` (e.g. `{"safety_identifier":
            "user_session_123"}`)'
          additionalProperties:
            type: string
          type: object
        instances:
          items: {}
          description:
            Required. The instances that are the input to the prediction call.
          type: array
      description: Request message for [PredictionService.PredictLongRunning].
    ListOperationsResponse:
      properties:
        unreachable:
          items:
            type: string
          description:
            Unordered list. Unreachable resources. Populated when the request
            sets `ListOperationsRequest.return_partial_success` and reads across
            collections. For example, when attempting to list all resources
            across all supported locations.
          type: array
        nextPageToken:
          type: string
          description: The standard List next-page token.
        operations:
          type: array
          description:
            A list of operations that matches the specified filter in the
            request.
          items:
            $ref: '#/components/schemas/Operation'
      type: object
      description: The response message for Operations.ListOperations.
    BatchStats:
      properties:
        failedRequestCount:
          description:
            Output only. The number of requests that failed to be processed.
          readOnly: true
          type: string
          format: int64
        pendingRequestCount:
          readOnly: true
          type: string
          format: int64
          description:
            Output only. The number of requests that are still pending
            processing.
        successfulRequestCount:
          format: int64
          description:
            Output only. The number of requests that were successfully
            processed.
          type: string
          readOnly: true
        requestCount:
          type: string
          readOnly: true
          format: int64
          description: Output only. The number of requests in the batch.
      type: object
      description: Stats about the batch.
    StreamableHttpTransport:
      properties:
        timeout:
          format: google-duration
          description: HTTP timeout for regular operations.
          type: string
        url:
          description:
            'The full URL for the MCPServer endpoint. Example:
            "https://api.example.com/mcp"'
          type: string
        headers:
          description:
            'Optional: Fields for authentication headers, timeouts, etc., if
            needed.'
          type: object
          additionalProperties:
            type: string
        terminateOnClose:
          type: boolean
          description:
            Whether to close the client session when the transport closes.
        sseReadTimeout:
          description: Timeout for SSE read operations.
          format: google-duration
          type: string
      description: A transport that can stream HTTP requests and responses.
      type: object
    WhiteSpaceConfig:
      description:
        Configuration for a white space chunking algorithm [white space
        delimited].
      type: object
      properties:
        maxTokensPerChunk:
          format: int32
          description:
            'Maximum number of tokens per chunk. Tokens are defined as words for
            this chunking algorithm. Note: we are defining tokens as words split
            by whitespace as opposed to the output of a tokenizer. The context
            window of the latest gemini embedding model as of 2025-04-17 is
            currently 8192 tokens. We assume that the average word is 5
            characters. Therefore, we set the upper limit to 2**9, which is 512
            words, or 2560 tokens, assuming worst case a character per token.
            This is a conservative estimate meant to prevent context window
            overflow.'
          type: integer
        maxOverlapTokens:
          description:
            Maximum number of overlapping tokens between two adjacent chunks.
          type: integer
          format: int32
    StringList:
      type: object
      properties:
        values:
          items:
            type: string
          description: The string values of the metadata to store.
          type: array
      description:
        User provided string values assigned to a single metadata key.
    SpeechMetadata:
      description: Speech metadata for `text` parts.
      type: object
      properties:
        style:
          description:
            Optional. Optional style instruction for the speech synthesis.
          type: string
        speaker:
          description:
            Optional. Optional speaker name for multi-speaker synthesis.
          type: string
    CompositeMedia:
      type: object
      properties:
        crc32cHash:
          description: crc32.c hash for the payload.
          format: uint32
          type: integer
        blobstore2Info:
          $ref: '#/components/schemas/Blobstore2Info'
        referenceType:
          description: Describes what the field reference contains.
          type: string
          enum:
            - PATH
            - BLOB_REF
            - INLINE
            - BIGSTORE_REF
            - COSMO_BINARY_REFERENCE
        sha1Hash:
          description: SHA-1 hash for the payload.
          format: byte
          type: string
        path:
          description: Path to the data, set if reference_type is PATH
          type: string
        cosmoBinaryReference:
          type: string
          format: byte
          description:
            A binary data reference for a media download. Serves as a
            technology-agnostic binary reference in some Google infrastructure.
            This value is a serialized storage_cosmo.BinaryReference proto.
            Storing it as bytes is a hack to get around the fact that the cosmo
            proto (as well as others it includes) doesn't support JavaScript.
            This prevents us from including the actual type of this field.
        blobRef:
          description:
            Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This
            should be the byte representation of a blobstore.BlobRef. Since
            Blobstore is deprecating v1, use blobstore2_info instead. For now,
            any v2 blob will also be represented in this field as v1 BlobRef.
          type: string
          deprecated: true
          format: byte
        length:
          description: Size of the data, in bytes
          format: int64
          type: string
        inline:
          format: byte
          description: Media data, set if reference_type is INLINE
          type: string
        md5Hash:
          format: byte
          type: string
          description: MD5 hash for the payload.
        objectId:
          $ref: '#/components/schemas/ObjectId'
      description:
        A sequence of media data references representing composite data.
        Introduced to support Bigstore composite objects. For details, visit
        http://go/bigstore-composites.
    GoogleAiGenerativelanguageV1betaGroundingSupport:
      properties:
        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:
            format: int32
            type: integer
          type: array
        confidenceScores:
          items:
            type: number
            format: float
          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.
          type: array
        segment:
          $ref: '#/components/schemas/GoogleAiGenerativelanguageV1betaSegment'
        renderedParts:
          type: array
          readOnly: true
          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.
          items:
            format: int32
            type: integer
      description: Grounding support.
      type: object
    Part:
      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
      properties:
        fileData:
          $ref: '#/components/schemas/FileData'
        toolCall:
          $ref: '#/components/schemas/ToolCall'
        executableCode:
          $ref: '#/components/schemas/ExecutableCode'
        toolResponse:
          $ref: '#/components/schemas/ToolResponse'
        audioMetadata:
          $ref: '#/components/schemas/AudioMetadata'
        partMetadata:
          type: object
          description:
            Custom metadata associated with the Part. Agents using genai.Part as
            content representation may need to keep track of the additional
            information. For example it can be name of a file/source from which
            the Part originates or a way to multiplex multiple Part streams.
          additionalProperties:
            description: Properties of the object.
        spreadsheetMetadata:
          $ref: '#/components/schemas/SpreadsheetMetadata'
        speechMetadata:
          $ref: '#/components/schemas/SpeechMetadata'
        functionResponse:
          $ref: '#/components/schemas/FunctionResponse'
        functionCall:
          $ref: '#/components/schemas/FunctionCall'
        videoMetadata:
          $ref: '#/components/schemas/VideoMetadata'
        thought:
          type: boolean
          description:
            Optional. Indicates if the part is thought from the model.
        thoughtSignature:
          format: byte
          type: string
          description:
            Optional. An opaque signature for the thought so it can be reused in
            subsequent requests.
        documentMetadata:
          $ref: '#/components/schemas/DocumentMetadata'
        mediaResolution:
          $ref: '#/components/schemas/V1mainMediaResolution'
        inlineData:
          $ref: '#/components/schemas/Blob'
        audioTranscription:
          $ref: '#/components/schemas/AudioTranscription'
        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
        text:
          description: Inline text.
          type: string
        codeExecutionResult:
          $ref: '#/components/schemas/CodeExecutionResult'
    LogprobsResult:
      type: object
      properties:
        logProbabilitySum:
          description: Sum of log probabilities for all tokens.
          format: float
          type: number
        topCandidates:
          description: Length = total number of decoding steps.
          type: array
          items:
            $ref: '#/components/schemas/TopCandidates'
        chosenCandidates:
          items:
            $ref: '#/components/schemas/LogprobsResultCandidate'
          type: array
          description:
            Length = total number of decoding steps. The chosen candidates may
            or may not be in top_candidates.
      description: Logprobs Result
    EmbedContentBatchStats:
      description: Stats about the batch.
      type: object
      properties:
        requestCount:
          format: int64
          readOnly: true
          description: Output only. The number of requests in the batch.
          type: string
        successfulRequestCount:
          readOnly: true
          format: int64
          type: string
          description:
            Output only. The number of requests that were successfully
            processed.
        pendingRequestCount:
          type: string
          readOnly: true
          description:
            Output only. The number of requests that are still pending
            processing.
          format: int64
        failedRequestCount:
          description:
            Output only. The number of requests that failed to be processed.
          type: string
          readOnly: true
          format: int64
    EnvVar:
      description: An environment variable to set in the execution environment.
      type: object
      properties:
        credential:
          description:
            Optional reference to a server-managed Credential resource by ID.
          type: string
        value:
          description: Direct string value for plain environment variables.
          type: string
    TextPrompt:
      description:
        Text given to the model as a prompt. The Model will use this TextPrompt
        to Generate a text completion.
      properties:
        text:
          type: string
          description: Required. The prompt text.
      type: object
    RegisterFilesResponse:
      type: object
      properties:
        files:
          items:
            $ref: '#/components/schemas/File'
          description:
            The registered files to be used when calling GenerateContent.
          type: array
      description: Response for `RegisterFiles`.
    FunctionCallingConfig:
      type: object
      description: Configuration for specifying function calling behavior.
      properties:
        mode:
          enum:
            - MODE_UNSPECIFIED
            - AUTO
            - ANY
            - NONE
            - VALIDATED
          type: string
          description:
            Optional. Specifies the mode in which function calling should
            execute. If unspecified, the default value will be set to AUTO.
        allowedFunctionNames:
          type: array
          items:
            type: string
          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.
    Web:
      properties:
        uri:
          type: string
          description: Output only. URI reference of the chunk.
          readOnly: true
        title:
          type: string
          description: Output only. Title of the chunk.
          readOnly: true
      description: Chunk from the web.
      type: object
    Corpus:
      type: object
      properties:
        displayName:
          description:
            'Optional. The human-readable display name for the `Corpus`. The
            display name must be no more than 512 characters in length,
            including spaces. Example: "Docs on Semantic Retriever"'
          type: string
        createTime:
          description:
            Output only. The Timestamp of when the `Corpus` was created.
          type: string
          format: google-datetime
          readOnly: true
        updateTime:
          description:
            Output only. The Timestamp of when the `Corpus` was last updated.
          type: string
          format: google-datetime
          readOnly: true
        name:
          type: string
          description:
            'Output only. Immutable. Identifier. The `Corpus` resource name. The
            ID (name excluding the "corpora/" prefix) can contain up to 40
            characters that are lowercase alphanumeric or dashes (-). The ID
            cannot start or end with a dash. If the name is empty on create, a
            unique name will be derived from `display_name` along with a 12
            character random suffix. Example:
            `corpora/my-awesome-corpora-123a456b789c`'
          readOnly: true
      description:
        A `Corpus` is a collection of `Document`s. A project can create up to 10
        corpora.
    InlinedResponses:
      description: The responses to the requests in the batch.
      properties:
        inlinedResponses:
          items:
            $ref: '#/components/schemas/InlinedResponse'
          readOnly: true
          type: array
          description: Output only. The responses to the requests in the batch.
      type: object
    TuningExample:
      description: A single example for tuning.
      type: object
      properties:
        output:
          type: string
          description: Required. The expected model output.
        textInput:
          description: Optional. Text model input.
          type: string
    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.
    Message:
      properties:
        content:
          description: Required. The text content of the structured `Message`.
          type: string
        author:
          description:
            Optional. The author of this Message. This serves as a key for
            tagging the content of this Message when it is fed to the model as
            text. The author can be any alphanumeric string.
          type: string
        citationMetadata:
          $ref: '#/components/schemas/CitationMetadata'
      description:
        The base unit of structured text. A `Message` includes an `author` and
        the `content` of the `Message`. The `author` is used to tag messages
        when they are fed to the model as text.
      type: object
    VoiceConfig:
      description: The configuration for the voice to use.
      type: object
      properties:
        prebuiltVoiceConfig:
          $ref: '#/components/schemas/PrebuiltVoiceConfig'
        voice:
          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`).'
          type: string
    MultiSpeakerVoiceConfig:
      properties:
        speakerVoiceConfigs:
          items:
            $ref: '#/components/schemas/SpeakerVoiceConfig'
          type: array
          description: Required. All the enabled speaker voices.
      type: object
      description: The configuration for the multi-speaker setup.
    DiffUploadRequest:
      description:
        A Diff upload request. For details on the Scotty Diff protocol, visit
        http://go/scotty-diff-protocol.
      properties:
        objectVersion:
          type: string
          description:
            The object version of the object that is the base version the
            incoming diff script will be applied to. This field will always be
            filled in.
        checksumsInfo:
          $ref: '#/components/schemas/CompositeMedia'
        objectInfo:
          $ref: '#/components/schemas/CompositeMedia'
      type: object
    PredictResponse:
      type: object
      properties:
        predictions:
          description: The outputs of the prediction call.
          type: array
          items: {}
      description: Response message for [PredictionService.Predict].
    File:
      type: object
      description: A file uploaded to the API.
      properties:
        sha256Hash:
          readOnly: true
          description: Output only. SHA-256 hash of the uploaded bytes.
          format: byte
          type: string
        displayName:
          description:
            'Optional. The human-readable display name for the `File`. The
            display name must be no more than 512 characters in length,
            including spaces. Example: "Welcome Image"'
          type: string
        uri:
          type: string
          description: Output only. The uri of the `File`.
          readOnly: true
        error:
          $ref: '#/components/schemas/Status'
        downloadUri:
          readOnly: true
          description: Output only. The download uri of the `File`.
          type: string
        mimeType:
          readOnly: true
          type: string
          description: Output only. MIME type of the file.
        videoMetadata:
          $ref: '#/components/schemas/VideoFileMetadata'
        state:
          readOnly: true
          type: string
          enum:
            - STATE_UNSPECIFIED
            - PROCESSING
            - ACTIVE
            - FAILED
          description: Output only. Processing state of the File.
        name:
          description:
            'Immutable. Identifier. The `File` resource name. The ID (name
            excluding the "files/" prefix) can contain up to 40 characters that
            are lowercase alphanumeric or dashes (-). The ID cannot start or end
            with a dash. If the name is empty on create, a unique name will be
            generated. Example: `files/123-456`'
          type: string
        source:
          type: string
          enum:
            - SOURCE_UNSPECIFIED
            - UPLOADED
            - GENERATED
            - REGISTERED
          description: Source of the File.
        sizeBytes:
          type: string
          format: int64
          readOnly: true
          description: Output only. Size of the file in bytes.
        createTime:
          format: google-datetime
          type: string
          description:
            Output only. The timestamp of when the `File` was created.
          readOnly: true
        updateTime:
          type: string
          readOnly: true
          description:
            Output only. The timestamp of when the `File` was last updated.
          format: google-datetime
        expirationTime:
          readOnly: true
          type: string
          format: google-datetime
          description:
            Output only. The timestamp of when the `File` will be deleted. Only
            set if the `File` is scheduled to expire.
    ListEnvironmentsResponse:
      type: object
      description: Response for listing environments.
      properties:
        environments:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
          description: Environments belonging to the provided project.
        nextPageToken:
          description: Pagination token.
          type: string
    SpeakerVoiceConfig:
      properties:
        voiceConfig:
          $ref: '#/components/schemas/VoiceConfig'
        speaker:
          description:
            Required. The name of the speaker to use. Should be the same as in
            the prompt.
          type: string
      description:
        The configuration for a single speaker in a multi speaker setup.
      type: object
    TransferOwnershipRequest:
      properties:
        emailAddress:
          description:
            Required. The email address of the user to whom the tuned model is
            being transferred to.
          type: string
      type: object
      description: Request to transfer the ownership of the tuned model.
    CountMessageTokensRequest:
      description:
        Counts the number of tokens in the `prompt` sent to a model. Models may
        tokenize text differently, so each model may return a different
        `token_count`.
      type: object
      properties:
        prompt:
          $ref: '#/components/schemas/MessagePrompt'
    FunctionResponse:
      type: object
      description:
        The result output from a `FunctionCall` that contains a string
        representing the `FunctionDeclaration.name` and a structured JSON object
        containing any output from the function is used as context to the model.
        This should contain the result of a`FunctionCall` made based on model
        prediction.
      properties:
        parts:
          type: array
          description:
            Optional. Ordered `Parts` that constitute a function response. Parts
            may have different IANA MIME types.
          items:
            $ref: '#/components/schemas/FunctionResponsePart'
        scheduling:
          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.
          enum:
            - SCHEDULING_UNSPECIFIED
            - SILENT
            - WHEN_IDLE
            - INTERRUPT
        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`.
        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
        name:
          type: string
          description:
            Required. The name of the function to call. Must be a-z, A-Z, 0-9,
            or contain underscores and dashes, with a maximum length of 128.
        response:
          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).
          type: object
          additionalProperties:
            description: Properties of the object.
    InlinedRequest:
      properties:
        request:
          $ref: '#/components/schemas/GenerateContentRequest'
        metadata:
          type: object
          additionalProperties:
            description: Properties of the object.
          description: Optional. The metadata to be associated with the request.
      description: The request to be processed in the batch.
      type: object
    InputFeedback:
      type: object
      properties:
        blockReason:
          enum:
            - BLOCK_REASON_UNSPECIFIED
            - SAFETY
            - OTHER
          type: string
          description:
            Optional. If set, the input was blocked and no candidates are
            returned. Rephrase the input.
        safetyRatings:
          type: array
          items:
            $ref: '#/components/schemas/SafetyRating'
          description:
            Ratings for safety of the input. There is at most one rating per
            category.
      description:
        Feedback related to the input data used to answer the question, as
        opposed to the model-generated response to the question.
    GdataMedia:
      properties:
        hash:
          description:
            'Deprecated, use one of explicit hash type fields instead. These two
            hash related fields will only be populated on Scotty based media
            uploads and will contain the content of the hash group in the
            NotificationRequest:
            http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash
            Hex encoded hash value of the uploaded media.'
          deprecated: true
          type: string
        filename:
          type: string
          description: Original file name
        blobstore2Info:
          $ref: '#/components/schemas/Blobstore2Info'
        cosmoBinaryReference:
          type: string
          format: byte
          description:
            A binary data reference for a media download. Serves as a
            technology-agnostic binary reference in some Google infrastructure.
            This value is a serialized storage_cosmo.BinaryReference proto.
            Storing it as bytes is a hack to get around the fact that the cosmo
            proto (as well as others it includes) doesn't support JavaScript.
            This prevents us from including the actual type of this field.
        downloadParameters:
          $ref: '#/components/schemas/DownloadParameters'
        algorithm:
          description:
            Deprecated, use one of explicit hash type fields instead. Algorithm
            used for calculating the hash. As of 2011/01/21, "MD5" is the only
            possible value for this field. New values may be added at any time.
          type: string
          deprecated: true
        diffVersionResponse:
          $ref: '#/components/schemas/DiffVersionResponse'
        compositeMedia:
          type: array
          items:
            $ref: '#/components/schemas/CompositeMedia'
          description:
            'A composite media composed of one or more media objects, set if
            reference_type is COMPOSITE_MEDIA. The media length field must be
            set to the sum of the lengths of all composite media objects. Note:
            All composite media must have length specified.'
        referenceType:
          type: string
          enum:
            - PATH
            - BLOB_REF
            - INLINE
            - GET_MEDIA
            - COMPOSITE_MEDIA
            - BIGSTORE_REF
            - DIFF_VERSION_RESPONSE
            - DIFF_CHECKSUMS_RESPONSE
            - DIFF_DOWNLOAD_RESPONSE
            - DIFF_UPLOAD_REQUEST
            - DIFF_UPLOAD_RESPONSE
            - COSMO_BINARY_REFERENCE
            - ARBITRARY_BYTES
          description: Describes what the field reference contains.
        mediaId:
          format: byte
          description:
            Media id to forward to the operation GetMedia. Can be set if
            reference_type is GET_MEDIA.
          type: string
        inline:
          description: Media data, set if reference_type is INLINE
          format: byte
          type: string
        md5Hash:
          description: Scotty-provided MD5 hash for an upload.
          format: byte
          type: string
        path:
          type: string
          description: Path to the data, set if reference_type is PATH
        timestamp:
          description:
            Time at which the media data was last updated, in milliseconds since
            UNIX epoch
          format: uint64
          type: string
        diffChecksumsResponse:
          $ref: '#/components/schemas/DiffChecksumsResponse'
        sha512Hash:
          description: Scotty-provided SHA512 hash for an upload.
          format: byte
          type: string
        contentTypeInfo:
          $ref: '#/components/schemas/ContentTypeInfo'
        diffUploadRequest:
          $ref: '#/components/schemas/DiffUploadRequest'
        blobRef:
          type: string
          description:
            Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This
            should be the byte representation of a blobstore.BlobRef. Since
            Blobstore is deprecating v1, use blobstore2_info instead. For now,
            any v2 blob will also be represented in this field as v1 BlobRef.
          deprecated: true
          format: byte
        length:
          description: Size of the data, in bytes
          type: string
          format: int64
        diffUploadResponse:
          $ref: '#/components/schemas/DiffUploadResponse'
        sha256Hash:
          description: Scotty-provided SHA256 hash for an upload.
          format: byte
          type: string
        isPotentialRetry:
          type: boolean
          description:
            '|is_potential_retry| is set false only when Scotty is certain that
            it has not sent the request before. When a client resumes an upload,
            this field must be set true in agent calls, because Scotty cannot be
            certain that it has never sent the request before due to potential
            failure in the session state persistence.'
        hashVerified:
          description:
            For Scotty uploads only. If a user sends a hash code and the backend
            has requested that Scotty verify the upload against the client hash,
            Scotty will perform the check on behalf of the backend and will
            reject it if the hashes don't match. This is set to true if Scotty
            performed this verification.
          type: boolean
        contentType:
          type: string
          description: MIME type of the data
        sha1Hash:
          type: string
          format: byte
          description: Scotty-provided SHA1 hash for an upload.
        bigstoreObjectRef:
          type: string
          deprecated: true
          description: Use object_id instead.
          format: byte
        diffDownloadResponse:
          $ref: '#/components/schemas/DiffDownloadResponse'
        token:
          description: A unique fingerprint/version id for the media data
          type: string
        crc32cHash:
          description:
            'For Scotty Uploads: Scotty-provided hashes for uploads For Scotty
            Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY
            TEAM.) A Hash provided by the agent to be used to verify the data
            being downloaded. Currently only supported for inline payloads.
            Further, only crc32c_hash is currently supported.'
          format: uint32
          type: integer
        objectId:
          $ref: '#/components/schemas/ObjectId'
      type: object
      description:
        A reference to data stored on the filesystem, on GFS or in blobstore.
    TuningSnapshot:
      type: object
      description: Record for a single tuning step.
      properties:
        epoch:
          format: int32
          description: Output only. The epoch this step was part of.
          type: integer
          readOnly: true
        step:
          readOnly: true
          type: integer
          description: Output only. The tuning step.
          format: int32
        computeTime:
          readOnly: true
          type: string
          description: Output only. The timestamp when this metric was computed.
          format: google-datetime
        meanLoss:
          type: number
          description:
            Output only. The mean loss of the training examples for this step.
          readOnly: true
          format: float
    BatchEmbedContentsRequest:
      properties:
        requests:
          description:
            Required. Embed requests for the batch. The model in each of these
            requests must match the model specified
            `BatchEmbedContentsRequest.model`.
          type: array
          items:
            $ref: '#/components/schemas/EmbedContentRequest'
      description:
        Batch request to get embeddings from the model for a list of prompts.
      type: object
    BatchGenerateContentRequest:
      description: Request for a `BatchGenerateContent` operation.
      properties:
        batch:
          $ref: '#/components/schemas/GenerateContentBatch'
      type: object
    GeneratedFile:
      description: A file generated on behalf of a user.
      type: object
      properties:
        mimeType:
          type: string
          description: MIME type of the generatedFile.
        error:
          $ref: '#/components/schemas/Status'
        state:
          enum:
            - STATE_UNSPECIFIED
            - GENERATING
            - GENERATED
            - FAILED
          readOnly: true
          description: Output only. The state of the GeneratedFile.
          type: string
        name:
          description:
            'Identifier. The name of the generated file. Example:
            `generatedFiles/abc-123`'
          type: string
    UrlMetadata:
      type: object
      properties:
        retrievedUrl:
          type: string
          description: Retrieved url by the tool.
        urlRetrievalStatus:
          description: Status of the url retrieval.
          enum:
            - URL_RETRIEVAL_STATUS_UNSPECIFIED
            - URL_RETRIEVAL_STATUS_SUCCESS
            - URL_RETRIEVAL_STATUS_ERROR
            - URL_RETRIEVAL_STATUS_PAYWALL
            - URL_RETRIEVAL_STATUS_UNSAFE
          type: string
      description: Context of the a single url retrieval.
