Lifecycle
A job moves through these statuses:succeeded, failed, and timeout are terminal — stop polling once you see
one. On succeeded, the result is available on the status response (an images
array for image jobs, a video_url for video jobs).
Create, then poll
Image job ids are integers; video job ids are UUIDs. Poll each at its own endpoint.
A reasonable polling interval is every few seconds — images typically finish in
seconds, video in a few minutes.
Errors
All errors share one envelope so you can branch ontype and code:
| Status | When |
|---|---|
| 400 | Malformed request, missing/model_not_available model. |
| 401 | Missing or invalid API key. |
| 403 | Plan not enabled, ownership, or restriction. |
| 404 | Job not found (or not yours). |
| 429 | Rate or queue limit reached — retry after a short delay. |