Ir para o conteúdo principal

Documentação

Limites de taxa

Os guias detalhados e a referência da API estão disponíveis apenas em inglês.

What is limited

LimitValueWhen exceeded
Requests per API key300 per minute, all endpoints together429, details.scope = "key"
Job creation (POST /v1/generations, POST /v1/images/generations)per tier of your plan, see below429, details.scope = "plan", with credits in plan
Failed authentication from one IP address60 per minute429, details.scope = "auth"
Long polling requests per key20 at the same timethe request returns at once with the current state
Jobs waiting in the queue20 per account429 queue_full
Jobs running at the same timeper tierextra 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.

TierCreations per minuteJobs running at once
starter302
pro604
business1208
no plan (free)101

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

  1. Read Retry-After and wait that long.
  2. Retry with the same Idempotency-Key, so a request that was in fact accepted is not charged twice.
  3. 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.