GET /v1/jobs/{id}: status becomes failed or policy_blocked, result remains null, and error.code provides a safe classification. Stop polling at either terminal state. The HTTP error shapes below apply when a request itself is rejected.
Parse the HTTP status and body
Some handlers return a simple error:code, message, user_message, cta, and next_action. Keep the status code and structured fields. For a readable message, prefer user_message or message, then error; do not assume every endpoint uses the same shape.
If
cta is true, surface the relevant account action in your application. Repeating the same request will not solve a missing plan, permission, or credit balance.
Handle a failed job
Stop polling onfailed or policy_blocked. When present, failure_code gives a broad category:
Save the job ID and
fail_reason for support and for your own logs. These fields can be absent, so fall back to the status and the message shown in Studio.