Skip to main content
POST
Create an async Nano Banana image task. Poll with Query image task and read result.image_url when completed. For GPT Image 2, see Create GPT Image 2 task.

Models

Billing is by resolution (per_task, 1 image per request). Check Model catalog and the create response cost for live prices.

Request body

Examples

Text-to-image (Nano Banana 2)

Image-to-image (Nano Banana Pro)

Nano Banana 2.1

Success response:

Authorizations

Authorization
string
header
required

控制台创建的 API Key,格式:Bearer sk_xxx

Body

application/json
model
string
required

gpt-image-2 (plus low/medium/high) or nano-banana-2 / nano-banana-2.1 / nano-banana-pro

Example:

"nano-banana-2"

prompt
string

GPT Image 2 max 4000; Nano Banana max 10000. Optional when images are provided

Required string length: 1 - 10000
quality
enum<string>
default:auto
Available options:
auto,
low,
medium,
high
n
integer
default:1
Required range: 1 <= x <= 4
ratio
string
size
string

ratio 别名

resolution
string

Nano Banana: 0.5k/1k/2k/4k depending on model

images
string<uri>[]

Reference image URLs. GPT Image 2 max 15; Nano Banana max 5

Maximum array length: 15

Response

200 - application/json

提交成功

code
integer
Example:

20000

msg
string
data
object
Last modified on October 18, 2026