Skip to Content

Limits

Sizes, lengths, steps and how runs wait for a GPU.

LimitValue
PromptUp to 2,000 characters. The model reads the first 512 tokens.
Steps1 to 50. Leave it out and the mode decides: 4 steps (fast) for a plain prompt, for text to image and edits. Camera angle and inpaint always run 8 and take no steps.
Seed0 to 2147483647.
Output sizesSee Sizes below.
ImagesUp to 7 MiB per edit, all images together, as a link, data URL or upload. JPEG, PNG or WebP. 64 to 8192 pixels a side, at most 16.7 megapixels, at most 8:1.
InpaintThe image at most 8192 pixels a side and 16.7 megapixels. A mask the same size as the image. outpaint at most doubles each side, and the result is at most 8192 pixels a side and 16.7 megapixels. See Inpaint and outpaint.
Request bodyUp to 10 MiB of JSON for POST /v1/generations, so an edit can carry its images as data URLs. 64 KiB for other calls.
Idempotency-KeyUp to 200 characters.
wait0 to 10 seconds.
List page1 to 100 items, default 20.
LinksA signed upload_url expires after 900 seconds (15 minutes). An image_url works until its image is deleted.
Stored filesTensorFactory keeps each run's settings, not its prompt or images (a prompt goes when the run ends). A finished image is deleted after its first download, or 10 minutes after the run if nobody downloads it. An upload is deleted when the run that uses it ends, or 30 minutes after it is made if no run uses it.
CORSNone: call the API from your server.
Rate limitsImages a minute, runs at once and monthly spend, set by your tier. See Rate limits and tiers below.
Wrong keys20 failed sign-ins or wrong API keys a minute from one address. Past that, 429 rate_limited.

Rate limits and tiers

Every account has a tier. Your tier sets three limits: new images in any 60 seconds, counted exactly, runs at once (queued or running), and how much you can spend in a calendar month (UTC).

TierImages a minuteRuns at onceMonthly spend capHow you reach it
Starter102$25When you sign up.
Tier I608$500$10 of credit paid.
Tier II15020$2,500$100 of credit paid and an account at least 7 days old.
Tier III30040$10,000$500 of credit paid and an account at least 14 days old.
CustomSet for youSet for youSet for youOn approval of an increase request.

Tiers rise on their own as you pay for credit and your account ages, and they never fall. Credit given to you, not paid, doesn't count.

You can set a lower monthly cap yourself on the console's Limits page, so a bug or a busy month never spends more than you plan. Clear it to go back to your tier's cap.

Need more? Request an increase on the Limits page: the numbers you need and why. It is approved at once when your use and payments support it. Otherwise our team reviews it and the page shows the answer.

When you go over a limit:

  • 429 rate_limited: too many runs at once (retry_after_s is 5: wait for one to finish) or too many new images in the last 60 seconds (retry_after_s is the seconds until the oldest of them leaves that minute, when one more is allowed). Retry after retry_after_s with the same Idempotency-Key. Nothing is charged.
  • 402 spend_limit_reached: this month's spend reached your monthly spend limit, your tier's cap or the lower one you set. Raise your own cap or request an increase, then retry.

POST /v1/generations sends these headers when it accepts a run (202) and when it refuses one with 429 or 402 spend_limit_reached, and GET /v1/limits sends them too:

HeaderValue
x-ratelimit-limit-requestsNew images you may start in any 60 seconds.
x-ratelimit-remaining-requestsNew images you can still start in the last 60 seconds.
x-ratelimit-reset-requestsSeconds until one more new image is allowed, 0 while some remain.
x-ratelimit-limit-inflightRuns you may have at once.
x-ratelimit-remaining-inflightRuns you can still start before reaching that limit.

GET /v1/limits returns your tier, its limits, your use of them (runs now, images in the last minute, this month's spend, peaks over the last 7 days) and what the next tier needs. The console's Usage page charts your use against each limit.

GPU workers

Runs share a pool of GPU workers that scale to zero when idle. After a quiet spell, POST /v1/generations still answers 202: the run waits queued for a few minutes while a worker starts, then runs. Each worker holds a short line of runs. When every running worker's line is full, a new run also waits queued, oldest first, for the first worker with room, and more workers start. A run that gets no worker within 20 minutes ends failed with timed_out, and nothing is charged. The line has no length limit.

Time in a running worker's line shows as usage.queue_s. Neither it nor the wait for a worker to start is priced.

Sizes

resolution sets the size the model draws at, and aspect_ratio sets the shape. Larger images cost more, every shape of a size the same (price_table_usd in GET /v1/models, which also lists these sizes as sizes_by_resolution).

Text to image1:116:99:164:33:44:5
1K (default)1024x10241280x720720x12801152x864864x1152896x1120
1.3K1328x13281664x928928x16641472x11041104x14721184x1472
2K2048x20482048x11521152x20482048x15361536x20481632x2048
Editauto (default)1:116:99:16
1K (default)the photo's shape, about 1 megapixel1024x10241280x720720x1280
2Kthe photo's shape, long side 20482048x20482048x11521152x2048

With auto, shapes between 1:2 and 2:1 are kept. Wider or taller photos come back at 2:1 or 1:2.

Camera angle takes the edit's shapes at 1K only. Inpaint has no shape or resolution of its own: the result is your image's size, plus any outpaint margins.

On this page