Back to guides
Troubleshooting·July 17, 2026·6 min read

Claude API “credit balance is too low” / 402 insufficient_quota — the fix

This error has nothing to do with your code: the prepaid balance behind the key is empty (or your monthly spend cap tripped). Here's how the billing models differ between Anthropic Console and gateways, and the alarms that stop it recurring at 2 a.m.

This error has nothing to do with your code: the prepaid balance behind the key is empty (or your monthly spend cap tripped). Here's how the billing models differ between Anthropic Console and gateways, and the alarms that stop it recurring at 2 a.m.

The error

response (HTTP 400 / 402)
// Anthropic Console (HTTP 400):
{"type":"error","error":{"type":"invalid_request_error",
 "message":"Your credit balance is too low to access the Anthropic API..."}}

// OpenAI-compatible gateways, e.g. Kunavo (HTTP 402):
{"error":{"type":"insufficient_quota",
 "message":"Wallet balance is empty. Top up to continue."}}

Causes and fixes at a glance

CauseFix
Prepaid balance actually at zeroTop up. On Anthropic: Console → Plans & billing. On Kunavo: /app/billing (balance never expires).
Auto-reload off (or its card expired)Enable auto-reload / update the card so spikes don't drain to zero unnoticed.
Monthly spend cap reachedRaise or clear the per-key / per-workspace cap if the spend was legitimate.
Wrong workspace's keyKeys draw from the workspace that minted them — a funded org doesn't fund a different workspace's key.

Confirm it's balance, not auth

401 = key problem; 400 "credit balance too low" / 402 insufficient_quota = money problem. Don't rotate keys for a billing error — the new key reads the same empty wallet.

Top up, then verify with one cheap call

Balances apply immediately on both Anthropic and Kunavo — no redeploy needed. Verify with a minimal request before unpausing your workers:

verify.sh
curl -s https://api.kunavo.com/v1/chat/completions \
  -H "Authorization: Bearer $KUNAVO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"gemini-2-5-flash","max_tokens":8,"messages":[{"role":"user","content":"ok?"}]}'

Make the next one boring

Set a low-balance alert (email) and, if your provider supports it, auto-reload with a sane monthly cap. Fail-closed billing is correct — you just want the warning before the wall, not the wall.

If you're calling through Kunavo

Kunavo fails closed at zero with an explicit 402 insufficient_quota (never a vague 500), failed requests aren't billed, and active accounts get a low-balance email with their own burn-rate runway before they hit the wall. Balance is a prepaid wallet from $5 that never expires, topped up at /app/billing with cards, Apple/Google Pay, Pix or WeChat Pay.

FAQ

I topped up — why am I still getting the error?

Check you funded the same account/workspace that minted the key, and that a monthly spend cap isn't the real blocker. Balance application itself is immediate on both Anthropic and Kunavo.

Does Claude's API have a free tier?

No — Anthropic bills every API call from the first token (Claude.ai consumer plans are separate from API credit). Gateways are also pay-as-you-go; Kunavo starts at a $5 top-up with rates 30–70% under list.

More error semantics live in the error reference; getting a key takes a minute via sign up and the authentication docs.