Ideogram API keys pause at $0 balance: Sume's 402 insufficient_credits
Ideogram's API is prepaid and its keys pause when the balance hits zero. Sume answers an empty wallet with 402 insufficient_credits. Handle both in code.

Ideogram's API runs on prepaid credits and says keys pause when the balance reaches $0, with requests rejected as 402 when an account lacks a payment method or credits. Sume's wallet behaves similarly at the HTTP level: an insufficient balance returns 402 insufficient_credits, and the Image API does not bill failed generations.
Ideogram's details are from its API setup page, read 2026-10-02. Sume's are from Errors and credits and the Image API.
What does Ideogram's setup page say about credits?
The page describes a prepaid system: purchase options of $10, $20, $50, $100 or a custom amount, with a maximum balance of $300, and an auto-recharge option with a configurable threshold (from $5 to $900) and top-up (from $10 to $1,000). Subscription holders use monthly credits first and then the API balance. Requests are rejected with 402 when the account lacks a payment method or credits, and keys pause when the balance reaches $0. API keys are shown once at creation. Enterprise customers contact Ideogram for higher rate limits or invoiced billing.
What does Sume say?
Sume's error table lists 402 insufficient_credits as a balance that is not sufficient for the requested generation. Its billing section says a completed generation is billed in full, a failed or cancelled one is not billed, and a request that ends early because the client disconnected is billed as a failed generation. Sume's docs in the repo do not describe an auto-recharge feature for the API wallet, so this post makes no claim about one.
| Topic | Ideogram API setup page | Sume docs |
|---|---|---|
| Funding model | Prepaid credits, $10 to $300 balance range | Wallet balance; amounts not covered here |
| Auto top-up | Auto-recharge with thresholds | Not described in the docs read |
| Empty balance | Keys pause at $0; 402 on requests | 402 insufficient_credits |
| Failed generation | Not stated on the page | Not billed |
| Key display | Shown once | Keys managed in the API Keys dashboard |
How should your code treat a 402?
Do not retry a 402 in a loop. Neither provider's money state changes by waiting a few seconds. Stop the batch, alert a human or a top-up job, and resume from the first unfinished item. Safe resume needs an Idempotency-Key per submission, so a request that did complete before the balance ran out is not paid for twice.
A pattern that works on Sume: submit, branch on status code, and treat 402 as a hard stop while 429 is a back-off.
import os, requests
r = requests.post(
"https://api.sume.com/v1/images",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
json={"model": "ideogram/ideogram-v3", "prompt": "A poster that says OPEN"},
timeout=60,
)
if r.status_code == 402:
raise SystemExit("insufficient_credits: top up, then resume")
r.raise_for_status()
print(r.json())What else differs?
Ideogram says its image and video links expire and you should download results. Sume returns Sume-hosted signed URLs under data[].url. For the details of expiry on each side see Ideogram image URLs expire. For the sibling case on the tool endpoints see Ideogram 402 on tool endpoints.
Operational checklist for a prepaid wallet
Ideogram's page says all of an account's API keys share one credit balance, which means a leaked key can drain it for every integration. The same logic applies to any wallet: scope keys to the smallest set of jobs you can.
- Check the balance before a large batch, and size the batch to the balance.
- Treat 402 as terminal for the batch and 429 as a back-off.
- Use one Idempotency-Key per submission so a resumed run does not repeat paid work.
- Keep keys out of code and rotate them from the dashboard if one leaks.
Sources
Related posts
More in Comparisons
- InVideo credits per Seedance video vs Sume Seedance cost
InVideo lists about 13 Seedance 2 fast videos on a $20 plan. Sume estimates a 5-second 720p Seedance 2 fast clip at $1.51. Dated 2026-10-01.
- Kapwing subtitle minutes vs Sume caption job price
Kapwing Pro includes 1,000 auto-subtitle minutes for $16 to $24 a month. Sume charges $0.20 per caption job for a video up to 60 seconds. Dated 2026-10-01.
- Kie.ai API alternative: callbacks, credits and price vs Sume
Kie.ai says it prices 30 to 50 percent below official APIs and returns a task id on HTTP 200. Sume reserves list x 1.25. Here is how the two compare.
- Kling 4.0 'more natural lip sync': what you can call on Sume today
Kling's 4.0 page promises more natural lip sync and tighter A/V sync. Sume lists no Kling 4.0 id; for lip sync today use Fabric or H3 Max Lip Sync.
Written by Sume