You Exceeded Your Current Quota: OpenAI Error Fix
Fix the OpenAI error You exceeded your current quota (insufficient_quota): what each billing code means, how it differs from a 429 rate limit, and what to check
GoiAPI · · 11 min read
Ask AI and more

"You exceeded your current quota, please check your plan and billing details" means OpenAI refused the request for a billing reason, not because you sent too many requests. Your organization has run out of prepaid credit, a spend or usage limit was hit, or the organization never set up API billing at all. Waiting and retrying will not fix it: you have to add credit or change the limit, then send the request again.
The confusing part is the status code. OpenAI returns this error as HTTP 429, the same code it uses for rate limits, so many apps treat it as "too fast, try again" and loop. This guide shows how to tell the two apart, the exact steps to fix each billing cause on OpenAI, and how the same situations look when you call models through GoiAPI, where a low balance is a separate 402 error.
What the error looks like
The classic response body looks like this (as posted on the OpenAI developer forum in March 2026):
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}OpenAI now splits billing failures into more specific codes. Its error codes guide (checked on December 5, 2026) says to read error.code for the exact cause, and notes that the broader error.type can still be insufficient_quota. So depending on your account, you may see the old message or one of these:
error.code | What happened | Fix |
|---|---|---|
insufficient_quota | Generic billing or quota failure (older message) | Check the billing page, then the limits page |
credit_balance_exhausted | The organization has no prepaid credits left | Buy credits |
organization_spend_limit_exceeded | The organization hit a hard spend limit you configured | Raise or remove the organization limit |
project_spend_limit_exceeded | One project hit its hard spend limit | Raise or remove the limit in project settings |
api_key_spend_limit_exceeded | This API key hit its monthly hard spend limit | Raise the key's limit, or wait for the monthly reset |
organization_usage_limit_exceeded | The organization hit the usage limit OpenAI assigned to it | Request a higher approved limit or contact OpenAI support |
All of these come back as HTTP 429. The guide is explicit that retrying billing, spend or quota errors won't restore access.
insufficient_quota vs 429 rate limit vs 402
Three errors get mixed up in search results and in code. Here is how they differ:
Quota error (insufficient_quota) | Rate limit (rate_limit_exceeded) | 402 low balance | |
|---|---|---|---|
| HTTP status | 429 on OpenAI | 429 | 402 (used by GoiAPI and some other APIs, not by OpenAI for this case) |
| Typical message | "You exceeded your current quota..." | "Rate limit reached for requests" | GoiAPI: "Your balance is too low for this request..." |
| Cause | No credit, or a spend or usage cap | Too many requests or tokens in a short window | Balance can't cover the request |
| Does waiting help? | No, unless a monthly limit resets | Yes, wait for Retry-After | No |
| Fix | Add credit or raise the limit | Slow down, back off, retry | Top up, or lower max_tokens |
A quick test: if the error shows up on the very first request of the day, or on every single request, it is billing. If it appears only when you send bursts and clears after a few seconds, it is a rate limit. OpenAI's rate limit troubleshooting article (checked on December 5, 2026) adds that rate limits can be enforced over windows shorter than the one displayed, so short bursts can trip them even when your per-minute average looks low.
How to fix "You exceeded your current quota" on OpenAI
Work through these in order. Each step is based on OpenAI's usage and spend limits article and its prepaid billing article, both checked on December 5, 2026.
- Read
error.code. It tells you whether this is credit, an organization limit, a project limit or a key limit. Print the whole error body, not just the message. - Check that API billing exists at all. ChatGPT subscriptions and the API platform are billed separately. A ChatGPT Plus or Pro plan does not give your API key any credit.
- Buy credit. Open the billing page of the API platform and add to your credit balance. The minimum purchase is $5 and the default is $10. Your paid usage tier also moves up automatically once total credit purchases reach $5, $100 and $500 (rate limits guide, checked on December 5, 2026).
- Check auto-recharge. If you use auto-recharge, look at whether it actually ran. In one March 2026 forum thread, the cause turned out to be an auto-recharge limit that had been reached, even though the account looked funded.
- Check every spend limit. Organization, project and per-key hard limits are separate, and several can apply at once. An organization limit covers all its projects; a project limit covers traffic billed to that project. Changing them needs the right permissions.
- Check the usage limit. The Limits page shows the monthly limit OpenAI approved for your organization. It is separate from your own spend limits and from rate limits.
- Wait a few minutes, then retry once. OpenAI says an updated balance may take a few minutes to appear. If the same code comes back, a different limit is still blocking you.
"I have credit but still get insufficient_quota"
This is the most common forum complaint. Before contacting support, rule out these:
- The key belongs to another project or organization. Credit sits at the organization level, but spend limits sit on projects and keys. A key from a project with a hard limit of $0 fails even if the organization has money.
- Your app is sending a different key. An old
OPENAI_API_KEYin your shell, a.envfile or a tool's settings can win over the key you just created. Print the first and last characters of the key your code actually loads. - Credits expired. Purchased credits expire after one year (credits bought in Japan after November 13, 2026 expire after 180 days).
- A key-level monthly limit was reached.
api_key_spend_limit_exceededclears with the monthly reset, or when someone raises the key's limit. - A third-party tool uses its own key. Automation tools and plugins often store a separate OpenAI key. Zapier's help page for this error lists missing API billing, a reached usage limit and rate limits as the usual causes.
If none of these apply, contact OpenAI support with the request ID from the x-request-id response header.
Handle quota errors in code
Because OpenAI uses 429 for both cases, the official Python SDK raises the same RateLimitError for a quota error and for a real rate limit. It also retries every 429 twice by default with a short backoff (openai-python README, checked on December 5, 2026), which only wastes time on a billing error. A 402 is not one of the retried codes and arrives as a plain APIStatusError.
The fix is to look at type and code on the exception. This works with openai-python 3.64.0, the current release on December 5, 2026:
from openai import OpenAI, APIStatusError
BILLING_CODES = {
"insufficient_quota",
"credit_balance_exhausted",
"organization_spend_limit_exceeded",
"project_spend_limit_exceeded",
"api_key_spend_limit_exceeded",
"organization_usage_limit_exceeded",
}
def is_billing_error(e: APIStatusError) -> bool:
"""True when retrying will not help until credits or limits change."""
return (
e.status_code == 402
or e.type == "insufficient_quota"
or e.code in BILLING_CODES
)
client = OpenAI() # reads OPENAI_API_KEY
try:
reply = client.chat.completions.create(
model="your-model-name",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)
except APIStatusError as e:
request_id = e.response.headers.get("x-request-id")
if is_billing_error(e):
print(f"Billing problem ({e.status_code} {e.code}): add credit or raise the limit.")
elif e.status_code == 429:
wait = e.response.headers.get("retry-after") or "a few"
print(f"Rate limited: wait {wait} seconds and retry.")
else:
print(f"HTTP {e.status_code} {e.code}, request id {request_id}")We ran this script on December 5, 2026 against GoiAPI with an invalid key and max_retries=0: it printed the 401 branch with invalid_api_key and a request ID, which confirms the status_code, code and header attributes work in this SDK version. The billing and rate limit branches were not tested end to end.
Two more details from the SDK source in the same version: it skips retries when the response carries the header x-should-retry: false, and it does not retry when Retry-After asks for more than its maximum delay.
How the same situations look on GoiAPI
GoiAPI is an OpenAI-compatible API: you keep the OpenAI SDK and change the base URL to https://api.goiapi.com/v1 and the key. Billing works differently, so the errors differ too. Messages below are quoted from the error codes reference, checked on December 5, 2026:
| Situation | Status | Message (values in braces are filled in) | Retry? |
|---|---|---|---|
| Balance can't cover the request | 402 | Your balance is too low for this request (about ${amount} needs to be held). Please top up your balance. | No: top up or lower max_tokens |
| Daily spending limit you set on the key (the monthly limit has the same message with "monthly") | 429 | Request rejected because it would exceed the daily spending limit of this API key (${limit}). The key works again from {reopenAt}, or you can raise the limit on the API Keys page. | No: sent with x-should-retry: false |
| Too many requests per minute | 429 | This API key has reached its limit of {limit} requests per minute. Please try again in {seconds} s. | Yes, after Retry-After |
| Too many requests at once | 429 | Your account already has {max} requests running at the same time. Please wait for one to finish, then try again. | Yes, when one finishes |
| Model overloaded | 429 | The model is overloaded. Please try again in a few minutes. | Yes, in a few minutes |
In the OpenAI error format, the 402 body uses "type": "insufficient_quota" and "code": "insufficient_quota", and the key spending limit uses "type": "insufficient_quota" with "code": "key_spend_limit_exceeded", so the is_billing_error check above catches both. A per-minute limit comes back with "code": "rate_limit_exceeded". We checked these bodies on December 5, 2026 but did not trigger a live 402 or spending-limit error. In the Anthropic format (/v1/messages), the 402 type is invalid_request_error.
Why a 402 can appear before your balance hits zero
Before calling the model, GoiAPI holds an estimated amount based on the input size and the max_tokens (or max_completion_tokens) you send. When the request finishes, only actual usage is charged and the rest of the hold is released (Limits and balance, checked on December 5, 2026). The amount in the 402 message is that hold, not the real cost.
That is why a large max_tokens can trigger 402 on a small balance. As a calculation from the pricing page on December 5, 2026: GPT-6.1 Sol costs $0.78 per 1M output tokens, so max_tokens: 32000 reserves about 32,000 x $0.78 / 1,000,000 = $0.025 for output alone, while max_tokens: 2000 reserves about $0.0016. When your balance is low, set max_tokens to what you actually need.
What a typical workload costs
Another calculation from the same prices: 1,000 requests to gpt-6-luna with 2,000 input tokens and 500 output tokens each use 2M input tokens ($0.0208 per 1M) and 0.5M output tokens ($0.1248 per 1M), so about $0.04 + $0.06 = $0.10 in total, before the small per-request minimum charge. The cost calculator does this for any model, and the token pricing guide explains input, output and cache tokens. Full GPT prices are in our GPT-6 API pricing breakdown.
Topping up
You top up GoiAPI with USDT (TRC20 or BEP20) or Binance Pay, from 5 to 4,000 USDT at a time, and 1 USDT adds 1 USD to your balance once the payment is confirmed (quickstart, checked on December 5, 2026). No credit card and no monthly fee. Top-ups are final and cannot be refunded, so add only what you plan to use. The Request history page in the dashboard shows the cost of each request as it happens, so you can see what is draining the balance.
If the reason you hit insufficient_quota is that you can't pay OpenAI by card, see how to use the OpenAI API without a credit card.
FAQ
Does ChatGPT Plus include OpenAI API credit?
No. OpenAI bills ChatGPT and the API platform separately. A ChatGPT subscription does not add credit to your API organization, so a new API key fails with a quota error until you buy API credit.
How long after adding credit does the error go away?
OpenAI says the updated balance may take a few minutes to appear. If the error persists after that, read error.code: a spend limit or usage limit can still block requests even with credit.
Why do I get a 429 when I am barely sending any requests?
If the body says insufficient_quota or one of the billing codes, the 429 has nothing to do with speed: it is a billing block. Real rate limits say "Rate limit reached" and clear after the Retry-After delay.
Am I charged for requests that fail with a quota error?
A request that is rejected before reaching the model produces no output. On GoiAPI, a failed request that returns no content is not charged, except a request you cancel yourself (error codes).
Can I get unused credit back?
On OpenAI, purchased credits are non-refundable except where the law, a contract or an approved exception requires it. On GoiAPI, top-ups are final and not refundable, so top up only what you need.
Get started
- Create a GoiAPI account and create an API key in the dashboard.
- Top up with USDT or Binance Pay. Start small: top-ups are final.
- Point the OpenAI SDK at
https://api.goiapi.com/v1with yoursk-...key, as shown in the OpenAI SDK integration guide.
Disclosure: GoiAPI sells API access to the models mentioned in this article.


