OpenAI API errors
What does "You exceeded your current quota" mean on the OpenAI API?
"You exceeded your current quota" is a 429 billing error, not a rate limit: OpenAI is refusing requests because your organization ran out of prepaid credits or hit a spend or usage limit, and every retry fails the same way until you add credits or raise that limit. Check error.code in the response first, because it names the exact cause.
OpenAI documents 4 billing codes that can sit behind this kind of 429: credit_balance_exhausted, project_spend_limit_exceeded, organization_spend_limit_exceeded and organization_usage_limit_exceeded. Each has its own fix, listed in the table below.
Which 429 you have, and the fix for each
OpenAI's error code guide puts it plainly: "For billing-related errors, inspect error.code to identify the specific cause. The broader error.type can still be insufficient_quota." The classic response body, as printed in OpenAI's own cookbook, looks like this:
{
"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"
}
}| What error.code says | What it means | Fix | Retry? |
|---|---|---|---|
credit_balance_exhausted | Your organization has no prepaid credits left. | Add credits in your organization's billing settings. | No |
project_spend_limit_exceeded | One project hit its enforced monthly spend limit. Other projects keep working. | Raise or remove the limit in that project's settings, or wait for the monthly reset. | No |
organization_spend_limit_exceeded | The organization hit its enforced monthly spend limit, which covers every project. | Raise or remove it on the Organization limits page, or wait for the monthly reset. | No |
organization_usage_limit_exceeded | The organization hit the monthly usage limit OpenAI assigned to it. | Request a higher approved usage limit, or contact OpenAI support. | No |
| Rate limit reached for requests | Too many requests or tokens in a short time. | Wait as long as Retry-After says, or back off with jitter. | Yes |
If error.code only repeats insufficient_quota, check the same things in this order: your credit balance, then project and organization spend limits, then the usage limit for your tier.
The fastest fix
- Out of credits (
credit_balance_exhausted): add credits on the billing page of your organization settings. OpenAI's cause line is short: "Your organization has no prepaid credits remaining." - Spend limit hit (
project_spend_limit_exceededororganization_spend_limit_exceeded): raise or remove the limit. OpenAI says traffic resumes "after the update propagates". If you leave it, the limit resets with the next monthly cycle. - Usage limit hit (
organization_usage_limit_exceeded): OpenAI sets this cap, not you. It is $100 a month on the Free tier, $500 on Build, $5,000 on Launch and $200,000 on Grow. Your tier goes up on its own as total credit purchases reach $5, $100 and $500, or you can request a higher limit. - Stop retrying. OpenAI: "Retrying billing, spend, or quota errors won't restore API access." Make your client stop on these codes and tell a person, instead of looping and filling your logs.
How the spend limit 429s differ
The two spend limit codes only show up when someone set a hard limit. A project limit stops one project: "Other projects can continue unless their own limit or the organization limit is also reached." An organization limit "applies to API traffic across all projects in the organization."
For an organization limit to block anything, Enforce a hard limit has to be on, and OpenAI is clear that "Spend alerts do not enforce a cap." Enforcement also lags a little: "Enforcement is not instantaneous, so recorded spend can slightly exceed the configured amount." The full setup is in our OpenAI spending limit guide.
organization_usage_limit_exceeded is a third thing. OpenAI calls it a limit that "is separate from organization and project spend limits that you configure", so raising your own spend limits won't clear it. You need a higher approved usage limit or a higher tier.
If a Costbrake brake caused it
Costbrake's OpenAI brake works through these same spend limits. Freeze project spend sets one project's monthly hard spend limit to $0.01, and Freeze organization spend does the same for the whole organization. Once OpenAI enforces it, usually within minutes, paid requests fail with 429 project_spend_limit_exceeded or organization_spend_limit_exceeded. With a project brake, other projects keep working. The brake never causes credit_balance_exhausted or organization_usage_limit_exceeded.
No brake fires by itself. A Costbrake admin picks the project or organization, types the connection's name to confirm and clicks Brake now. To lift it, an admin clicks Restore: Costbrake puts back the spend limit that was there before, or deletes the limit if there was none. OpenAI lets traffic through again once the change propagates.
Costbrake reads OpenAI usage with a read-only Admin key: hourly on Free, every 5 minutes on Pro and Team, and every 2 minutes during a spike. OpenAI's usage data itself runs a few minutes behind. The brake needs a second Admin key with write access, used only for spend limits. Costbrake can't add credits, raise OpenAI's usage limit or see your requests. Plans are on the pricing page, and spike alerts are covered in OpenAI billing alerts.
Questions and answers
Why does OpenAI say I exceeded my quota when I still have credits?
Because credits are only one of the limits. A project or organization spend limit, or the monthly usage limit OpenAI assigns to your organization, blocks requests even with credit left. Read error.code in the 429 response: project_spend_limit_exceeded, organization_spend_limit_exceeded and organization_usage_limit_exceeded each point to a limit, not to your balance.
Will the insufficient_quota error go away if I wait?
Usually not. If you are out of credits, it stays until you add credits. A spend limit lifts when you raise it or when the monthly limit resets. OpenAI says retrying billing, spend or quota errors won't restore access, so only a real rate limit, which has its own message, is worth retrying with backoff.
Is insufficient_quota the same as a rate limit?
No. A rate limit means too many requests or tokens in a short time, and backing off fixes it. insufficient_quota is the broad type OpenAI uses for billing problems: no credits, a spend limit or a usage limit. Those need a change to credits or limits before any request succeeds.
How do I know if a Costbrake brake caused my 429?
Check three things: error.code is project_spend_limit_exceeded or organization_spend_limit_exceeded, the spend limit in OpenAI's dashboard is $0.01, and an admin in your Costbrake workspace braked that project or organization. If all three match, an admin can click Restore in Costbrake to put the old limit back. A credit_balance_exhausted or organization_usage_limit_exceeded error never comes from Costbrake.
What is OpenAI's monthly usage limit on each tier?
OpenAI sets $100 a month on the Free tier, $500 on Build after $5 in credit purchases, $5,000 on Launch after $100, and $200,000 on Grow after $500. Your organization moves up a tier on its own as total credit purchases cross each threshold. Hitting the cap returns 429 organization_usage_limit_exceeded.
Sources
Updated