Rate Limits
Provider account or channel policy can trigger HTTP 429. The dashboard key API does not expose per-key RPM, TPM, concurrency, or budget settings. This page describes that boundary and client handling of 429.
Per-key quota settings
The key API publishes no numeric defaults for these quotas and does not expose these settings:
| Metric | Key API support |
|---|---|
| Requests per minute | Not exposed by the key API |
| Tokens per minute | Not exposed by the key API |
| Concurrent requests | Not exposed by the key API |
Per-key configuration
A key supports name, Premium or Cheap channel, optional Premium fallback for Cheap, expiry, and usage statistics. The dashboard key API does not expose per-key RPM/TPM, concurrency, budgets, model allowlists, IP filters, or IDE restrictions.
Supported settings:
- Name and Premium or Cheap channel
- Optional Premium fallback for a Cheap key
- Optional future expiry
Rate limit headers
If the provider returns these headers, use them to plan retries. Their presence is not guaranteed by the key API:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Time when the rate limit window resets (Unix timestamp) |
Handling 429 errors
When you hit a rate limit, the API returns HTTP 429. Use exponential backoff to retry:
import time
import requests
def request_with_backoff(url, headers, data, max_retries=5):
for attempt in range(max_retries):
response = requests.post(url, headers=headers, json=data)
if response.status_code == 429:
wait = 2 ** attempt # 1, 2, 4, 8, 16 seconds
print(f"Rate limited. Retrying in {wait}s...")
time.sleep(wait)
continue
return response
raise Exception("Max retries exceeded")async function requestWithBackoff(
url: string, options: RequestInit, maxRetries = 5
) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
const res = await fetch(url, options);
if (res.status === 429) {
const wait = 2 ** attempt * 1000;
console.log(`Rate limited. Retrying in ${wait}ms...`);
await new Promise(r => setTimeout(r, wait));
continue;
}
return res;
}
throw new Error("Max retries exceeded");
}Best practices
- If present, check X-RateLimit-Remaining and respect Retry-After before retrying.
- Use named keys to track workloads separately; this does not establish separate quotas.
- Implement exponential backoff with jitter for retries.
- Cap automated workloads in your client and monitor customer usage cost. Per-key budgets are not configurable through this key API.