OpenAI API error 429 rate limit exceeded

You're making API calls and suddenly hit a wall: RateLimitError: Rate limit reached for requests or Error 429: You exceeded your current quota. Your app stops working, and you're wondering if you broke something or if Op

OpenAI API error 429 rate limit exceeded

You're making API calls and suddenly hit a wall: `RateLimitError: Rate limit reached for requests` or `Error 429: You exceeded your current quota`. Your app stops working, and you're wondering if you broke something or if OpenAI's system is down.

What's actually happening

Error 429 means you've hit one of OpenAI's usage limits. There are three different types, and the error message usually tells you which:

Requests per minute (RPM) — You're sending too many API calls in a 60-second window. Free tier accounts get 3 RPM on GPT-4, paid accounts start at 500 RPM for GPT-3.5-turbo and scale up based on your usage tier.

Tokens per minute (TPM) — You're processing too many tokens too fast. Even if you're under the request limit, a single massive prompt can blow through your token budget. Tier 1 accounts get 200,000 TPM for GPT-4, tier 5 accounts get 10,000,000 TPM.

Insufficient quota — This shows up as `insufficient_quota` in the error. You've actually run out of credits or your account has no payment method attached. This isn't technically a rate limit but uses the same 429 error code.

The rate limits reset every minute on a rolling basis, not at fixed intervals. If you hit the limit at 2:34:15 PM, you'll need to wait until 2:35:15 PM for that specific request to age out of the window.

How to fix it

1. Check which limit you hit

Look at the full error response. It'll say something like `Rate limit reached for gpt-4 in organization org-xxx on requests per minute (RPM): Limit 500, Used 500, Requested 1`. This tells you exactly what broke.

2. Find your current tier

Go to platform.openai.com/settings/organization/limits. You'll see your usage tier (1-5) and exact RPM/TPM limits for each model. Tier 1 is the starting point after adding $5+ in credits. You move up tiers automatically as you spend more and build usage history over 7-14 days.

3. Implement exponential backoff

Add retry logic to your code. When you get a 429, wait 1 second and retry. If it fails again, wait 2 seconds, then 4, then 8. OpenAI's official Python library does this automatically if you use `openai.ChatCompletion.create()` with default settings. Here's what manual retry looks like:

```python

import time

for retry in range(5):

try:

response = openai.ChatCompletion.create(...)

break

except openai.error.RateLimitError:

time.sleep(2 ** retry)

```

4. Reduce concurrent requests

If you're running parallel API calls, throttle them. Use a queue system or add delays between batches. Instead of firing off 100 requests simultaneously, send 10 at a time with 6-second gaps.

5. For quota errors specifically

If you see `insufficient_quota`, check for unexpected charges or add credits at platform.openai.com/settings/organization/billing. You need at least $5 deposited to access most models. The common API errors guide covers other auth and quota issues.

If that doesn't work

Check platform.openai.com/usage to see your actual usage patterns. You might be hitting limits you didn't expect — particularly with embeddings or batch processing jobs that consume tokens faster than you realise.

Request a rate limit increase at platform.openai.com/settings/organization/limits — there's a "Request increase" button next to each model. You'll need to provide your use case and expected volume. OpenAI typically responds within 2-3 business days. They're more likely to approve if you've been spending consistently and haven't had payment issues.

For urgent problems where your production app is down, contact OpenAI support through help.openai.com with your organisation ID and the specific error message. Include your current tier, the limit you need, and why (but don't expect instant tier upgrades).

Questions people actually ask

Q: Can I pay to increase my rate limits immediately?

A: Not directly. You need to build usage history over 7-14 days to move up tiers automatically. Adding more credits doesn't speed this up, though you can request manual increases.

Q: Why do I get 429 errors even though I'm barely using the API?

A: You're probably on tier 1 with very low RPM limits. Three requests in a minute will max out GPT-4 access. Check your tier at the limits page.

Q: Do rate limits apply per API key or per account?

A: Per organisation, not per key. Creating multiple API keys won't get you around the limits.

Q: How long until my rate limits increase automatically?

A: You move from tier 1 to tier 2 after 7 days and $50 spent. Higher tiers need 14+ days and $1,000+ cumulative spend.

What to remember

  • Error 429 has three causes: RPM limits, TPM limits, or insufficient credits
  • Rate limits reset on a rolling 60-second window, not at fixed times
  • Always implement exponential backoff retry logic in production code
  • Your usage tier determines limits and increases automatically with time and spending
  • Check platform.openai.com/settings/organization/limits for exact numbers, not guesses

---

*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*

Related help