Errors
Error responses
Every error response has the same shape:
Branch on code, which is stable. message is for people and may change. The
request_id is also returned in the X-Request-Id header; quote it when
contacting support.
Failed jobs
A job can fail after it was accepted. Its status is then failed, with a code:
A job we cancel ourselves, for operational reasons, has status canceled and
the code canceled_by_operator rather than failed. Resubmit it.
A code from the table above can also arrive this way, when the condition is only detected once processing starts rather than at submission.
New codes may be added. Treat an unrecognised code as a problem on our side.
Retrying safely
Send an Idempotency-Key header, of your choosing, with every submission:
Resubmitting with the same key and the same body returns the original job, with
200 rather than 202, instead of creating, and charging for, a second job. The
same key with a different body is rejected with 409 idempotency_conflict. Keys
are scoped to your organization and remembered for 24 hours.
Retry 429 and 503 responses, and network errors, with exponential backoff.
Do not retry other 4xx responses unchanged: they will fail the same way.

