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

# Nano Banana

> Google Gemini 2.5 Flash image generation model. Fast and low-cost, supporting both text-to-image and image-to-image.



## OpenAPI

````yaml /en/openapi/images/nano-banana.yaml POST /v1/images/generate
openapi: 3.1.0
info:
  title: Nano Banana
  version: '1.0'
  description: >-
    Google Gemini 2.5 Flash image generation model. Fast and low-cost,
    supporting both text-to-image and image-to-image.
servers:
  - url: https://openapi.imini.ai/imini/router
security:
  - ApiKeyAuth: []
paths:
  /v1/images/generate:
    post:
      summary: Nano Banana
      description: >
        Submit an asynchronous image generation task. You will need to poll the
        query endpoint to retrieve the result.

        > Model ID: `google/nano-banana` · Underlying: Gemini 2.5 Flash Image
      operationId: generateNanoBanana
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  description: Fixed value `google/nano-banana`.
                prompt:
                  type: string
                  description: >-
                    The prompt. Up to **6000** characters. Supports English and
                    Chinese; detail-rich descriptions yield better results.
                  example: >-
                    An orange cat napping under a cherry blossom tree,
                    watercolor style, soft lighting
                images:
                  type: array
                  description: >-
                    Reference image list. **Omitting or passing an empty array**
                    means text-to-image mode; passing images switches to
                    image-to-image / style reference mode. Up to **3** images.
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: >-
                          Reference image address, in one of two forms: **1)** A
                          publicly accessible URL (starting with `http://` or
                          `https://`); **2)** A Data URI base64 encoding
                          (starting with `data:image/`, e.g.,
                          `data:image/png;base64,iVBORw0KGgo...`). Supported
                          formats: `png` / `jpg` / `webp`, decoded size up to
                          **10MB**.
                      reference_type:
                        type: string
                        description: |-
                          Reference type:
                          - `asset` — content reference
                          - `style` — style reference
                        default: asset
                        enum:
                          - asset
                          - style
                  maxItems: 3
                aspect_ratio:
                  type: string
                  description: >-
                    Output aspect ratio. Allowed values:


                    `1:1` `2:3` `3:2` `3:4` `4:3` `4:5` `5:4` `9:16` `16:9`
                    `21:9`


                    > When reference images are provided and this parameter is
                    omitted, the model automatically infers the aspect ratio
                    from the reference images and uses it as the output ratio.
                  default: '1:1'
                  enum:
                    - '1:1'
                    - '2:3'
                    - '3:2'
                    - '3:4'
                    - '4:3'
                    - '4:5'
                    - '5:4'
                    - '9:16'
                    - '16:9'
                    - '21:9'
                resolution:
                  type: string
                  description: >-
                    Output quality tier. Currently only `1K` is supported; other
                    values will be downgraded.
                  default: 1K
                  enum:
                    - 1K
            examples:
              Text to Image:
                summary: Text to Image
                value:
                  model: google/nano-banana
                  prompt: >-
                    A cute shiba inu in a spacesuit standing on the moon, 3D
                    cartoon style
                  aspect_ratio: '1:1'
                  resolution: 1K
              Image Edit:
                summary: Image Edit
                value:
                  model: google/nano-banana
                  prompt: >-
                    A cute shiba inu in a spacesuit standing on the moon, 3D
                    cartoon style
                  images:
                    - url: https://example.com/input.jpg
                      reference_type: asset
                  aspect_ratio: '16:9'
                  resolution: 1K
              Image Edit (base64):
                summary: Image Edit (base64)
                value:
                  model: google/nano-banana
                  prompt: >-
                    A cute shiba inu in a spacesuit standing on the moon, 3D
                    cartoon style
                  images:
                    - url: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
                      reference_type: asset
                  aspect_ratio: '16:9'
                  resolution: 1K
      responses:
        '200':
          description: Submitted successfully (asynchronous mode)
          content:
            application/json:
              schema:
                oneOf:
                  - title: Submit Success (Pending)
                    type: object
                    properties:
                      task_id:
                        type: string
                        description: Unique task ID, used for subsequent polling
                        example: task_2041350318103396352
                      model:
                        type: string
                        description: The model ID used for this task
                        example: google/nano-banana
                      created_at:
                        type: string
                        description: Task creation time
                        example: '2026-04-07T03:00:17.062Z'
                      request_id:
                        type: string
                        description: Unique request ID
                        example: 285f20ce-8158-401b-945c-7bc6a7ef6ead
        '400':
          description: Validation Error (e.g. invalid parameter, invalid prompt)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Error code, e.g., INVALID_PROMPT
                        example: INVALID_PROMPT
                      message:
                        type: string
                        description: Error message details
                        example: Prompt contains disallowed content
                      status:
                        type: integer
                        description: HTTP status code
                        example: 400
                      request_id:
                        type: string
                        description: Unique request identifier
                        example: req_abc123
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Pass `Authorization: Bearer <YOUR_API_KEY>` in the request header. Go to
        the [API Keys management page](https://imini.ai/api-keys) to create and
        manage API Keys.

````