Sume 402 insufficient_credits: top up, then retry the same request
A Sume 402 means the balance cannot cover the requested generation. Add funds or lower the request cost, then retry with the same Idempotency-Key.

402 insufficient_credits means the balance is not sufficient for the requested generation (read 2026-10-06 in the errors docs). The job quota category's next action is to add funds or decrease the request cost.
How should a script react?
Stop the batch rather than looping, top up, and resume. Reuse the same Idempotency-Key for the request that failed.
What should I do in practice?
Never print API keys in the log.
- Do not retry a 402 in a tight loop.
- Reduce duration or resolution to cut the reserve.
- Log the
request_idfrom the error body.
Sources
Related posts
More in Developers
- Sume 409 errors: job_not_completed, job_not_cancelable and more
A Sume 409 means the job operation does not fit the job's current status: job_not_completed, job_not_cancelable or job_generation_already_started.
- Sume 413 payload_too_large and 415: shrink the body, send JSON
413 means the request body is over the API limit. 415 means the body was not application/json, shown in details.received_content_type.
- Sume 429 rate_limited: honor retry-after and use an Idempotency-Key
On a Sume 429 rate_limited, back off using retry-after if present, and never retry an unsafe submit without an Idempotency-Key. Headers explained.
- A 5xx on a Sume paid submit never proves no job: retry with the key
On Sume, only a validation, authorization or balance error proves a paid create was refused. A 5xx does not, so retry with the same Idempotency-Key.
Written by Sume