> ## 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 2.1 Image Generation

> Nano Banana 2.1 Image Generation · model `nano-banana-2-1`

* Call `POST /v1/images/generations` with `model` `nano-banana-2-1`
* Body requires at least `model` and `prompt`
* Async: the create response returns a `task_id`; read the final result from console logs / task result

## Identity

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

## 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-2-1` |
| `prompt` | string | yes | Image description |
| `resolution` | string | no | `1K` / `2K` / `4K`; when omitted the gateway defaults to `2K` |
| `size` | string | no | Aspect ratio (e.g. `1:1`, `16:9`, `9:16`; 14 ratios) or `auto` (accepted at runtime; equals default) |
| `n` | integer | no | **Must be 1**; batch is not supported |

### Capability (MVP)

| Item | Value |
| - | - |
| Text-to-image | Supported |
| Reference image / image-to-image / edit | Not supported yet: a non-empty `image`, `image_urls`, `images`, `input_reference`, or `layer_decomposition=true` is rejected (400) |
| Paid enhancement params | Not supported yet: `model_params` (e.g. web\_search / image\_search) is rejected (400) |
| Images per request | 1 |

## Billing

Fixed per-image price by `resolution`: `1K` = **$0.034**, `2K` = **$0.051**, `4K` = **\$0.114**. When `resolution` is omitted it bills as `2K`; `n` is fixed at 1.

## Response

### 200

| Field | Type | Description |
| - | - | - |
| `task_id` / `id` | string | Async task id |
| `data` | array | Results after the async task completes |

Errors: see right-rail examples; failed tasks are fully refunded.

```bash cURL theme={null}
curl --request POST \
  --url https://api.omnimux.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "nano-banana-2-1",
  "prompt": "a red apple on a table, studio light",
  "resolution": "2K",
  "size": "16:9"
}'
```

```json 200 theme={null}
{ "task_id": "task_xxx", "status": "queued", "model": "nano-banana-2-1" }
```

```json 400 theme={null}
{ "error": { "message": "nano-banana-2-1 resolution must be one of 1K, 2K, 4K", "type": "invalid_request_error", "code": "invalid_request" } }
```

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.