OpenAI error 429 — "You exceeded your current quota"
Filed under APIs, auth & CORS
Either you are calling faster than your rate limit allows, or the API account is out of money — the code inside the error tells you which.
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 429. The full error body is: [paste the full error JSON, including the code field]. Please: 1) tell me from the code whether this is rate_limit_exceeded (a speed limit) or insufficient_quota (a billing limit) — use the code in my error, do not guess, 2) if it is a rate limit, add retry-with-backoff to my API call (start at 1 second, double each time, only retry 429s) and point out any place my app fires many requests at once, 3) if it is a quota error, do not change code — list the exact billing screens to check in the OpenAI platform (payment method, prepaid credits, monthly usage limit) and remind me that API billing is separate from ChatGPT. Constraints: do not switch models or rewrite working features, make one change at a time, and tell me which of the two causes you found before you change code.
Fix it yourself
Follow the repair
- Read the code inside the error, not just the number. Log or print the full error response body, not only the status code. Buried in it is a
codefield, and that one word decides your entire fix:// The shape of the full error — find the "code" line in yours: { "error": { "type": "...", "code": "rate_limit_exceeded" } } // rate_limit_exceeded = you are asking too fast // insufficient_quota = the account is out of money - For insufficient_quota: add billing to the API account. Open the OpenAI platform site, go to Settings, then Billing. Add a payment method or buy credits, and check that the monthly usage limit is not set to zero or already reached this month. The most common version of this error is a brand-new account that never had billing added at all. And to repeat it because it trips up so many people: paying for ChatGPT does not put a single cent into this account.
- For rate_limit_exceeded: retry with backoff. When the limit really is speed, the fix is to wait and ask again — politely, with growing pauses. Start at one second, double the wait after each failure, and only retry 429s, not every error. A minimal version looks like this:
async function callWithBackoff(fn) { let wait = 1000; // start with a 1-second pause for (let attempt = 1; attempt <= 5; attempt++) { try { return await fn(); } catch (err) { if (err.status !== 429) throw err; // only retry 429s await new Promise(r => setTimeout(r, wait)); wait *= 2; // 1s, 2s, 4s, 8s... } } throw new Error("Still rate limited after retries"); } - Check your limits page before assuming you are capped forever. On the platform site, the Limits page shows your current requests-per-minute and tokens-per-minute for each model. New accounts start in the lowest tier, which is why a small burst can trip the limit during your first week. Tiers rise automatically as your payment history grows, so the numbers on that page — not a blog post — are the ones to plan around.
- Slow the app down at the source. Backoff treats the symptom; this step treats the cause. Call the API once per user action instead of on every keystroke, page load, or re-render. Cache answers that repeat, batch small jobs into one request where you can, and put background work in a queue that sends at a steady pace instead of twenty requests in the same second.
- If the very first call failed, it was never speed. Use this as your tie-breaker: a brand-new API key that receives a 429 on its first ever request cannot have exceeded a per-minute rate it never used. That is a billing wall announcing itself — no payment method, expired free-trial credits, or a monthly limit set to zero. Skip the retry code and go back to step 2.
Why this happensOptional explanation
OpenAI protects its API with two different guardrails, and confusingly both answer with the same HTTP status: 429, Too Many Requests. The first guardrail is speed — every account tier gets a budget of requests per minute and tokens per minute for each model, and bursts above that budget are turned away. The second guardrail is money — prepaid credits and a monthly spending cap. Cross either line and the door closes, but the keys that reopen it are completely different.
This is why so many vibe coders burn an evening on the wrong fix. They add careful retry logic to cure what is actually an empty wallet, or they top up credits to cure what is actually a traffic burst. The response body always says which guardrail you hit — the code field reads rate_limit_exceeded or insufficient_quota — but most error popups show only the headline or the bare 429, so the diagnosis step gets skipped.
- insufficient_quota: no payment method on the API account, prepaid credits spent, or the monthly usage limit reached.
- ChatGPT is not API credit: a Plus or Pro subscription does not fund API calls; the API bills from its own account.
- rate_limit_exceeded: a burst of requests — or one very large request — went over your tier's per-minute budget.
- Retry storms: code that retries instantly, or many users arriving at once, keeps the burst going and stretches a one-minute limit into a long outage.
Quick answers
I pay for ChatGPT. Why does the API say I have no quota?
They are separate products with separate billing. ChatGPT Plus pays for the chat website and app; API usage is metered and paid from the API platform account. Add a payment method or credits there and insufficient_quota clears, usually within a few minutes.
Will retrying eventually fix insufficient_quota?
No. Retrying is the correct medicine for rate_limit_exceeded and completely useless against a billing wall — you will just collect more 429s. Fix the billing first, then test with a single request.
How long until a rate limit resets?
Rate limits are measured per minute, so a true rate_limit_exceeded usually clears within seconds to a minute once you stop hammering. If you are still blocked after a quiet minute, re-read the error code — it is probably quota after all.