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 and video jobs are both created at per-model endpoints (POST /v1/images/{model-name} and POST /v1/videos/{model-name}), then polled
at the matching status endpoint.
Job ids are opaque — treat them as strings and poll each at its own type’s status
endpoint (
/v1/images/{id} or /v1/videos/{id}). 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: