Tài liệu
Giới hạn tốc độ
Các hướng dẫn chi tiết và tài liệu tham chiếu API chỉ có bằng tiếng Anh.
What is limited
| Limit | Value | When exceeded |
|---|---|---|
| Requests per API key | 300 per minute, all endpoints together | 429, details.scope = "key" |
Job creation (POST /v1/generations, POST /v1/images/generations) | per tier of your plan, see below | 429, details.scope = "plan", with credits in plan |
| Failed authentication from one IP address | 60 per minute | 429, details.scope = "auth" |
| Long polling requests per key | 20 at the same time | the request returns at once with the current state |
| Jobs waiting in the queue | 20 per account | 429 queue_full |
| Jobs running at the same time | per tier | extra jobs wait in the queue (pending), they are not rejected |
Job creation per minute
The limit follows the tier of your Credits plan. Without a Credits plan the free level applies.
| Tier | Creations per minute | Jobs running at once |
|---|---|---|
| starter | 30 | 2 |
| pro | 60 | 4 |
| business | 120 | 8 |
| no plan (free) | 10 | 1 |
GET /v1/account shows the values that apply to your account (create_rpm and concurrency of your Credits plan).
Response headers
Every response has:
X-RateLimit-Limit: the limit that applies to the request,X-RateLimit-Remaining: requests left in the current minute,X-RateLimit-Reset: the Unix time when the minute ends.
On job creation these describe the limit of your plan tier; on other endpoints, the per key limit. A 429 always carries Retry-After, the seconds to wait.
Handling 429
- Read
Retry-Afterand wait that long. - Retry with the same
Idempotency-Key, so a request that was in fact accepted is not charged twice. - Spread bursts: a worker pool of a few parallel requests is better than hundreds at once.
Windows are fixed minutes (they reset at the start of each minute), so Retry-After is the time left in the current minute.

