Requests and responses
Introduction
Requests and responses are JSON. Monetary values are decimal integer strings; never compute balances with floating-point numbers. Read a task only from your own key and workspace.
FieldMeaning
id
Task identifier, equal to the submitted idempotency key.
state
Task lifecycle state.
billing_status
held, pending, settled or released.reserved_microcredits
Currently held reservation.
charged_microcredits
Settled charge; 0 is not proof of failure.
error_code
Machine-readable failure code.
error_message
Optional sanitized failure detail for image jobs; omitted when unavailable and may be truncated. Use error_code for program logic.
failure_reason
Optional safe classification for failed video tasks.
| State | Action |
|---|---|
queued, submitting, submitted, processing, finalizing | Poll your own task. |
completed | Read the result with ?result=true. |
failed | Inspect the error and the released reservation. |
pending | Needs reconciliation; keep the task id and stop automatic resubmission. |
PreviousMixCut generation