Jobs

Cancel a queued job you started through the API or MCP; the credits held for it are refunded. Jobs that are already running cannot be canceled (409). Returns the canceled job. This is free (no credits). Requires an API key (user scope).

delete/assets/jobs/{id}

Path parameters

idstring required

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