Rate Limits
Rate Limits by Group
Section titled “Rate Limits by Group”| Group | RPM | TPM | RPD |
|---|---|---|---|
| default | 700 | 279K | 14K |
- RPM = Requests per minute
- TPM = Tokens per minute
- RPD = Requests per day
Handling 429 Responses
Section titled “Handling 429 Responses”When you hit a rate limit:
{ "error": { "message": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_exceeded" }}Do:
- Wait for the
X-RateLimit-Resettimestamp - Implement exponential backoff
- Queue requests client-side
Don’t:
- Retry immediately
- Open multiple connections to bypass
Backoff Strategy
Section titled “Backoff Strategy”import timeimport requests
def request_with_backoff(url, headers, max_retries=5): for attempt in range(max_retries): resp = requests.get(url, headers=headers) if resp.status_code != 429: return resp
reset = int(resp.headers.get("X-RateLimit-Reset", time.time() + 60)) wait = max(reset - time.time(), 1) print(f"Rate limited, waiting {wait:.0f}s (attempt {attempt + 1})") time.sleep(wait)
raise RuntimeError("Max retries exceeded")Increasing Limits
Section titled “Increasing Limits”If you need higher limits for production workloads, contact support with:
- Your expected RPM/TPM
- Your use case
- Your current token group