Rate Limits
Rate limits protect the API and ensure fair usage across all users.
Handling Rate Limits
When you exceed the rate limit, the API returns a 429 status code with a rate_limit_error:
{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}
Recommended Retry Strategy
Implement exponential backoff when you receive a 429 response:
import time
import requests
def make_request_with_retry(url, headers, payload, max_retries=3):
for attempt in range(max_retries):
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 429:
wait_time = 2 ** attempt * 30 # 30s, 60s, 120s
print(f"Rate limited. Retrying in {wait_time}s...")
time.sleep(wait_time)
continue
return response
raise Exception("Max retries exceeded")
Best Practices
- Implement exponential backoff for
429responses - Use
callback_url(webhooks) instead of frequent polling to reduce request volume - Space out generation requests rather than sending bursts
- Monitor your credit usage via the EvoLink dashboard
Need Higher Limits?
Contact our sales team for custom rate limits and dedicated infrastructure.
Related
- Error Codes — Handle all error types
- Webhooks — Reduce polling with
callback_url