Jobs

Fetch one job you started through the API or MCP. Statuses: queued, running (both non-terminal - the response carries poll_after_ms, wait at least that long before asking again), then succeeded (read result), failed (read error: {code, subcode, message, retriable}; the held credits are refunded) or canceled. Generations typically finish within a few minutes; a job still queued after 15 minutes can be cancelled and resubmitted. Better still, pass wait=<seconds> (up to 60) to long-poll: the request is held until the job reaches a terminal state, so one call replaces a polling loop. Once status is succeeded, result holds exactly what the synchronous form of the operation named by task_type would have returned. This is a free read-only lookup (no credits). Requires an API key (user scope).

get/assets/jobs/{id}

Path parameters

idstring required

The job id returned by a generation call (its id in the 202 response).

Query parameters

waitinteger

Seconds to long-poll for a terminal state (0-60). Defaults to 0 (return immediately).

Response

Success

idstring required
task_typestring required

The public operationId that created this job (e.g. createImage). Determines the shape of result: it is exactly the 200 response body documented for that operation.

status'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' required
request_idstring
created_atinteger required

Unix ms

finished_atinteger
credits_chargednumber float

Credits this job cost you. Charged at enqueue; reported as 0 once a job fails or is canceled, since the charge is refunded.

resultobject

Present only when status is succeeded. Same shape as the synchronous response of the operation named by task_type.

poll_after_msinteger

Present while the job is queued or running: wait at least this many milliseconds before polling again. Prefer GET /assets/jobs/{id}?wait=30 (long-poll) over tight loops.

Changes

Changed in 1 of the 17 revisions of this API.1