llm api_error ai_generated true

openai.RateLimitError: Rate limit reached for model

ID: llm/rate-limit-error

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

API rate limit hit. Too many requests per minute or tokens per minute exceeded.

generic

Workarounds

  1. 92% success Implement exponential backoff with jitter
    Use tenacity: @retry(wait=wait_exponential(min=1, max=60) + wait_random(0, 2))
  2. 85% success Batch requests and spread them over time
    Process queue with rate limiter: max N requests per minute
  3. 80% success Request rate limit increase from provider
    OpenAI: usage tier auto-upgrades with spend. Anthropic: request via console.

Dead Ends

Common approaches that don't work:

  1. Retry immediately in a tight loop 85% fail

    Immediate retries increase load and may get you temporarily banned. Use exponential backoff.

  2. Create multiple API keys to bypass rate limits 82% fail

    Rate limits are per-organization, not per-key. Multiple keys from same org share the same limit.