Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Validation rules:

  • Requests must use application/json; multipart file upload is not supported
  • model and a non-empty prompt are required
  • image_urls must contain publicly accessible HTTP or HTTPS image URLs
  • An empty image_urls array creates a text-to-image task; a non-empty array creates an image-to-image task
model
enum<string>
required

Image model to use.

Available options:
gpt_image_2,
nano_banana_2_lite,
nano_banana_2,
nano_banana_pro,
gemini_25_flash_image
prompt
string
required

Text instruction for image generation or editing.

Minimum string length: 1
image_urls
string<uri>[]

Publicly accessible HTTP or HTTPS input image URLs. Omit or pass an empty array for text-to-image. gpt_image_2 accepts up to 16 images; the other models accept up to 14. Multipart file upload is not supported.

Maximum array length: 16
aspect_ratio
enum<string>
default:auto

Output aspect ratio. Supported values vary by model; auto lets the model infer the ratio.

Available options:
auto,
9:16,
2:3,
3:4,
4:5,
1:1,
5:4,
4:3,
3:2,
16:9,
21:9,
9:21,
1:2,
2:1,
1:4,
4:1,
1:8,
8:1
resolution
enum<string>
default:1K

Output resolution. nano_banana_2_lite and gemini_25_flash_image support only 1K; the other models support 1K, 2K, and 4K.

Available options:
1K,
2K,
4K
quality
enum<string>
default:auto

Output quality for gpt_image_2. Other models ignore this field.

Available options:
auto,
low,
medium,
high
count
integer
default:1

Number of output images.

Required range: 1 <= x <= 4

Response

Task created successfully

code
integer
trace_id
string
message
string | null
data
object