OpenAI credit_balance_exhausted: why auto recharge stopped and what to set up
Your app starts getting 429s, the billing page shows a balance a few cents below zero, and auto recharge is on. Here's what OpenAI's prepaid billing actually promises, what each billing error means, and how to set things up so a missed recharge doesn't take production down.
Last reviewed 31 Oct 2026
The short version
credit_balance_exhaustedis a429meaning the organization has no prepaid credits left. Retrying won't fix it; buying credits will.- The balance can go negative: access doesn't stop the moment credits hit zero, and the overrun is taken from your next purchase.
- Auto recharge stops adding credits when the payment fails or the monthly recharge limit is used up.
- A recharge limit is not a usage limit. To cap spend, use a monthly hard spend limit on the organization or project.
- For production: keep the recharge threshold well above zero, handle the billing codes separately from rate limits, and get told the same day.
1. Which 429 is it?
A 429 from OpenAI can be a rate limit, a spend limit, a usage limit or an empty balance. OpenAI's docs say to check error.code, because billing errors can still carry the broader error.type of insufficient_quota (usage and spend limits article, error codes):
error.code | What it means | What restores traffic |
|---|---|---|
credit_balance_exhausted | No prepaid credits left in the organization | Add credits in billing |
organization_spend_limit_exceeded | The org hit the hard spend limit you set | Raise or remove the limit, or wait for the monthly reset |
project_spend_limit_exceeded | The project hit the hard spend limit you set | Raise or remove the project limit, or wait for the monthly reset |
organization_usage_limit_exceeded | The org hit its OpenAI-assigned monthly usage limit | Request a higher approved usage limit |
| (rate limit message) | Too many requests or tokens too quickly | Back off and retry, following Retry-After |
Only the last row is worth retrying. OpenAI says retrying billing, spend or quota errors won't restore access. The official Python SDK's README says it retries 429 errors twice by default; turn that off and decide in your own code which 429s to retry.
2. Why the balance goes below zero
From OpenAI's prepaid billing article: “API access may not stop immediately after your credits run out.” Usage processed during that delay appears as a negative credit balance, and that amount is deducted from your next credit purchase. OpenAI's own advice: don't rely on the prepaid balance as a spending cutoff that takes effect immediately.
So a balance of -$0.02 on its own is normal. The question is why no recharge happened before it got there.
3. How auto recharge works, and when it stops
- Auto recharge buys credits when the balance falls below the threshold you set. The minimum recharge is $5; your trust tier sets the maximum recharge and the maximum balance you can hold.
- It is on by default when you first set up prepaid billing, with a balance threshold, the balance to restore to, and an optional monthly recharge limit.
- If a recharge would go past what's left of the monthly limit, only the remaining amount may be added (if it meets the $5 minimum). Once the limit is reached, auto recharge adds nothing until next month.
- Manual purchases don't count toward the monthly limit.
- If a recharge payment fails, OpenAI emails you, and usage stops when the balance runs out (after the same processing delay).
- Purchased credits expire after 1 year.
When auto recharge didn't fire, OpenAI's checklist is: in the same organization, check the payment method, the balance threshold and how much of the monthly recharge limit is left. One catch: because manual purchases don't count toward that limit, a manual top-up that works tells you nothing about whether auto recharge will work next time.
Two developers on the OpenAI forum (15 and 20 Oct 2026) reported auto recharge not adding credits once the balance went a few cents negative (one said the monthly cap hadn't been reached); both got production back by adding credits by hand. If that's you and the payment method, threshold and remaining limit all check out, contact OpenAI Support with the organization, the error message and code, the time of the error with your time zone, and any request IDs.
4. A recharge limit is not a spend limit
OpenAI puts it plainly: “A recharge limit is not an API usage limit. It controls automatic credit purchases, not the amount of existing credits you can use.” If a key leaks or an agent loops, the monthly recharge limit only decides how much new credit auto recharge can buy. Everything already in your balance can still be spent.
The control that stops usage is a hard spend limit (spend limits guide): Organization limits, or Project settings → Limits, then Spend → Edit spend limit → enter a monthly amount → turn on Enforce a hard limit → Save. When it's reached, requests fail with organization_spend_limit_exceeded or project_spend_limit_exceeded. It's monthly, and enforcement isn't immediate, so recorded spend can slightly exceed it. More on that in OpenAI spend limit not working.
A positive balance also doesn't mean you're under every limit: rate limits, the approved monthly usage limit and enforced spend limits all apply separately.
5. Handle the billing codes in your app
from openai import OpenAI, RateLimitError
client = OpenAI(max_retries=0) # retry rate limits yourself, not billing errors
BILLING = {"credit_balance_exhausted", "organization_spend_limit_exceeded",
"project_spend_limit_exceeded", "organization_usage_limit_exceeded"}
try:
resp = client.responses.create(model=MODEL, input=prompt)
except RateLimitError as e:
if e.code in BILLING:
alert_on_call(f"OpenAI billing stop: {e.code}") # your paging/Slack/email hook
raise # stop the job; retrying won't restore access
raise # a real rate limit: back off (honour Retry-After) and retry with a capThe point is to hear about credit_balance_exhausted within minutes from your own app, not from users. For genuine rate limits, OpenAI's 429 article recommends following Retry-After, or exponential backoff with jitter, and capping both the number of retries and the total time.
Checklist for a production app on prepaid billing
- Auto recharge on, with the threshold well above zero (we'd suggest a day or two of normal spend) so the processing delay never carries you through zero.
- Monthly recharge limit set above a busy month's spend, and checked when traffic grows. It is the setting that quietly stops reloads.
- A valid payment method on the right organization, and recharge-failure emails going to an inbox someone reads.
- A monthly hard spend limit on the organization and on each project, because the recharge limit doesn't cap usage.
- Billing error codes handled apart from rate limits: no retries, an alert to a human.
- Something outside the app that tells you the same day when spend is far above normal.
- If auto recharge fails with everything set correctly: buy credits by hand to get traffic back, then send Support the org, error code, time and request IDs.
Not sure about the rest of your limit settings? The free AI key limit audit checks OpenAI, Anthropic and OpenRouter in a few minutes (no sign-up, no key needed). For agents that can loop, see Runaway AI agent cost; if a key may have leaked, start with OpenAI API key leaked.
Where KeyBark fits (and where it doesn't)
KeyBark reads your OpenAI organization costs (with an Admin key) from our servers about every 15 minutes during the beta and emails you when a daily or monthly threshold you set is crossed, or when today's spend jumps above your 7-day average. That covers the “spend is far above normal” item in the checklist.
Limits, honestly: KeyBark does not read your prepaid balance or auto recharge settings, so it can't tell you a recharge failed or that credits are about to run out; your app's error handling and OpenAI's emails do that. Checks run on a schedule and OpenAI's cost data comes in daily buckets, so an alert can arrive after money has been spent. KeyBark is not a proxy and can't block a request.
FAQ
What does credit_balance_exhausted mean in the OpenAI API?
It is a 429 error code meaning your organization has no prepaid credits left. The broader error.type can still be insufficient_quota. Retrying won't help; add credits in the API billing settings, then allow a few minutes for the new balance to show before sending traffic again.
Why is my OpenAI API balance negative?
OpenAI says API access may not stop the moment credits run out. Usage processed during that delay shows up as a negative balance, and that amount is deducted from your next credit purchase. So the prepaid balance is not a spending cutoff you can rely on to the cent.
Does the monthly recharge limit cap my OpenAI API usage?
No. OpenAI's prepaid billing article says a recharge limit is not an API usage limit: it caps how much auto recharge can buy in a month, not how much of your existing credit you can use. To cap usage, set a monthly hard spend limit on the organization or project with “Enforce a hard limit” turned on.
Why didn't auto recharge add credits?
Check, in the same organization: the payment method (a failed recharge payment triggers an email), the balance threshold, and how much of the optional monthly recharge limit is left. Once that limit is reached, auto recharge adds nothing until next month. A manual purchase doesn't count toward the limit, so a manual top-up working doesn't prove auto recharge works.
Sources (read 31 Oct 2026): OpenAI Help Center Setting up and managing prepaid API billing, Troubleshooting API usage and spend limits and Troubleshooting API rate limits and 429 errors; OpenAI API docs Spend limits and Error codes; openai-python README (Retries). KeyBark is not affiliated with OpenAI.
KeyBark watches your OpenAI, Anthropic and OpenRouter spend from the server and flags a crossed threshold or spike by email and on your dashboard. Free for one key.