OpenAI API error 429 rate limit exceeded

You're building with the OpenAI API and suddenly every request returns error 429. Your app stops working, users are complaining, and the error message says you've exceeded your rate limit. This hits developers hardest du

OpenAI API error 429 rate limit exceeded

You're building with the OpenAI API and suddenly every request returns error 429. Your app stops working, users are complaining, and the error message says you've exceeded your rate limit. This hits developers hardest during peak usage or when testing new features.

What's actually happening

Error 429 means you're sending too many requests to OpenAI's servers in too short a time. The API enforces three types of limits: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). When you cross any of these thresholds, OpenAI's servers reject your requests until the limit resets.

The actual error looks like this: `{"error": {"message": "Rate limit reached for requests", "type": "requests", "param": null, "code": "rate_limit_exceeded"}}`. You might also see it specify tokens instead of requests.

Your rate limits depend on your usage tier. New accounts on the free tier get extremely low limits — often just 3 RPM and 40,000 TPM for GPT-4. Paid accounts progress through tiers automatically based on spending history. A Tier 1 account ($5+ spent) gets 500 RPM and 30,000 TPM for GPT-4o, while Tier 5 ($1,000+ spent over time) jumps to 10,000 RPM and 30,000,000 TPM.

How to fix it

1. Check your current limits

Go to platform.openai.com/settings/organization/limits. You'll see exactly which limits you're hitting — RPM, TPM, or RPD. Note your current tier and the specific numbers.

2. Implement exponential backoff

Add retry logic to your code. When you get a 429 error, wait 1 second, then try again. If it fails again, wait 2 seconds, then 4, then 8. Most API libraries support this automatically. In Python with the official OpenAI library, catch the `RateLimitError` exception and sleep before retrying.

3. Batch your requests

If you're making rapid-fire API calls, group them together. Instead of sending 100 separate requests in 10 seconds, spread them over a minute. Add a small delay (like 200ms) between requests. This alone can prevent most 429 errors.

4. Monitor your token usage

Large context windows eat through TPM limits fast. If you're sending 10,000 tokens per request at 500 TPM, you can only make 3 requests per minute. Check the `usage` field in API responses to see exactly how many tokens each call consumes. Consider shortening your prompts or splitting large tasks into smaller chunks.

5. Upgrade your tier

If you legitimately need higher limits, spend more on the API. Your tier increases automatically based on cumulative spending and payment history. You can't pay to jump tiers instantly — OpenAI raises limits as you prove consistent usage. Check your tier at platform.openai.com/settings/organization/limits and see what you need to reach the next level.

If step 3 doesn't reduce errors, you're hitting a hard architectural limit. You'll need to either add delays or contact OpenAI about enterprise-level rate limits.

If that doesn't work

When you've implemented backoff and batching but still hit 429 errors constantly, you need custom limits. Go to platform.openai.com and click Help in the bottom right corner. Describe your use case specifically: "I need higher TPM limits for GPT-4o. Current usage is X requests/day averaging Y tokens each. Business case: [explain]."

Include your current tier, the specific model you're using, and what limits you need. Generic requests like "please increase my limits" get rejected. OpenAI typically responds within 24-48 hours for limit increase requests, though they may decline if you haven't spent enough to justify higher tiers.

For critical production issues where you can't wait, check how to contact OpenAI support for escalation paths, though there's no guarantee of faster service.

Questions people actually ask

Q: Does retrying immediately make it worse?

A: Yes. Hammering the API with instant retries can get you temporarily blocked entirely. Always wait at least 1 second between retry attempts.

Q: Are rate limits per API key or per account?

A: Per organization account, not per API key. Creating multiple keys under the same organization doesn't give you more requests.

Q: Do rate limits reset exactly at the minute mark?

A: No. They use a sliding window. If you use 500 requests at 2:00:30 PM, you can't send 500 more until 2:01:30 PM, not at 2:01:00 PM.

Q: Why do I get 429 errors even on a paid account?

A: Paid accounts still have limits — they're just higher. Check your tier and current usage. You might be underestimating token consumption or hitting unexpected traffic spikes.

What to remember

  • Error 429 means you've exceeded RPM, TPM, or RPD limits — check platform.openai.com/settings/organization/limits for exact numbers
  • Add exponential backoff to your code — wait 1, 2, 4, 8 seconds between retries
  • Large prompts consume TPM limits faster than you think — monitor the `usage` field in responses
  • Usage tiers increase automatically with spending history — you can't pay to skip ahead
  • If you need custom limits, contact OpenAI with specific usage numbers and business justification

---

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

Related help