Rate Limiting
Understand rate limits, monitor your usage with response headers, and implement proper backoff strategies.
Rate Limit Tiers
Rate limits vary by plan and endpoint. Higher-tier plans get more generous limits and concurrent task allowances.
| Plan | createTask | getTaskResult | getBalance | Concurrent | Burst |
|---|---|---|---|---|---|
Free | 10 req/min | 30 req/min | 10 req/min | 5 | 15 |
Starter | 60 req/min | 120 req/min | 30 req/min | 25 | 100 |
Pro | 300 req/min | 600 req/min | 60 req/min | 100 | 500 |
Enterprise | Custom | Custom | Custom | Unlimited | Unlimited |
Response Headers
Every API response includes rate limit headers. Use these to monitor your usage and implement proactive throttling.
X-RateLimit-LimitMaximum number of requests allowed in the current window.
X-RateLimit-RemainingNumber of requests remaining in the current window.
X-RateLimit-ResetUnix timestamp (seconds) when the rate limit window resets.
Retry-AfterSeconds to wait before retrying (only present in 429 responses).
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1711612800
Retry-After: 30
{
"errorId": 98,
"errorCode": "ERROR_RATE_LIMITED",
"errorDescription": "Too many requests. Please retry after 30 seconds."
}Best Practices
Monitor headers proactively
Check X-RateLimit-Remaining before each request and slow down when running low.
Use webhooks instead of polling
Configure webhooks to receive results instead of polling getTaskResult repeatedly.
Batch requests when possible
Create multiple tasks in quick succession, then poll results in a single loop.
Cache balance checks
Do not call getBalance before every task. Cache the balance and refresh periodically.
Implement circuit breakers
After receiving a 429, stop all requests until the reset time instead of hammering the API.
Queue requests client-side
Use a client-side queue with rate-aware dispatching to stay within limits.
Exponential Backoff
When you receive a 429 response, use exponential backoff with jitter to retry gracefully. Here is a production-ready implementation.