在线服务 · 99.9% 可用 · 平均 312ms
图片 API 站
一毛一张图
一个端口接入 8 款顶级图像模型,按张计费、失败返还、国内直连。 把生图基础设施留给我们,把好产品留给你。
99.9%
近 30 天可用率
312ms
平均首字节
8款
模型一键切换
Nano Banana 2
★ 主推new第二代绘图模型&4K
2 - 6
积分 / 张
文生图 / 图生图支持加速档
Nano Banana Pro
精准中文理解输出&4K
2 - 6
积分 / 张
文生图 / 图生图支持加速档
GPT Image 2.0
newOpenAI 图像模型 2.0
1 - 45
积分 / 张
文生图 / 图生图支持加速档9 档画质×分辨率
模块一 · 价目表
按积分计费,没有月费
招牌的 Nano Banana 系列单价最低、出图最快;其余 6 款按场景按需选用。失败、超时、审核拒绝全部自动返还。
模型简介单价能力
- GPT Image 2.0NEW
gpt-image-2OpenAI 图像模型 2.0
1 - 45积分 / 张文生图 / 图生图加速档9 档画质 - Nano Banana 2★ 招牌NEW
nanobanana-2第二代绘图模型&4K
2 - 6积分 / 张文生图 / 图生图加速档联网 - Nano Banana Pro★ 招牌
nano-banana-pro精准中文理解输出&4K
2 - 6积分 / 张文生图 / 图生图加速档联网 - Z Image Turbo
z-image-turbo文生图
1积分 / 张文生图 - Seedream 5.0NEW
seedream-5.0响应更精准,效果更智能
2积分 / 张文生图 / 图生图 - Wan2.5 Text to Image
wan2.5-text-to-image文生图
2积分 / 张文生图 - Qwen Image
qwen-image-edit-plus图生图
2积分 / 张图生图 - GPT Image 1.5
gpt-image-1.5文生图 / 图生图
8积分 / 张文生图 / 图生图
失败不扣积分。同一 prompt 触发审核失败、超时、网络问题,全部返还。充值额度永不过期 · 支持开发票
模块二 · 接入指南
API Reference
任务异步处理:generate 提交、query 轮询,也可用 callbackUrl 改为回调推送。所有内容与控制台 /settings/apikeys 接口文档完全同源。
Workflow
- 1.Call /api/ai/generate/ to submit a generation task and receive a taskId
- 2.Poll /api/ai/query/ until status becomes success or failed (recommended interval: 2–5 seconds)
- 3.Retrieve the result image URLs from the outputImages field
Authentication
All API calls require an API Key in the request header:
Authorization: Bearer sk-<your-api-key>
Content-Type: application/jsonAvailable Models
| model | Name | Supported Scenes |
|---|---|---|
| gpt-image-2 | GPT Image 2.0 | Text-to-image / Image-to-image |
| nanobanana-2 | Nano Banana 2 | Text-to-image / Image-to-image |
| nano-banana-pro | Nano Banana Pro | Text-to-image / Image-to-image |
| z-image-turbo | Z Image Turbo | Text-to-image |
| seedream-5.0 | Seedream 5.0 | Text-to-image / Image-to-image |
| wan2.5-text-to-image | Wan2.5 Text to Image | Text-to-image |
| qwen-image-edit-plus | Qwen Image | Image-to-image |
| gpt-image-1.5 | GPT Image 1.5 | Text-to-image / Image-to-image |
text-to-image = generate from text prompt; image-to-image = edit or transform an input image
POST
/api/ai/generate/Submit an AI image generation task. Returns a taskId immediately; processing is asynchronous. Poll /api/ai/query/ for results.Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| mediaType | string | ✓ | Fixed value: "image" |
| model | string | ✓ | Model identifier — see available models above |
| prompt | string | ✓ | Text prompt for generation |
| scene | string | Default: text-to-image. Use image-to-image for image editing | |
| options.aspectRatio | string | Aspect ratio, e.g. "1:1", "16:9", "9:16" | |
| options.resolution | string | Resolution tier, e.g. "1K", "2K", "4K" | |
| options.speed_mode | string | "seed" (accelerated) or "noseed" (standard). Supported on select models only | |
| options.image_urls | string[] | Array of input image URLs, used in image-to-image scene | |
| callbackUrl | string | Optional HTTPS URL to receive a callback when the task completes or fails. A POST request with the task result will be sent to this address |
Example (curl)
# 提交一个生图任务
curl -X POST https://www.nano-banana.cn/api/ai/generate/ \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"mediaType": "image",
"model": "nanobanana-2",
"prompt": "a cute panda eating bamboo",
"scene": "text-to-image",
"callbackUrl": "https://your-server.com/callback",
"options": { "aspectRatio": "1:1" }
}'
# 响应
# { "code": 0, "message": "ok", "data": { "id": "3f2a1b4c-...", "status": "queuing" } }Response Example
{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "queuing"
}
}Callback Notification
If callbackUrl is provided, a single POST request will be sent to that URL when the task finishes (success or failure):
Callback Payload Example
{
"id": "3f2a1b4c-...",
"status": "success",
"outputImages": [
"https://r2.nano-banana.cn/outputs/xxx.png"
]
}POST
/api/ai/query/Query task status and results. Poll every 2–5 seconds until status is success or failed.Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| taskId | string | ✓ | Task ID returned by /api/ai/generate/ |
Example (curl)
# 轮询任务结果
curl -X POST https://www.nano-banana.cn/api/ai/query/ \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{ "taskId": "3f2a1b4c-..." }'
# 处理中响应
# { "code": 0, "data": { "id": "...", "status": "processing", "outputImages": null } }
# 成功响应
# { "code": 0, "data": { "id": "...", "status": "success", "outputImages": ["https://r2.nano-banana.cn/outputs/xxx.png"] } }In-progress Response
{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "processing",
"outputImages": null
}
}Success Response
{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "success",
"outputImages": [
"https://r2.nano-banana.cn/outputs/xxx.png"
]
}
}Task Status
| status | Description |
|---|---|
| queuing | Queued, waiting to be processed |
| pending | Submitted to AI provider, awaiting response |
| processing | Being processed by AI provider |
| success | Generation succeeded — outputImages contains the result URLs |
| failed | Generation failed — credits have been automatically refunded |
Error Responses
On failure, code is -1 and message describes the error:
{
"code": -1,
"message": "insufficient credits"
}no authAPI Key is invalid or missinginsufficient creditsInsufficient creditstask not foundTask does not existno permissionNot authorized to access this task (belongs to another user)
模块三 · 你的密钥
一键创建 API Key
无需跳转,直接在当前页面创建并复制密钥。每个账号最多 10 个 Key,可分别用于不同项目方便撤销。
模块四 · 常见问题
开发者常问的 12 件事
没找到答案?微信加 banana-cs 工作时间 5 分钟内回复。