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"
}'
{ "task_id": "task_xxx", "status": "queued", "model": "nano-banana-2-1" }
{ "error": { "message": "nano-banana-2-1 resolution must be one of 1K, 2K, 4K", "type": "invalid_request_error", "code": "invalid_request" } }
{ "error": { "message": "Insufficient quota. Please top up your account.", "type": "insufficient_quota", "code": "insufficient_quota" } }
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"
}'
{ "task_id": "task_xxx", "status": "queued", "model": "nano-banana-2-1" }
{ "error": { "message": "nano-banana-2-1 resolution must be one of 1K, 2K, 4K", "type": "invalid_request_error", "code": "invalid_request" } }
{ "error": { "message": "Insufficient quota. Please top up your account.", "type": "insufficient_quota", "code": "insufficient_quota" } }
Nano Banana
Nano Banana 2.1 生图
Nano Banana 2.1 生图 · model nano-banana-2-1
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"
}'
{ "task_id": "task_xxx", "status": "queued", "model": "nano-banana-2-1" }
{ "error": { "message": "nano-banana-2-1 resolution must be one of 1K, 2K, 4K", "type": "invalid_request_error", "code": "invalid_request" } }
{ "error": { "message": "Insufficient quota. Please top up your account.", "type": "insufficient_quota", "code": "insufficient_quota" } }
POST
/
v1
/
images
/
generations
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"
}'
{ "task_id": "task_xxx", "status": "queued", "model": "nano-banana-2-1" }
{ "error": { "message": "nano-banana-2-1 resolution must be one of 1K, 2K, 4K", "type": "invalid_request_error", "code": "invalid_request" } }
{ "error": { "message": "Insufficient quota. Please top up your account.", "type": "insufficient_quota", "code": "insufficient_quota" } }
- 调用
POST /v1/images/generations,model为nano-banana-2-1 - 请求体至少包含
model与prompt - 异步任务:创建响应返回
task_id,以控制台日志/任务结果为准
身份
| 字段 | 值 |
|---|---|
| 系列 | 图像系列 |
| 品牌 | Nano Banana |
| model | nano-banana-2-1 |
接口
| 方法 | 路径 |
|---|---|
POST | /v1/images/generations |
https://api.omnimux.ai
鉴权
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
Authorization | header | string | 是 | Bearer sk-...(API Key) |
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 nano-banana-2-1 |
prompt | string | 是 | 图像描述 |
resolution | string | 否 | 1K / 2K / 4K;未传时网关默认 2K |
size | string | 否 | 画面比例(如 1:1、16:9、9:16 等 14 种)或 auto(运行时接受,等同默认) |
n | integer | 否 | 固定为 1,不支持批量 |
能力面(MVP)
| 项目 | 值 |
|---|---|
| 文生图 | 支持 |
| 参考图 / 图生图 / 编辑 | 暂不支持:image、image_urls、images、input_reference 非空或 layer_decomposition=true 会被拒绝(400) |
| 付费增强参数 | 暂不支持:model_params(如 web_search / image_search)会被拒绝(400) |
| 生成张数 | 1 |
计费
按resolution 每张固定价:1K = $0.034**,`2K` = **$0.051,4K = $0.114。未传 resolution 时按 2K 计费;n 固定为 1。
响应
200
| 字段 | 类型 | 说明 |
|---|---|---|
task_id / id | string | 异步任务 id |
data | array | 结果(异步完成后读取) |