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

> ## Agent Instructions
> Public hosts only: console https://omnimux.ai/dashboard · API https://api.omnimux.ai · docs https://docs.omnimux.ai.
> Gateway auth is Authorization: Bearer sk-… on https://api.omnimux.ai/v1 (OpenAI-compatible Chat Completions and related paths).
> Discover pages from /llms.txt; full site dump /llms-full.txt; product skill /skill.md; docs search MCP /mcp. Prefer .md page URLs for Markdown.
> Default docs locale is en; zh mirrors the same relative paths. Do not invent model ids not present on live pricing or the complete API pages.

# Nano Banana Pro Image Generation

> Nano Banana Pro Image Generation · model `nano-banana-pro`

* Call `POST /v1/images/generations` with `model` `nano-banana-pro`
* Body requires at least `model` and `prompt`
* If async, follow `task_id` in the create response and console usage logs

## Identity

| Field  | Value             |
| ------ | ----------------- |
| Series | Image series      |
| Brand  | Nano Banana       |
| model  | `nano-banana-pro` |

## Endpoint

| Method | Path                     |
| ------ | ------------------------ |
| `POST` | `/v1/images/generations` |

Base URL: `https://api.omnimux.ai`

## Authorizations

| Name            | In     | Type   | Required | Description               |
| --------------- | ------ | ------ | -------- | ------------------------- |
| `Authorization` | header | string | yes      | `Bearer sk-...` (API key) |

## Body

| Field     | Type      | Required | Description                                                                                                                                                      |
| --------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`   | string    | yes      | Must be `nano-banana-pro`                                                                                                                                        |
| `prompt`  | string    | yes      | Image description / edit instruction                                                                                                                             |
| `n`       | integer   | no       | Number of images (gateway-capped)                                                                                                                                |
| `size`    | string    | no       | Size or aspect ratio (model-specific)                                                                                                                            |
| `quality` | string    | no       | Quality tier (model-specific)                                                                                                                                    |
| `images`  | string\[] | no       | Reference images: image URL or base64. `image`, `image_urls` and `input_reference` are accepted aliases and are normalized to `images` before the upstream call. |

### Reference image limits

| Limit                  | Value                                                                          |
| ---------------------- | ------------------------------------------------------------------------------ |
| Max images per request | 14                                                                             |
| Min images per request | none — omit `images` for text-to-image                                         |
| Accepted formats       | `image/png`, `image/jpeg`, `image/webp`, `image/heic`, `image/heif`            |
| Max size per file      | 7 MB for inline (base64) upload; 30 MB when imported from Google Cloud Storage |

## Response

### 200

| Field            | Type    | Description                     |
| ---------------- | ------- | ------------------------------- |
| `created`        | integer | Creation timestamp when present |
| `data`           | array   | Results (`url` or `b64_json`)   |
| `task_id` / `id` | string  | Async task id when present      |

Errors: see right-rail examples. Async: use `task_id` from create response / console logs (no separate public image-query page).

<Panel>
  <RequestExample>
    ```bash curl --request POST \ theme={null}
      --url https://api.omnimux.ai/v1/images/generations \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{"model":"nano-banana-pro","prompt":"a product photo on white background","n":1}'
    ```
  </RequestExample>

  <ResponseExample>
    ```json 200 theme={null}
    {
      "id": "chatcmpl-example",
      "object": "chat.completion",
      "model": "nano-banana-pro",
      "choices": [
        {
          "index": 0,
          "message": { "role": "assistant", "content": "…" },
          "finish_reason": "stop"
        }
      ]
    }
    ```

    ```json 400 theme={null}
    { "error": { "message": "Invalid request", "type": "invalid_request_error", "code": "bad_request" } }
    ```

    ```json 401 theme={null}
    { "error": { "message": "Invalid token", "type": "authentication_error", "code": "unauthorized" } }
    ```

    ```json 402 theme={null}
    {
      "error": {
        "message": "Insufficient quota. Please top up your account.",
        "type": "insufficient_quota",
        "code": "insufficient_quota"
      }
    }
    ```

    ```json 403 theme={null}
    { "error": { "message": "Forbidden", "type": "permission_error", "code": "forbidden" } }
    ```

    ```json 429 theme={null}
    { "error": { "message": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_exceeded" } }
    ```

    ```json 500 theme={null}
    { "error": { "message": "Internal server error", "type": "server_error", "code": "internal_error" } }
    ```
  </ResponseExample>
</Panel>
