Rate Limiting
API rate limits protect the platform and ensure fair usage.
Limits by Plan
| Plan | Requests/second | Burst |
|---|---|---|
| Free | 10 | 20 |
| Pro | 100 | 200 |
| Enterprise | Custom | Custom |
Rate Limit Headers
Every response includes rate limit information:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800
Handling Rate Limits
When rate limited, you'll receive a 429 response:
{
"error": {
"code": "rate_limited",
"message": "Too many requests",
"details": { "retry_after": 60 }
}
}
Retry Logic
async function sendWithRetry(fn, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (error.code === 'rate_limited') {
await sleep(error.retryAfter * 1000);
} else {
throw error;
}
}
}
}
Best Practices
- Use batch endpoints when possible
- Implement exponential backoff
- Monitor rate limit headers
- Contact support for limit increases