OpenAI insufficient_quota when you still have credits
insufficient_quota rarely means a zero balance. Usually billing was never activated, the credits expired, or the key's project has no budget.
{"error":{"message":"You exceeded your current quota, please check your plan
and billing details.","type":"insufficient_quota","code":"insufficient_quota"}}Nearly everyone reads this as "I ran out of credits" and goes to top up. Then the top-up lands, the error continues, and the real cause is somewhere else entirely.
Here are the actual causes, roughly in order of how often they are the answer.
1. Billing was never activated
Creating an API key does not activate billing. An account with a key, no payment method, and no purchased credits returns insufficient_quota on the very first request -- which reads exactly like exhaustion even though nothing has been spent.
Check: billing settings. If there is no payment method, this is your answer.
2. Your credits expired
Credits expire as well as run out. OpenAI's help center says purchased prepaid credits expire one year after the purchase date, and promotional credit grants carry their own expiry. A balance you topped up long ago can be gone even though you never spent it.
Check: the credit grants view, and look at the expiry column rather than the total.
3. The project has a zero budget
Newer OpenAI accounts are organised into projects, and each project can carry its own spending limit. A project created with a limit of zero -- or one that has hit its cap -- returns insufficient_quota even when the organization has plenty of credit.
Check: which project your key belongs to, and that project's limit. This is the cause that most often survives a top-up, because the money went to the org while the block is on the project.
4. Payment method declined
A failed charge suspends API access before it produces an obvious billing email. Balance looks fine, requests fail.
Check: billing history for a failed charge.
5. The organization spend cap
Separate from project limits. An org-level monthly maximum stops all requests when reached, regardless of remaining credit.
What does not work
Adding credits without checking the project limit. The most common wasted step. If the block is a project cap, more org credit changes nothing.
Generating a new API key. The key is not the problem -- if it were, you would get invalid_api_key instead.
Switching models. Quota is enforced per account, not per model. A cheap model fails exactly like an expensive one.
Distinguishing it from a rate limit
Worth being precise, because they are often confused:
| Error | Meaning | Fix |
|---|---|---|
insufficient_quota | Billing or budget problem | Fix billing; retrying never helps |
rate_limit_exceeded | Too many requests per minute | Slow down or spread load; clears on its own |
If retrying occasionally succeeds, you have a rate limit. If it fails identically every time, it is quota, and the fix is in the billing console rather than in your code.
Not depending on one billing relationship
Every cause above shares one property: a single account's billing state can stop your work completely, and several of the causes are administrative rather than financial.
Routing through a local gateway means an OpenAI billing problem is a degraded path rather than a stopped one:
npm install -g @sifxprime/krouter
krouter -tConnect OpenAI alongside anything else -- free tiers, a subscription you already have, another metered API -- and put them in a fallback combo. OpenAI returns this error as an HTTP 429, so kRouter backs that account off and moves the request to the next entry while you sort the billing out. For scale on the cost side, DeepSeek's own pricing page lists deepseek-flash at $0.15 per million input tokens off-peak and $0.30 at peak (October 2026), so a fallback path does not have to cost more for routine work. The cheapest-models roundup covers the rest.
Common questions
I added credits and still get insufficient_quota. Why?
Most often because the block is a project spending limit rather than an organization balance. The money went to the org while the cap sits on the project your key belongs to. Check the project's limit before topping up again.
Is insufficient_quota the same as a rate limit?
No. insufficient_quota is a billing or budget problem and retrying never helps. rate_limit_exceeded is too many requests per minute and clears on its own. If retrying occasionally succeeds, you have a rate limit.
Will a new API key fix it?
No. If the key were the problem you would get invalid_api_key instead. The quota block is on the account, project, or billing state.
Does switching to a cheaper model help?
No. Quota is enforced per account, not per model, so a cheap model fails exactly like an expensive one.
Why does a brand new account fail on its first request?
Because creating an API key does not activate billing. An account with a key, no payment method, and no purchased credits returns insufficient_quota immediately, which reads like exhaustion even though nothing has been spent.
Related
Published by Kodelyth, the team that builds kRouter. Posts are drafted with AI assistance and reviewed by a person before they go out. kRouter is free and MIT licensed.
Install kRouterRelated posts
- Fix an errorCursor ignores your localhost base URL: why, and the fixCursor calls a custom base URL from its own servers, so localhost never answers. How to expose a local router or Ollama safely, and the tunnel's limits.
- Fix an errorGemini 429 RESOURCE_EXHAUSTED: rate limit or quota?Google returns the same 429 for a per-minute limit and a spent daily quota. How to tell them apart, when the daily quota resets, and how to fail over.
- Fix an errorClaude Code 529 Overloaded: who sent it and how to fail overA 529 is not your quota: the model is out of capacity, and Claude Code has already retried. How to tell who sent it, and how to keep working.
Relevant docs
- TroubleshootingFixes for common kRouter problems: banned or rate-limited accounts, OAuth sign-ins, MITM certificates, localhost and Cursor, Docker logins and the CLI.
- Error referenceWhat the common AI provider errors mean, why they happen, and how to get past them.
- Combos & fallbackPut several models behind one name. kRouter falls back from one to the next, rotates them, or asks a panel of models and merges the answers.