Prompt
AI API rate limits
Latest observation
Oct 8, 2026
OpenAI APIWeb search: off
AI API rate limits are the maximum number of requests or tokens you can use in a given time window. They help providers keep systems stable and fair for all users.
Common rate-limit types:
- Requests per minute/hour/day (RPM/RPH/RPD)
- Tokens per minute (TPM)
- Concurrent requests
- Credits or quota limits
How they’re usually enforced:
- You may get a 429 Too Many Requests error
- The response may include headers like:
Retry-AfterX-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
Best practices:
- Add exponential backoff with jitter
- Cache repeated results
- Batch requests where possible
- Limit concurrency
- Track token usage before sending requests
- Use streaming only when helpful, since it still counts toward limits
Example retry strategy:
- Send request
- If 429, wait a short random delay
- Retry with increasing delays
- Stop after a max retry count
If you want, I can also help with:
- rate-limit handling in Python/Node.js
- estimating token usage
- designing a throttling system for your app