图片 API 站
一毛一张图
一个端口接入 18 款图像模型,按张计费、失败返还、国内直连。 把生图基础设施留给我们,把好产品留给你。
Nano Banana 2
★ 主推第二代绘图模型&4K
Nano Banana Pro
精准中文理解输出&4K
GPT Image 2
文生图 / 图生图
按积分计费,没有月费
所有模型走同一个接口,换模型只改一个 ID。失败、超时、审核拒绝全部自动返还。
- GPT Image 2
gpt-image-2文生图 / 图生图
1 - 3积分 / 张最低约 ¥0.125 起文生图 / 图生图 - GPT Image 2.5 Flare 加速NEW
gpt-image-2.5-flare速度优先 · 日常出图与快速原型
1 - 100积分 / 张最低约 ¥0.125 起文生图 / 图生图9 档画质 - GPT Image 2.5 Sunburst 加速
gpt-image-2.5-sunburst编辑精度优先 · 商品图与创意制作
1 - 100积分 / 张最低约 ¥0.125 起文生图 / 图生图9 档画质 - GPT Image 2.5 FlareNEW
gpt-image-2.5-flare-lite图片生成与编辑 · 1K / 2K / 4K · 最多 16 张参考图
2 - 3积分 / 张最低约 ¥0.25 起文生图 / 图生图 - GPT Image 2.5 SunburstNEW
gpt-image-2.5-sunburst-lite图片生成与编辑 · 1K / 2K / 4K · 最多 16 张参考图
2 - 3积分 / 张最低约 ¥0.25 起文生图 / 图生图 - Z Image TurboNEW
z-image-turbo快速文生图 · 低成本创作
1积分 / 张最低约 ¥0.125 起文生图 - Seedream 5.0NEW
seedream-5.0字节跳动图片生成与编辑模型
2积分 / 张最低约 ¥0.25 起文生图 / 图生图 - Seedream 5.0 FlashNEW
seedream-5.0-flash文生图与多图编辑 · 最多 10 张参考图
2 - 3积分 / 张最低约 ¥0.25 起文生图 / 图生图 - Seedream 5.0 Pro
seedream-5.0-pro图片生成与编辑 · 1K / 2K · 最多 10 张参考图
4积分 / 张最低约 ¥0.50 起文生图 / 图生图 - Wan2.5 文生图
wan2.5-text-to-image阿里通义万相文生图模型
2积分 / 张最低约 ¥0.25 起文生图 - Qwen Image
qwen-image-edit-plus阿里通义千问图片编辑模型
2积分 / 张最低约 ¥0.25 起图生图 - Nano Banana 2★ 招牌
nano-banana-2第二代绘图模型&4K
2 - 3积分 / 张最低约 ¥0.25 起文生图 / 图生图联网 - Nano Banana 2.1 加速★ 招牌NEW
nano-banana-2.1图片生成与编辑 · 1K / 2K / 4K · 最多 14 张参考图
4 - 5积分 / 张最低约 ¥0.50 起文生图 / 图生图联网 - Nano Banana 2.1★ 招牌NEW
nano-banana-2.1-lite图片生成与编辑 · 1K / 2K / 4K · 最多 14 张参考图
2 - 3积分 / 张最低约 ¥0.25 起文生图 / 图生图 - Nano Banana Pro★ 招牌
nano-banana-pro精准中文理解输出&4K
2 - 4积分 / 张最低约 ¥0.25 起文生图 / 图生图联网 - GPT Image 2 加速NEW
gpt-image-2-officialOpenAI 图像模型 2.0
1 - 45积分 / 张最低约 ¥0.125 起文生图 / 图生图9 档画质 - Nano Banana 2 加速★ 招牌
nano-banana-2-official第二代绘图模型&4K
4 - 5积分 / 张最低约 ¥0.50 起文生图 / 图生图联网 - Nano Banana Pro 加速★ 招牌
nano-banana-pro-official精准中文理解输出&4K
3 - 6积分 / 张最低约 ¥0.38 起文生图 / 图生图联网
人民币价格按 ¥999 的 8,000 积分包算(每积分 ¥0.125)。小积分包更贵,每积分最高 ¥0.58,以价格页为准。
API Reference
Submit with generate and poll query for asynchronous results. Parameters and available image models follow the site catalog.
Workflow
- 1.Submit to /api/ai/generate/ and save data.id as the taskId for queries
- 2.Poll /api/ai/query/ until success or failed. Recommended interval: 10 seconds; upstream refreshes for the same task are throttled to 10 seconds
- 3.Retrieve the result image URLs from the outputImages field
Authentication
API access is restricted to paid accounts. Recharge first, and send a valid API Key with every request. Historical payment, subscription, renewal or manual recharge qualifies; gifted credits alone do not. A sufficient credit balance is also required.
Authorization: Bearer sk-<your-api-key>
Content-Type: application/jsonUploads use multipart/form-data. Let the client set Content-Type and its boundary automatically; do not use application/json or manually set multipart/form-data without a boundary.
Available Models
| model | Name | Supported Scenes |
|---|---|---|
| gpt-image-2 | GPT Image 2
| Text-to-image / Image-to-image |
| gpt-image-2.5-flare | GPT Image 2.5 Flare 加速
| Text-to-image / Image-to-image |
| gpt-image-2.5-sunburst | GPT Image 2.5 Sunburst 加速
| Text-to-image / Image-to-image |
| gpt-image-2.5-flare-lite | GPT Image 2.5 Flare
| Text-to-image / Image-to-image |
| gpt-image-2.5-sunburst-lite | GPT Image 2.5 Sunburst
| 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 |
| seedream-5.0-flash | Seedream 5.0 Flash
| Text-to-image / Image-to-image |
| seedream-5.0-pro | Seedream 5.0 Pro
| Text-to-image / Image-to-image |
| wan2.5-text-to-image | Wan2.5 文生图
| Text-to-image |
| qwen-image-edit-plus | Qwen Image
| Image-to-image |
| nano-banana-2 | Nano Banana 2
| Text-to-image / Image-to-image |
| nano-banana-2.1 | Nano Banana 2.1 加速
| Text-to-image / Image-to-image |
| nano-banana-2.1-lite | Nano Banana 2.1
| Text-to-image / Image-to-image |
| nano-banana-pro | Nano Banana Pro
| Text-to-image / Image-to-image |
| gpt-image-2-official | GPT Image 2 加速
| Text-to-image / Image-to-image |
| nano-banana-2-official | Nano Banana 2 加速
| Text-to-image / Image-to-image |
| nano-banana-pro-official | Nano Banana Pro 加速
| Text-to-image / Image-to-image |
Only site-enabled image models are listed. Use the per-model supported fields; unlisted capabilities are not guaranteed. Reference limits reflect both model and site prechecks. Upstream quality defaults vary; send quality explicitly. Use the exact listed resolution and ratio values.
/api/storage/upload-imageUpload local reference images and obtain URLs for image-to-image requests. Authenticate with the same API Key used for generation.Upload Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| files | File[] | ✓ | Required image files with image/* MIME types, such as image/png, image/jpeg or image/webp. Repeat the files field to upload multiple images. |
Uploads use multipart/form-data. Let the client set Content-Type and its boundary automatically; do not use application/json or manually set multipart/form-data without a boundary.
Upload Examples
curl -X POST https://www.nano-banana.cn/api/storage/upload-image \
-H "Authorization: Bearer sk-your-api-key" \
-F "files=@./reference.png" \
-F "files=@./reference-2.jpg"Upload Response and Image-to-Image Usage
{
"code": 0,
"message": "ok",
"data": {
"urls": [
"https://r2.nano-banana.cn/uploads/example.png"
],
"results": [
{
"url": "https://r2.nano-banana.cn/uploads/example.png",
"key": "uploads/example.png",
"filename": "reference.png"
}
]
}
}data.urls contains image URLs in upload order. data.results contains each file’s url, storage key and original filename. The example domain is illustrative; use the URLs returned by the API.
Pass data.urls as options.image_urls to POST /api/ai/generate/ and set scene to image-to-image. Reference count, format and size must satisfy the selected model and site prechecks.
Check the business code as well as the HTTP status: 0 means success and -1 means failure. Common errors include no auth, please sign in, No files provided, File … is not an image, and upload image failed. If a multi-file upload fails partway through, earlier files may already be stored. Only use the complete URL array when code is 0.
/api/ai/generate/Submit an asynchronous image task. The response contains data.id; use that value as taskId in the query request.Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| mediaType | string | ✓ | Fixed value: "image" |
| model | string | ✓ | Model identifier — see available models above |
| prompt | string | ✓ | Nonempty text prompt; whitespace-only prompts are rejected. Subject to content moderation. |
| scene | string | Optional: text-to-image or image-to-image; defaults to text-to-image. For editing, use image-to-image with references. Supported scenes vary by model. | |
| options | object | Optional model options object. Defaults and supported fields are listed per model below. Unsupported fields may be ignored or rejected. | |
| options.aspectRatio | string | Aspect ratio. Allowed values and defaults are listed per model; auto is only available where listed. This field is separate from resolution. | |
| options.size | string | Compatibility alias for aspectRatio, nested under options. Top-level size has no effect. Send only size or aspectRatio; when both are present aspectRatio usually wins, while some models reject the combination. GPT Image 2 and its accelerated variant reject pixel dimensions: use options: {"aspectRatio":"1:1","resolution":"1K"}, which does not guarantee an exact 1024×1024 output. GPT Image 2.5 Flare / Sunburst accept options: {"size":"1024x1024"}. Full requests still require mediaType, model and prompt. See per-model dimension limits. | |
| options.resolution | string | Resolution tier. Use the exact spelling and case listed per model, such as 1K or 1k. See model notes for defaults and aspect-ratio restrictions. | |
| options.quality | string | Image quality, separate from resolution. Only supported where quality is listed below; values vary by model. Send explicitly. Some models charge by quality × resolution; omitted quality is billed at the low tier. | |
| options.image_urls | string[] | Array of HTTP/HTTPS reference URLs accessible to the server. Local paths and Base64 are not accepted. See per-model limits; site prechecks accept at most 10 distinct URLs. Image-only editing models require references; text-only models reject them. | |
| options.web_search | boolean | Boolean search toggle; send false or true explicitly. Only available where web_search is listed. Additional credits may apply as shown per model. | |
| options.count / options.n | integer | Positive integer output count, default 1. count and n are aliases; count takes precedence, so send only one. Only use on models listing count. Usually capped at 4; some models allow only 1. Credits equal the unit price × requested count. Omit on unsupported models. | |
| options.seed | integer | Integer random seed, only where seed is listed. Omit to let the upstream choose. Identical outputs across calls or channels are not guaranteed. | |
| options.negative_prompt | string | Optional negative prompt forwarded upstream; effectiveness depends on the model. nano-banana-2.1 rejects this field. Do not send it unconditionally. | |
| options.mask_url | string | HTTP/HTTPS mask URL, only where mask_url is listed. A reference image is also required. Mask format, dimensions and edit-region semantics depend on the model. | |
| options.output_format | string | Output format, only where output_format is listed. Allowed values appear per model. Omit for the upstream default. | |
| options.output_compression | integer | Integer compression quality from 0 to 100, only where listed. Requires an explicit output_format of jpeg or webp. | |
| options.background | string | Background mode: auto, transparent or opaque, only where listed. Transparency also depends on the output format and upstream support. | |
| options.moderation | string | Upstream moderation mode, only where listed. See per-model allowed values. Does not disable site content checks. | |
| options.watermark | boolean | Boolean upstream watermark toggle, only where listed. Omit for the upstream default. |
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",
"options": { "aspectRatio": "1:1" }
}'
# 响应
# { "code": 0, "message": "ok", "data": { "id": "3f2a1b4c-...", "status": "queuing" } }Image editing example: separate quality and resolution
{
"mediaType": "image",
"model": "gpt-image-2-official",
"prompt": "Replace the background with a white studio backdrop",
"scene": "image-to-image",
"options": {
"image_urls": [
"https://your-server.com/reference.png"
],
"aspectRatio": "16:9",
"resolution": "2K",
"quality": "medium"
}
}Response Example
{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "queuing"
}
}Limits and account requirements
API calls require a paid account; captchaToken is not required and CAPTCHA cannot replace paid eligibility. Unpaid accounts receive paid account required for API access. Webhook callbacks are currently unsupported; callbackUrl has no effect. Poll query instead. Keep reference images within 20MB each and provide accessible original URLs. Replace the example reference URL with a real image.
/api/ai/query/Query using data.id from submission, preferably every 10 seconds. More frequent calls may return cached status. Stop at success or failed. Check code before accessing data; on nonzero code, read message.Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| taskId | string | ✓ | The submission response data.id (site task ID), not the upstream provider taskId. Only tasks owned by the current account can be queried. |
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
Check code first: 0 means success and -1 means failure. On failure, read message instead of accessing data. paid account required for API access means the account lacks paid eligibility; insufficient credits means the available balance is too low.
{
"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 分钟内回复。