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.

4 min readSume
All posts

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_id from the error body.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume