Rate limit tiers
Generation keys are also protected against excessive concurrent requests. A concurrency rejection uses the same
429 rate_limit_exceeded response and is safe to retry after an active request completes.
Rate limit headers
Every API response includes rate limit headers:Rate limit exceeded
When the rate limit is exceeded, the API returns:429
Best practices
- Implement exponential backoff for retries
- Respect the
x-ratelimit-resetheader - Use the
idempotency-keyheader for non-streaming requests to avoid double charges - Use test keys (
af_test_) during development
