Rate limits
Limits are per API key unless the table says otherwise. They protect the service for everyone; if your app needs more, ask us and we raise them for your account.
| What | Default per key | Header |
|---|---|---|
Creates (POST /v1/videos, /v1/images/*, /v1/batches) | 120 a minute, bursts up to 30 | X-RateLimit-Limit, X-RateLimit-Remaining |
| Reads (get, list, content, events) | 3000 a minute | โ |
POST /v1/quote | 300 a minute | X-RateLimit-Limit, X-RateLimit-Remaining |
| Polling one job | 1 a second, bursts up to 5 | โ |
| Unfinished jobs at once | 25 | too_many_jobs above it |
| Unfinished batch jobs per account | 5000 | โ |
| Open long-polls and event streams | 50 | too_many_streams above it |
| Request body | 1 MB (batches 8 MB, POST /v1/files 20 MB) | request_too_large above it |
GET /v1/account shows your own limits (requests_per_minute, max_in_flight_jobs, max_open_streams), which may be higher than the defaults.
When you hit one
The answer is 429 with Retry-After in seconds:
rate_limited: too many requests in a minute, or polling one job too fast.too_many_jobs: too many unfinished jobs at once.too_many_streams: too many open long-polls and event streams.queue_full: the model's queue is full for everyone right now. Nothing was queued.
Limits are token buckets: a burst is allowed, then requests are let through at the steady rate. X-RateLimit-Remaining on a create tells you how many you have left in the burst.
Staying inside them
- Wait
poll_after_msbetween polls, or use?wait=25or the/eventsstream instead of polling. - Send many jobs as one batch: one request, up to 1000 jobs, at a lower price.
- Retry with backoff, and honour
Retry-After. - Too many failed key attempts from one address are also slowed down with
429: check your key if you see this on every call.