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

# Banana 图像生成

> Nano Banana image generation, capable of image creation and editing.



## OpenAPI

````yaml POST /gemini/image/generate
openapi: 3.0.0
info:
  title: Google Gemini - Video, Image & SDK Compat
  description: >-
    Google Gemini services: video generation (Veo 2/3/3.1), image generation
    (Nano Banana), and Gemini Compat API for the official @google/genai SDK.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: gemini
    description: >-
      Video generation (Veo 2/3/3.1) and image generation (Nano Banana)
      endpoints
  - name: gemini-compat
    description: >-
      Gemini Compat API - drop-in replacement for Google's official
      @google/genai SDK. Supports generateContent / streamGenerateContent for
      text and image generation.
paths:
  /gemini/image/generate:
    post:
      tags:
        - gemini
      summary: Nano Banana image generation
      description: Nano Banana image generation, capable of image creation and editing.
      operationId: ApiPublicController_nanoImage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NanoImageDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    NanoImageDto:
      type: object
      properties:
        prompt:
          type: string
          description: The prompt which used to generate the images
          example: A fluffy orange cat running through a sunny meadow
        action:
          type: string
          description: >-
            Action type: edit (modify existing images) or generate (create new
            images)
          enum:
            - edit
            - generate
          example: generate
        num_images:
          type: number
          default: 1
          description: only support generate 1 image, default is 1
        image_urls:
          description: >-
            Link to the picture that needs to be edited. It can be a accessible
            http or https url, The image size should not exceed 10MB for each.
            If the `action` is `edit`, this parameter is required.
          example:
            - https://example.com/image1.jpg
            - https://example.com/image2.jpg
          type: array
          items:
            type: string
            format: uri
        aspect_ratio:
          type: string
          description: >-
            The aspect ratio of the image,nano-banana-2 support all aspect
            ratios, other models only support 21:9, 1:1, 4:3, 3:2, 2:3, 5:4,
            4:5, 3:4, 16:9, 9:16
          enum:
            - '21:9'
            - '1:1'
            - '4:3'
            - '3:2'
            - '2:3'
            - '5:4'
            - '4:5'
            - '3:4'
            - '16:9'
            - '9:16'
            - '1:4'
            - '4:1'
            - '1:8'
            - '8:1'
          example: '1:1'
        model:
          default: nano-banana-fast
          enum:
            - nano-banana-fast
            - nano-banana-pro
            - nano-banana-2
          type: string
          description: The model of the image, default is NanoBananaFast
          example: nano-banana-fast
        resolution:
          type: string
          description: >-
            The resolution of the image, only valid when model is
            nano-banana-pro or nano-banana-2
          enum:
            - 1K
            - 2K
            - 4K
          example: 1K
      required:
        - prompt
        - action
    TaskIdDto:
      type: object
      properties:
        taskId:
          type: string
          description: task id, used to get task result later
      required:
        - taskId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````