Rate Limits
Rate Limits
Rate limits are applied per API key and vary by plan. All responses include rate limit headers.
Rate Limit Headers
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute |
X-RateLimit-Remaining | Remaining requests this minute |
X-RateLimit-Reset | Unix timestamp when limit resets |
X-RateLimit-Tokens-Limit | Daily token limit |
X-RateLimit-Tokens-Remaining | Remaining tokens today |
X-Request-Id | Unique request ID for support |
Best Practices
- Implement exponential backoff: When rate limited, wait and retry with increasing delays.
- Cache responses: Reduce redundant API calls by caching.
- Use streaming: For long responses, streaming can improve perceived performance.
- Monitor your usage: Use the
/usage/dashboardendpoint to track consumption. - Set up alerts: Configure webhook alerts for quota thresholds.
Exponential Backoff Example
Code Examples
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1698765432
Retry-After: 30 (only when rate limited)