> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# gemini-2.5-flash

> Generate response using Gemini model with Google Search grounding.



## OpenAPI

````yaml api-reference/model-api/google/openapi/gemini-2-5-flash/openapi.yaml POST /v1beta/models/gemini-2.5-flash:generateContent
openapi: 3.1.0
info:
  title: Gemini 2.5 Flash
  description: Google Gemini 2.5 Flash via Anyfast proxy
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security: []
paths:
  /v1beta/models/gemini-2.5-flash:generateContent:
    post:
      summary: Text Generation (with Search)
      description: Generate response using Gemini model with Google Search grounding.
      operationId: Gemini25FlashGenerateWithSearch
      parameters:
        - name: key
          in: query
          description: API Key
          required: true
          schema:
            type: string
          example: YOUR_API_KEY
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - contents
              properties:
                contents:
                  type: array
                  description: Array of conversation contents.
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        enum:
                          - user
                          - model
                        example: user
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                              description: Text content
                            inline_data:
                              type: object
                              properties:
                                mime_type:
                                  type: string
                                  description: File MIME type
                                data:
                                  type: string
                                  description: Base64 encoded file data
                  example:
                    - role: user
                      parts:
                        - text: What is the weather in Chongqing today?
                tools:
                  type: array
                  description: Tool configuration to enable Google Search.
                  items:
                    type: object
                    properties:
                      googleSearch:
                        type: object
                  example:
                    - googleSearch: {}
      responses:
        '200':
          description: Response generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GenerateContentResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              content:
                type: object
                properties:
                  parts:
                    type: array
                    items:
                      type: object
                      properties:
                        text:
                          type: string
                          example: >-
                            Based on search results, the weather in Chongqing
                            today...
                  role:
                    type: string
                    example: model
              finishReason:
                type: string
                example: STOP
              groundingMetadata:
                type: object
                properties:
                  searchEntryPoint:
                    type: object
                  groundingChunks:
                    type: array
                    items:
                      type: object
        usageMetadata:
          type: object
          properties:
            promptTokenCount:
              type: integer
            candidatesTokenCount:
              type: integer
            totalTokenCount:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string

````