Skip to main content
POST
Creates an image generation job. Credits are deducted when the job is queued. Poll Poll generation status with the returned generation.id until status is COMPLETED or FAILED.

Headers

Request body

string
required
Text prompt for the image.
string
Model key. Default: nano-banana-2.
string
Aspect ratio. Must be allowed for the chosen model. Default: auto (where supported).
string
Output size or quality tier. Must match the chosen model (see table above). Default: 2k for most models.
string[]
Reference image URLs (public HTTPS). Use for style or subject guidance. Max count depends on model (up to 14–16).
boolean
Enable NSFW filtering when supported by the provider pipeline.

Async completion

Poll Poll generation status with generation.id until status is COMPLETED or FAILED. Webhooks are not supported on the public API.

Response

Example

Errors

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string

Max 128 chars. Replays the same response for 24h on API key requests.

Maximum string length: 128

Body

application/json
prompt
string
required
model
string
default:nano-banana-2

Any image model key from GET /catalog (e.g. nano-banana-2, nano-banana-pro, gpt-image-2, seedream-5.0-pro). gpt-image-1.5 maps to GPT Image 2 and seedream-v5-lite to Seedream 5.0 Pro.

aspectRatio
string

Aspect ratio. Valid values depend on the model; auto uses the model's default.

resolution
string

Output size such as 1k, 2k or 4k, for models that offer it. Other values fall back to the model's default.

quality
string

Quality tier, for models that offer it.

referenceImages
string<uri>[]

Public HTTPS reference image URLs. The maximum count depends on the model.

Response

Generation queued

success
boolean
required
generation
object
required
model
string
creditsDeducted
integer
creditsRemaining
integer