OpenAI API error 429 rate limit exceeded

You're calling the OpenAI API and getting a 429 error with "Rate limit reached" in the response. This happens when you've sent too many requests too quickly, and it blocks developers across all experience levels — from f

OpenAI API error 429 rate limit exceeded

You're calling the OpenAI API and getting a 429 error with "Rate limit reached" in the response. This happens when you've sent too many requests too quickly, and it blocks developers across all experience levels — from first-time experimenters to production apps.

What's actually happening

The 429 error means you've hit one of OpenAI's rate limits. These limits exist in three forms: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). When you exceed any of these thresholds, the API immediately rejects your request with a 429 status code and an error message like:

```

{

"error": {

"message": "Rate limit reached for gpt-4 in organization org-xxx on requests per min. Limit: 500 requests per minute.",

"type": "rate_limit_error",

"code": "rate_limit_exceeded"

}

}

```

Your rate limits depend on your usage tier. OpenAI assigns tiers automatically based on how much you've spent: Tier 1 starts at $5 total spend, Tier 2 at $50, and it scales up to Tier 5 at $1,000+. Each tier gets different limits for each model. A brand new account on the free tier might have 3 RPM for GPT-4, while Tier 3 gets 5,000 RPM for the same model.

The error also appears if you've exhausted your daily quota or if multiple API keys from the same organisation are collectively hitting the limit. The response headers include `x-ratelimit-remaining-requests` and `x-ratelimit-remaining-tokens` — check these to see exactly what you've got left.

How to fix it

1. Check your current limits

Go to platform.openai.com/settings/organization/limits. Log in, click your organisation name in the top-right, select "Settings", then "Limits". You'll see your tier and the exact RPM/TPM limits for every model you're using. If you're on Tier 1 with 500 RPM for GPT-3.5-turbo but calling it 600 times per minute, that's your problem.

2. Implement exponential backoff

Add retry logic to your code. When you get a 429, wait a few seconds and try again. Double the wait time with each retry. Most API libraries support this automatically:

```python

from openai import OpenAI

client = OpenAI(max_retries=3)

```

The response includes a `retry-after` header telling you how many seconds to wait. Respect that number.

3. Batch your requests

If you're processing 1,000 items by making 1,000 separate API calls in a loop, you'll slam into rate limits immediately. Instead, group items together in each request or use the Batch API at platform.openai.com/batches. The Batch API has separate, much higher limits and costs 50% less — it just processes asynchronously within 24 hours.

4. Upgrade your usage tier

Spend more to unlock higher limits. Add $50 to your account to reach Tier 2, or $100 to hit Tier 3. Go to platform.openai.com/settings/organization/billing, add a payment method, and purchase credits. Your tier updates within minutes of the payment clearing. Check how to contact OpenAI support if your tier doesn't update after 24 hours.

5. Request a limit increase

In platform.openai.com/settings/organization/limits, click "Request increase" next to any model. You'll fill out a form explaining your use case and what limits you need. OpenAI typically responds within 3-7 business days. They approve increases for legitimate production apps but rarely for testing or personal projects.

If that doesn't work

You might be hitting multiple limit types simultaneously — tokens and requests. Calculate your actual token usage with the formula: (prompt tokens + completion tokens) × requests per minute. A single request asking for 2,000-token responses at 10 RPM burns 20,000 TPM. If your TPM limit is 15,000, you're over even though you're under the RPM cap.

If you're getting 429 errors alongside other failures, check OpenAI API error 429 and other API errors for a broader troubleshooting path. Some developers see 429 mixed with 500 server errors during OpenAI outages — check status.openai.com to rule that out.

For billing-related 429 errors that mention insufficient quota, that's actually a different issue. You've run out of credits or hit your monthly spending cap. See unexpected OpenAI charge — refund guide for resolving payment problems.

Questions people actually ask

Q: Why am I getting 429 errors when I'm not making that many requests?

A: You're likely hitting the tokens-per-minute limit, not the requests limit. One request can consume thousands of tokens. Check the `x-ratelimit-remaining-tokens` header.

Q: How long does the rate limit block last?

A: It's not a block — it's a rolling window. If your limit is 500 requests per minute, you can send another request as soon as 60 seconds have passed since your 500th request. There's no penalty period.

Q: Can I buy my way to unlimited API access?

A: No. Even Tier 5 accounts have limits, though they're very high (10,000+ RPM for most models). OpenAI enforces limits to maintain service stability.

What to remember

  • Rate limits are per model, per organisation, per minute — not per API key
  • Check platform.openai.com/settings/organization/limits for your exact numbers
  • Implement exponential backoff in your code before you hit production
  • Tier upgrades happen automatically based on total spend, not monthly spend
  • The Batch API bypasses standard rate limits for asynchronous work

---

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

Related help