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

# Gemini Images

<Tip>
  This endpoint integrates a third-party model. For detailed parameter information, please refer to the official documentation at [Gemini Docs](https://ai.google.dev/gemini-api/docs/image-generation).
</Tip>


## OpenAPI

````yaml api-reference/endpoint/image/gemini_openapi.json post /v1beta/models/{model}:generateContent
openapi: 3.0.1
info:
  title: AI model interface
  description: ''
  version: 1.0.0
servers:
  - url: https://api.ai.cc
security:
  - BearerAuth: []
tags:
  - name: Gemini Image
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - Gemini Image
      summary: Gemini Image(Nano Banana)
      operationId: geminiRelayV1Betaimage
      parameters:
        - name: model
          in: path
          description: model name
          required: true
          schema:
            type: string
          examples:
            ProModel:
              summary: 使用 Pro 模型
              value: gemini-3-pro-image-preview
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contents:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                generationConfig:
                  type: object
                  properties:
                    responseModalities:
                      type: array
                      items:
                        type: string
                    imageConfig:
                      type: object
                      properties:
                        aspectRatio:
                          type: string
                        imageSize:
                          type: string
                  required:
                    - responseModalities
              required:
                - contents
                - generationConfig
            examples:
              Default:
                summary: examples
                value:
                  contents:
                    - role: user
                      parts:
                        - text: draw a cat
                  generationConfig:
                    responseModalities:
                      - TEXT
                      - IMAGE
                    imageConfig:
                      aspectRatio: '16:9'
                      imageSize: 1K
      responses:
        '200':
          description: Successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    GeminiResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              content:
                type: object
                properties:
                  role:
                    type: string
                  parts:
                    type: array
                    items:
                      type: object
                      properties:
                        inlineData:
                          type: object
                          properties:
                            mimeType:
                              type: string
                            data:
                              type: string
              finishReason:
                type: string
              safetyRatings:
                type: array
                items:
                  type: object
                  properties: {}
        usageMetadata:
          type: object
          properties:
            promptTokenCount:
              type: integer
            candidatesTokenCount:
              type: integer
            totalTokenCount:
              type: integer
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Authentication is done using Bearer Token. 
        Format: `Authorization: Bearer sk-xxxxxx`

````