What happens when API credits run out

The status code and error each provider returns at zero balance. Several look like rate limits or bad keys, so they get retried instead of fixed.

There's no standard. OpenRouter, DeepSeek, Firecrawl and Exa return 402. OpenAI returns 429 insufficient_quota, the same status as a rate limit. Anthropic returns 400. Perplexity returns 401, which looks like a bad key. Code that retries 429s or alerts on 401s gets all of these wrong.

Every provider at zero

ProviderStatusWhat happensAuto-recharge
Anthropic400Zero credits → 400 "credit balance is too low"; tier monthly cap pauses until next month.Yes
Apify429Paid plans continue at plan unit rates (metered overage); Free hard-stops. Cap via maxMonthlyUsageUsd.No
Apollo.io402Credits granted upfront per term; buy additional credits in-app when depleted.No
Bright Data402Insufficient funds → service suspended (funds retained). Auto-recharge below 85% of commitment.Yes
Coresignal402402 insufficient credits; 429 rate limit. Annual grants credits upfront.No
Crunchbase429Free API tier eliminated (2025). No credit meter — call cap is contractual.No
Crustdata402402 insufficient_credits (error.type); credits valid 6 months from purchase.No
DeepSeek402Zero balance → 402 "Insufficient Balance"; manual top-up.No
Exa402Hard stop at $0 balance unless auto-recharge is on.Yes
Firecrawl402No PAYG; without auto-recharge packs, hard stop when credits run out.Yes
Google Gemini429429 RESOURCE_EXHAUSTED on any limit/guardrail or exhausted credits.Yes
Google Placesn/aPostpaid to Google Cloud Billing — no prepaid balance to exhaust. Per-SKU monthly free calls (Essentials 10k / Pro 5k / Enterprise 1k) do not pool. Guard spend with Cloud Billing Budgets.No
HubSpot Breeze429API 429 on rate limit; credits either PAYG-charged or blocked past allotment. Free/view-only seats can't use credits.Yes
Hunter.io429Hard stop — 429 "usage limit reached"; buy credit packs (3-mo validity).No
Instantly429Hard caps, not metered — upgrade tier or add contact packs. Lead credits block at 0.No
LeadMagic429Failed matches never charged; presumed block on exhaustion.No
MillionVerifier402At 0 credits verification blocks until you buy another (non-expiring) pack.No
OpenAI429429 insufficient_quota at zero balance or spent monthly cap; no negative balance.Yes
OpenRouter402Balance can go slightly negative (async settle); 402 until topped up above zero.Yes
Paralleln/aPrepaid/dashboard billing (platform.parallel.ai); no public balance/usage API. Qualified startups may receive up to $250 free credits.No
People Data Labs402Distinct overage-credit allotment, then 402 when total remaining hits 0.No
Perplexity401Zero balance → 401 (looks like a bad key!); auto-reload optional, off by default.Yes
Postmark422Paid tiers meter overage past 10k (billed next cycle); Free hard-stops at 100/mo.No
Prospeo429No rollover; at 0 credits, exports blocked until reset — buy a credit add-on or upgrade.No
SecurityTrails429Over-quota → 429. Opt-in auto-billing meters overage before the quota is hit.No
SendGrid429Paid plans meter overage, invoiced the following month; trial hard-stops at 100/day.No
Tavily429Paid plans continue at $0.008/credit up to a configurable paygo cap, then stop.No
WhoisXML APIn/aRequests fail once a product's credit pool hits 0; one-time/prepaid credits expire after 12 months.No

Don't retry them

A retry loop on an out-of-credit error is how a dry balance turns into an incident: thousands of failed calls, alerts about rate limits, and nobody looking at billing. Classify first:

// Out-of-credit responses that must not be retried.
function isOutOfCredit(provider: string, status: number, body: string): boolean {
  if (status === 402) return true; // OpenRouter, DeepSeek, Firecrawl, Exa, PDL, Crustdata…
  if (provider === "openai" && status === 429) return body.includes("insufficient_quota");
  if (provider === "anthropic" && status === 400) return body.includes("credit balance");
  if (provider === "perplexity" && status === 401) return true; // also a bad key: check the console
  return false;
}
  • On a hard stop, fail fast and surface it. The fix is a top-up, not backoff.
  • Where the status is shared (OpenAI 429), read the error code in the body.
  • Better still, know before it happens: alert on days of runway left.

Seen from Argus

Argus counts these as errors per provider. An error rate of 20% or more raises error_rate_high, and a balance with three days or less raises credits_critical, both visible to your coding agent through MCP while it's still working.

Questions

What error does OpenAI return when credits run out?
HTTP 429 with error code insufficient_quota. It shares the status with rate limiting, so check the code before retrying.
What error does Anthropic return when credits run out?
HTTP 400 with a message that your credit balance is too low. A monthly spend cap at your tier pauses requests until the next month.
Why does Perplexity return 401 when my key is valid?
Perplexity returns 401 at a zero balance, so an empty account looks exactly like a bad key. Check the balance in the console before rotating the key.

Related

Let your coding agent watch the meter.

Connect a provider key, point Claude Code or Cursor at the Argus MCP server, and ask what the last run cost.