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

# Gemini 图片(Nano Banana)

> Gemini 图片生成



## OpenAPI

````yaml /openapi/relay.json post /v1beta/models/{model}:generateContent
openapi: 3.0.1
info:
  title: OmniMux Gateway API
  description: >-
    OpenAI-compatible relay API for OmniMux (geminix.cc). Use Authorization:
    Bearer sk-... and base URL https://api.geminix.cc/v1 for SDKs.
  version: 1.0.0
servers:
  - url: https://api.geminix.cc
    description: OmniMux production API
security:
  - BearerAuth: []
tags:
  - name: 获取模型列表
  - name: OpenAI格式(Chat)
  - name: OpenAI格式(Responses)
  - name: 图片生成
  - name: 图片生成/OpenAI兼容格式
  - name: 图片生成/Qwen千问
  - name: 视频生成
  - name: 视频生成/Sora兼容格式
  - name: 视频生成/Kling格式
  - name: 视频生成/即梦格式
  - name: Claude格式(Messages)
  - name: Gemini格式
  - name: OpenAI格式(Embeddings)
  - name: 文本补全(Completions)
  - name: OpenAI音频(Audio)
  - name: 重排序(Rerank)
  - name: Moderations
  - name: Realtime
  - name: 未实现
  - name: 未实现/Fine-tunes
  - name: 未实现/Files
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - Gemini
      summary: Gemini 图片(Nano Banana)
      description: Gemini 图片生成
      operationId: geminiRelayV1Beta
      parameters:
        - name: model
          in: path
          description: 模型名称
          required: true
          example: gemini-3-pro-image-preview
          schema:
            type: string
      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
            example:
              contents:
                - role: user
                  parts:
                    - text: draw a cat
              generationConfig:
                responseModalities:
                  - TEXT
                  - IMAGE
                imageConfig:
                  aspectRatio: '16:9'
                  imageSize: 4K
      responses:
        '200':
          description: 成功
          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: {}
              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: |
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````