Sign in

Limits

How many tasks and requests an account may have at once, and the headers that report it.

Limits are set for each account. They keep one customer from using all of the capacity, and they protect your own spending.

The numbers below are the beta's starting values. They can change as Opsis measures its capacity, so read the headers and the errors rather than counting on a number.

Tasks

Limit
Beta value
What happens beyond it
Unfinished tasks
10 for each account
Create answers 429 concurrency_limit
Running tasks
2 for each account
The task waits as PENDING
Provider calls
2 for each account; counted when a provider-run task is started
The task waits as PENDING
Running tasks for one namespace
Optional, for each account
The task waits as PENDING

A provider-run task does not count toward the two running limits. An unfinished task is any task whose status is not final; it is counted when you create a task. A task over a running limit is not an error. It waits, and starts when a task of the account ends. Set namespace on a task to share the running limit fairly between your own users: a user can still queue several tasks.

Requests

Requests are counted for each account, not for each key, in two budgets:

Budget
Beta value
What it counts
Creation
10 requests in 10 seconds
POST /v1/tasks and POST /v1/uploads
Reads
100 requests in 10 seconds
Every other call made with a key, quotes included

A request over a budget answers 429 rate_limited with Retry-After. The budgets are held approximately, so they can loosen a little under load. The edge also limits each source address.

Headers

Every response to a request made with a key carries:

  • X-RateLimit-Limit: the budget of the window;
  • X-RateLimit-Remaining: what is left of it;
  • Retry-After: on a 429, the whole seconds until you may try again.

Other limits

  • A request body is 6 MB at most. A larger one is 413 payload_too_large.
  • idempotency keys are 128 characters at most; see Idempotency.
  • An upload is 10 MB at most, and an account holds 100 at a time; see Uploads.
  • A linked image is fetched at 10 MB at most and in 20 seconds.
  • An account has 50 active keys at most, and 16 registered webhook addresses.
  • Each model has its own limits for prompt length, number of images and sizes. They are in the model list.

Video

A video task counts toward limits of its own and toward none of the image limits above. A video that is over a limit is not an error. It waits as PENDING and starts when one of your videos ends.

Limit
Beta value
What happens beyond it
Running video tasks
2 for each account
The task waits as PENDING
Running video tasks for one namespace
Optional, for each account
The task waits as PENDING

A video is also one of the unfinished tasks above, so beyond that limit create answers 429 concurrency_limit. The lengths, sizes and first-frame limits of each video model are in the model list and in Video.