Limits
Sizes, lengths, steps and how runs wait for a GPU.
| Limit | Value |
|---|---|
| Prompt | Up to 2,000 characters. The model reads the first 512 tokens. |
| Steps | 1 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. |
| Seed | 0 to 2147483647. |
| Output sizes | See Sizes below. |
| Images | Up 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. |
| Inpaint | The 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 body | Up 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-Key | Up to 200 characters. |
wait | 0 to 10 seconds. |
| List page | 1 to 100 items, default 20. |
| Links | A signed upload_url expires after 900 seconds (15 minutes). An image_url works until its image is deleted. |
| Stored files | TensorFactory 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. |
| CORS | None: call the API from your server. |
| Rate limits | Images a minute, runs at once and monthly spend, set by your tier. See Rate limits and tiers below. |
| Wrong keys | 20 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).
| Tier | Images a minute | Runs at once | Monthly spend cap | How you reach it |
|---|---|---|---|---|
| Starter | 10 | 2 | $25 | When you sign up. |
| Tier I | 60 | 8 | $500 | $10 of credit paid. |
| Tier II | 150 | 20 | $2,500 | $100 of credit paid and an account at least 7 days old. |
| Tier III | 300 | 40 | $10,000 | $500 of credit paid and an account at least 14 days old. |
| Custom | Set for you | Set for you | Set for you | On 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_sis 5: wait for one to finish) or too many new images in the last 60 seconds (retry_after_sis the seconds until the oldest of them leaves that minute, when one more is allowed). Retry afterretry_after_swith the sameIdempotency-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:
| Header | Value |
|---|---|
x-ratelimit-limit-requests | New images you may start in any 60 seconds. |
x-ratelimit-remaining-requests | New images you can still start in the last 60 seconds. |
x-ratelimit-reset-requests | Seconds until one more new image is allowed, 0 while some remain. |
x-ratelimit-limit-inflight | Runs you may have at once. |
x-ratelimit-remaining-inflight | Runs 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 image | 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 4:5 |
|---|---|---|---|---|---|---|
1K (default) | 1024x1024 | 1280x720 | 720x1280 | 1152x864 | 864x1152 | 896x1120 |
1.3K | 1328x1328 | 1664x928 | 928x1664 | 1472x1104 | 1104x1472 | 1184x1472 |
2K | 2048x2048 | 2048x1152 | 1152x2048 | 2048x1536 | 1536x2048 | 1632x2048 |
| Edit | auto (default) | 1:1 | 16:9 | 9:16 |
|---|---|---|---|---|
1K (default) | the photo's shape, about 1 megapixel | 1024x1024 | 1280x720 | 720x1280 |
2K | the photo's shape, long side 2048 | 2048x2048 | 2048x1152 | 1152x2048 |
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.