APITroubleshooting
429 error: rate limit or concurrency exceeded
Why AICredits returns 429 rate_limit_error and how to handle it with exponential backoff, per-key limits and lower concurrency.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
A 429 response with type: rate_limit_error means a requests-per-minute limit or a concurrency limit was exceeded. It is safe to retry.
What to do
- Back off and retry. Wait with exponential backoff and jitter, for example 1 s, 2 s, 4 s plus a random part, and stop after a few attempts. See the example in error handling.
- Lower concurrency. Limit the number of requests in flight from your application.
- Check the key limit. Each key can have its own requests-per-minute limit, set in the dashboard. Raise it if it is lower than your workload needs.
- Spread load. Use separate keys for separate services so one busy job does not use the whole limit.
Concurrency limits depend on your plan. See rate limits for current values.