Skip to main content
POST
Create an asynchronous image generation job
Reserves the maximum charge atomically and returns an asynchronous job.

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string
Required string length: 1 - 200

Body

application/json
model
enum<string>
required
Available options:
z-image-spicy
prompt
string
required
Required string length: 1 - 2000
width
integer
default:1024
Required range: 256 <= x <= 1536
height
integer
default:1536
Required range: 256 <= x <= 1536
seed
integer | null
Required range: 0 <= x <= 2147483647
prompt_extend
boolean
default:false
webhook_url
string
Required string length: 1 - 2048

Response

Default Response

id
string
required
Pattern: ^job_[A-Za-z0-9_-]{20,64}$
object
enum<string>
required
Available options:
generation.job
created
integer
required
status
enum<string>
required
Available options:
queued,
submitted,
processing,
succeeded,
failed,
cancelled,
expired,
reconciliation_required
model
string
required
poll_url
string
required
completed
integer | null
reserved_amount
string
Pattern: ^[0-9]+\.[0-9]{4}$
currency
enum<string>
Available options:
USD
data
object[]
error
object | null
webhook_signing_secret
string
Pattern: ^whsec_[A-Za-z0-9_-]{43}$
Last modified on September 17, 2026