Skip to main content
Watch: I Built an AI App Without Leaving Databricks

OpenAI API error

OpenAI API 429 Rate limit reached for requests: what it means and how to fix it

Error message
429 Rate limit reached for requests

Retry? YesLast verified 5 documented fixes3 sources

What it means

You have hit your assigned rate limit: too many tokens or requests were submitted in a short period. Limits are measured in RPM, RPD, TPM, TPD, IPM and apply at organization and project level, not per user. The Python library raises RateLimitError.

Causes

  • A loop or script that makes frequent or concurrent requests
  • Sharing your API key with other users or applications
  • Using a free plan that has a low rate limit
  • Reaching the defined limit on your project

How to fix it

  1. Fix 1.

    Pace your requests and avoid unnecessary or redundant calls.

  2. Fix 2.

    If a Retry-After header is present, wait at least that long before retrying; if missing, use exponential backoff with jitter and limit the number of retries. Official SDKs automatically retry eligible 429 responses.

  3. Fix 3.

    Set max_tokens as close to your expected response size as possible, since the rate limit counts the maximum of max_tokens and the estimated request tokens.

  4. Fix 4.

    Use the Batch API for work that does not need immediate responses, upgrade usage tier, or ask your organization owner to raise project rate limits.

  5. Fix 5.

    Configure SDK retries (default is 2).

    Snippet
    client = OpenAI(
        # default is 2
        max_retries=0,
    )

More OpenAI API errors

All 23 OpenAI API errors

HTTP 429 at other providers

Compare 429 across providers

FAQ

What does the OpenAI API error "429 Rate limit reached for requests" mean?

You have hit your assigned rate limit: too many tokens or requests were submitted in a short period. Limits are measured in RPM, RPD, TPM, TPD, IPM and apply at organization and project level, not per user. The Python library raises RateLimitError.

How do I fix OpenAI API "429 Rate limit reached for requests"?

There are 5 documented fixes. Start with the first: Pace your requests and avoid unnecessary or redundant calls.

Should I retry OpenAI API "429 Rate limit reached for requests"?

Yes. The official docs treat this error as retryable.

Which other AI APIs return HTTP 429?

Per their official error docs: Amazon Bedrock (429 ThrottlingException; 429 ModelNotReadyException), Anthropic API (429 rate_limit_error; 429 rate_limit_error (enforced_spend_limit_reached)), Azure OpenAI (429 Too Many Requests (Rate limit is exceeded); 429 Too Many Requests (System is experiencing high demand); 429 Too Many Requests (temporary rate limit adjustment); 429 Too Many Requests (token budget exceeded by request parameters)), Cohere API (429 Too Many Requests), DeepSeek API (429 - Rate Limit Reached), Gemini API (429 rate_limit_exceeded; 429 quota_exceeded; 429 too_many_requests; 429 RESOURCE_EXHAUSTED), Groq API (429 Too Many Requests), Mistral API (429 Too many requests), OpenRouter (429 rate_limit_exceeded), Vertex AI (429 RESOURCE_EXHAUSTED; 429 Resource exhausted, please try again later; 429 Too many requests. Exceeded the Provisioned Throughput), xAI API (429 Too Many Requests).

Sources

Last verified against 3 sources: OpenAI API's official docs and official SDK repositories.

Newsletter

Know when the APIs change

One email per week. New model releases, API changes, what broke, and how developers are working around it.