OpenAI API error 429 rate limit exceeded

You're calling the OpenAI API and getting slammed with error 429: "Rate limit exceeded". Your requests are being rejected, your app's stuck, and you're wondering why OpenAI suddenly decided you've made too many requests.

OpenAI API error 429 rate limit exceeded

You're calling the OpenAI API and getting slammed with error 429: "Rate limit exceeded". Your requests are being rejected, your app's stuck, and you're wondering why OpenAI suddenly decided you've made too many requests.

What's actually happening

Error 429 means you've hit one of OpenAI's API rate limits. OpenAI tracks three separate limits on your account: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). When you exceed any of these, the API returns a 429 error with a message like "Rate limit reached for gpt-4 in organization org-xxxxx on requests per min."

Your rate limits depend on your usage tier. If you're on the free tier (Tier 1), you get just 3 RPM and 200,000 TPM for GPT-4. Paid accounts start at Tier 2 with higher limits, and your tier automatically increases as you spend more. A brand new account with $5 in credits gets 500 RPM for GPT-3.5-Turbo but only 10,000 RPM for GPT-4o — different models have different caps.

The tricky part: OpenAI counts tokens in both your prompt and the completion. A 1,000-token prompt with a 500-token response burns 1,500 tokens against your TPM limit. Make ten of those calls in a minute and you've hit 15,000 tokens. If your limit is 10,000 TPM, half your requests fail.

How to fix it

1. Check your actual limits

Log into platform.openai.com and go to Settings → Limits. You'll see your current tier and exact RPM/TPM/RPD limits for each model. If you're on Tier 1 with microscopic limits, that's your immediate problem.

2. Add more credits to upgrade your tier

Navigate to Settings → Billing → Add payment details. Add at least $50 in credits. Within minutes, you should jump to Tier 2 (50 RPM, 2M TPM for GPT-4). Higher spend unlocks higher tiers — Tier 4 requires $1,000 total spend but gives you 10,000 RPM. More details on rate limit tiers at platform.openai.com/docs/guides/rate-limits.

3. Implement exponential backoff

In your code, catch 429 errors and retry with increasing delays. Wait 1 second, then 2, then 4, then 8. Most API libraries have built-in retry logic. For Python's `openai` library, wrap calls in a try-except block:

```python

import time

for attempt in range(5):

try:

response = client.chat.completions.create(...)

break

except openai.RateLimitError:

time.sleep(2 ** attempt)

```

4. Batch requests and reduce frequency

If you're making 100 requests in 10 seconds, spread them over a minute. Queue requests and release them at a controlled rate. For bulk tasks, use the Batch API at platform.openai.com/batches — it's 50% cheaper and ignores rate limits entirely, though results take up to 24 hours.

5. Use the Batch API for non-urgent workloads

If you're processing thousands of prompts overnight or analysing large datasets, switch to batches. Upload a .jsonl file, submit the batch, and retrieve results when complete. You'll avoid 429 errors completely and cut your costs in half.

If that doesn't work

You've hit a model-specific or organisation-wide limit that won't budge without OpenAI intervention. Check if you're on a special enterprise plan with custom caps. For ongoing 429s despite high spend, you'll need to contact OpenAI support through the Help button on platform.openai.com. Include your organisation ID (find it under Settings → General), the exact error message, your current tier, and your use case.

Response time varies — typically 24-48 hours for billing issues. OpenAI can manually increase limits for justified business needs, but "I need more because I'm testing" rarely works. Show that you're a paying customer with predictable demand. If you've recently been charged and suspect an error, review our guide on unexpected OpenAI charges.

Questions people actually ask

Q: Why do I get 429 even though I just started using the API today?

A: New free-tier accounts have extremely low limits — 3 RPM for GPT-4 means just three requests per minute. Add payment details to escape Tier 1.

Q: Can I pay to remove rate limits completely?

A: No. Even Tier 5 accounts (requiring $100k spend) have limits. You can request custom enterprise limits, but you'll need a contract and serious usage history.

Q: Do failed 429 requests count against my token usage?

A: No. If OpenAI rejects your request with 429, you're not charged. Only successful completions count.

Q: How do I see my current rate limit usage in real-time?

A: Check the `x-ratelimit-remaining-requests` and `x-ratelimit-remaining-tokens` headers in API responses. They show how much headroom you have left in the current minute.

What to remember

  • Rate limits are per-model, per-organisation, and reset every minute
  • Higher usage tier = higher limits — add credits to upgrade automatically
  • Implement exponential backoff in all production code
  • Use the Batch API for anything that can wait hours instead of seconds
  • Check platform.openai.com/docs/guides/rate-limits for current tier requirements

---

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

Related help