insufficient_quota — You Exceeded Your Current Quota (OpenAI API)

Filed under APIs, auth & CORS

Most likely causeAbout 10 min · 6 steps

The OpenAI account behind your key has no spendable quota — billing was never set up, credits ran out, or the project's budget cap is reached.

Confirm the code says insufficient_quota
Add billing and credits on platform.openai.com
Check the project's own budget limit

Fastest route

Give your AI this prompt

Copy it, replace the bracketed part with your error, and send it.

Preview the prompt
I am getting an OpenAI API error with code "insufficient_quota" ("You exceeded your current quota"). I understand this is a billing/quota problem, not a rate limit — please do not suggest retry logic, backoff, or prompt changes as the fix.

Help me check in order, and explain what each screen should show: 1) billing on the platform account (platform.openai.com, not ChatGPT) — payment method on file and a positive credit balance, 2) whether credits were ever bought or a trial grant expired, 3) the monthly budget/limit of the specific project my API key belongs to, since a project cap can block calls even when the organisation has credit, 4) whether my app should move to its own production project with its own key, separate from my test project.

Never ask me to paste my API key or card details into this chat. When we are done, show me how to make one small test request to confirm, and suggest sensible project budget settings so this stops at a limit I chose rather than surprising me.

Fix it yourself

Follow the repair

  1. Read the error code before touching anything. Confirm the response actually says insufficient_quota:
    { "error": { "code": "insufficient_quota",
      "message": "You exceeded your current quota, please check your plan and billing details." } }
    If the code instead says rate_limit_exceeded, you have a speed problem, not a money problem, and this page's fixes will not help. Getting this one distinction right saves most of the debugging time this error usually eats.
  2. Check billing on the platform account — not in ChatGPT. Go to platform.openai.com, open Settings and then Billing. You want three things: a payment method on file, a positive credit balance (or an active pay-as-you-go plan), and no billing alerts. If billing was never set up, add a card now. Remember that whoever owns the organisation owns this wallet — if the account belongs to a client or an employer, you may be looking at their empty wallet, not yours.
  3. Buy credits or restore the balance. On prepaid billing, use the "Add credits" option — there is a minimum purchase (historically $5). Credits are granted to the organisation. If you just paid and the error persists, wait a few minutes and try again; balance updates are fast but not always instant, and a cached failure in your app is not proof the money did not land — test once with a fresh request before changing anything else.
  4. Check the limits of the specific project your key belongs to. In the platform dashboard, find the project your API key was created in — the key's project is listed next to it under API keys — then open that project's settings and limits. Look for a monthly budget or usage limit that is reached or set very low, and raise it to something sane. This is the step people miss: organisation has money, code is fine, key is fine — and the project's own cap is the blocker.
  5. Make sure test and production are not sharing one wallet by accident. It is good hygiene to use separate projects — and therefore separate keys — for experimenting and for your live app. Then a runaway test script cannot spend the production budget, and each project's usage page tells you exactly who spent what. If your app currently uses a key from a personal test project, create a production project, fund it, make a key there, and swap the key in your app's server-side environment settings.
  6. Retest with one small request, then set a guardrail. Restart or redeploy so the app picks up any new key, and make a single cheap request — a short chat completion — to confirm the error is gone. Then protect yourself from a surprise sequel: set project budgets that match what you actually intend to spend, and check the usage page after any traffic spike. insufficient_quota should be a planned stop at a limit you chose, never a mystery.
Why this happensOptional explanation

The API and ChatGPT are two different products with two different wallets. Your API key draws on the OpenAI platform account — prepaid credits or a monthly billed plan, managed at platform.openai.com — and paying for ChatGPT Plus or Pro puts exactly zero money into that wallet. Most people meet this error at one of three moments: the first time they run real code (billing was never set up for the API at all), the day a trial credit grant expires, or the day a busy app quietly spends the last of a credit balance.

The error's wording causes endless confusion, because it arrives as a 429 — the status code people associate with "too many requests, slow down." Read the error code, not just the number: insufficient_quota means the account cannot pay, and no amount of retrying, spacing out requests, or optimising prompts will move it. (Its sibling, rate_limit_exceeded, is the real speed limit — that one does respond to slowing down.) A second source of confusion is where the block lives. Quota can be exhausted at the organisation level (no credits at all) or capped at the project level: OpenAI lets each project have its own monthly budget, and a project whose budget is used up — or was set to a tiny test number and forgotten — returns this error even while the organisation has money sitting in it. The key in your app belongs to one specific project, so that project's limits are the ones that matter.

  • Billing never set up: no payment method on the platform account, so there is nothing to charge and no credits to spend.
  • Credits spent or expired: a prepaid balance that ran out, or an old free grant that quietly lapsed.
  • Project cap reached: the project your key belongs to has a monthly budget that is used up — or set near zero.
  • Wrong wallet entirely: a ChatGPT subscription mistaken for API funding, or a key from a different organisation or project than the one you topped up.

Quick answers

I pay for ChatGPT. Doesn't that cover the API?

No — they are separate products with separate billing. ChatGPT Plus or Pro funds the chat app only. API calls draw on the platform account at platform.openai.com, which needs its own payment method and credits.

How is this different from a rate limit? Both are 429s.

insufficient_quota means the account cannot pay — no credits, no billing, or a budget cap reached — and retrying never helps. rate_limit_exceeded means you are calling too fast and slowing down or waiting does help. Always read the error code, not just the 429.

My organisation has credits but I still get this. How?

Yes, and it is the most-missed cause: each project can have its own monthly budget. Organisation credit does not override a project whose budget is spent or set near zero. Check the limits of the project your key was created in.

One fix, every Friday.

One real error, explained in plain English, with the fix — in your inbox every Friday. No spam, no jargon, unsubscribe anytime.