Rate Limits
API rate limiting policies.
Limits by Plan
| Plan | Requests/min | Burst |
|---|---|---|
| Sandbox | 100 | 20 |
| Starter | 500 | 100 |
| Business | 2,000 | 500 |
| Enterprise | Custom | Custom |
Rate Limit Headers
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 450
X-RateLimit-Reset: 1707437460
Handling Rate Limits
async function withRateLimitRetry<T>(fn: () => Promise<T>): Promise<T> {
try {
return await fn();
} catch (error) {
if (error.type === 'rate_limit_error') {
const retryAfter = error.headers?.['retry-after'] || 60;
await new Promise(r => setTimeout(r, retryAfter * 1000));
return fn();
}
throw error;
}
}
Best Practices
- Implement backoff - Exponential backoff on 429
- Cache responses - Reduce redundant requests
- Batch operations - Use bulk endpoints
- Monitor usage - Track rate limit headers