Skip to content
ACS Infra

Limits

The API and the App limit what one request, one API key, and one User can do. Each table gives the limit, its number, and what the API or the App answers past it. An error with a code is the error object, as The error object shows.

Tokens

LimitNumberPast the limit
Monthly allowance of a User5,000,000 tokens each UTC month, by default. An admin can set another for one User.429 budget_exceeded. Near the end, POST /v1/completions first lowers max_tokens to what fits.
Generated tokens of one request32,000 in all: the number of prompts × n × max_tokens400, param max_tokens
max_tokens of a request without stream15,600. A request without max_tokens gets 15,600 at most.400 deadline_infeasible
Prompt and generated tokens of one requestThe model's max_model_len: 131,072 for llama-8b and llama-405b, 8,192 for trinity-truebase400 context_length_exceeded

Your monthly allowance is spent first, then your Budget. Budgets and Holds says how a request holds and spends tokens, and when the API lowers max_tokens.

The other caps of one Completion, such as logprobs and the size of a capture, are in Size caps. GET /v1/models lists them for each model in limits (Models).

Traffic

LimitNumberPast the limit
Requests that start work, for each API key600 a minute: POST /v1/completions, POST /v1/completion-jobs, POST /v1/harvest, and Branches429 rate_limited, with Retry-After in seconds
Other requests to /v1, for each API key600 a minute429 rate_limited, with Retry-After in seconds
Completions that run at once, for each API key16A Completion waits in the key's line.
Completions that wait in the line, for each API key64429 queue_full, with Retry-After: 5
Requests in flight to one model, from all keys and the App100503 with Retry-After: 5 for POST /v1/completions. A Job, a Run, and a Branch wait for a place.
Playground Runs, Completions, Jobs, and Branches that you start in the App600 a minute for each UserThe App says when to try again.
Requests to /v1 with a missing, wrong, or revoked API key, from one address60 a minute429 rate_limited, with Retry-After in seconds

Each rate limit is a bucket. A full bucket takes a burst of 600 requests, then refills one request every 0.1 seconds. Each API key has its own buckets, and the App's limit is apart from them. The message of a 429 names the limit and says how many seconds to wait.

The line counts only POST /v1/completions. A Completion takes its place when it starts and keeps it until it ends, also a stream. A waiting Completion holds no tokens and runs in the order it came. It leaves the line when you close the connection. Jobs, harvests, and Loom Nodes run in the background and take no place.

The openai SDK sends a request that got 429 rate_limited again by itself. Retries in the openai SDK says how.

API keys

LimitNumberPast the limit
API keys of one User10. A paused key counts, and a revoked key does not.409 when you make a key. At the limit, the App turns off New key and shows You have 10 API keys, the most that a User may have. Delete one to make another.

Jobs

LimitNumberPast the limit
Requests in one Job1A body is one request of POST /v1/completions.
Jobs queued or running with one API key8429 job_capacity, with x-should-retry: false
Jobs queued or running of one User32429 job_capacity, with x-should-retry: false
Jobs queued or running of all Users128429 job_capacity, with x-should-retry: false
Ended Jobs of one User whose results the API keeps100429 job_capacity, with x-should-retry: false
Ended Jobs of all Users whose results the API keeps1,000429 job_capacity, with x-should-retry: false
Jobs that run at once4, for all UsersA Job waits queued.

A Job past a cap is not created, and the message names the cap. A cap of Jobs queued or running frees a place when a Job ends. A cap of kept results frees one when the result of a Job expires, 24 hours after the Job ended (Kept data).

Harvests

LimitNumberPast the limit
Prompts in one harvest1 to 4,096, each of 1 or more characters400, param prompts
Tokens of one harvest's prompts, counted as characters / 42,000,000400, param prompts
Tokens of one prompt in the filesThe model's max_model_len - 1: 8,191 on each served modelThe harvest keeps the first 8,191 tokens of the prompt.
Layers in a list in layers1 to 256, each a Layer of the model400, param layers
Prompts in one shard file (shard_size)1 to 4,096, and 32 when you leave it out400, param shard_size
batch_size1 to 64, or null400, param batch_size
Directions in project_onto1 to 64, each of the model's capabilities.hidden_size400, param project_onto
Harvests that one API key starts in a UTC month200. An admin can set another number for your keys.429 harvest_quota_exceeded, with x-should-retry: false
Harvests on llama-8b pending or running of one User3429 harvest_concurrency_exceeded, with Retry-After: 30
Harvests on llama-405b or trinity-truebase pending or running of one User1429 harvest_concurrency_exceeded, with Retry-After: 30
Harvests on llama-405b or trinity-truebase pending or running of all Users2429 harvest_capacity_exceeded, with Retry-After: 30
Reads of a harvest that wait (wait) at once4 for each API key, and 8 in allThe API answers at once with 200, X-Acs-Longpoll: declined, and Retry-After: 3.

A harvest past a cap is not created, and the message names the cap. A cap of harvests pending or running frees a place when one of them ends. The count of the month leaves out a harvest whose GPU run never started, such as one that you canceled while it was pending. It starts again on the first day of each UTC month.

Without layers, a harvest reads the quartiles of the model's Layers: capabilities.n_layers / 4, / 2, and × 3 / 4. That is Layers 8, 16, and 24 on llama-8b. The cap of 2,000,000 counts characters only. The tokens that a harvest holds are counted another way, as Holds of background work says. Harvest Activations shows each refusal.

Looms

LimitNumberPast the limit
Child Nodes of one Branch1 to 8 (n)400, param n
Tokens of one Node1,000 (max_tokens)400, param max_tokens
Nodes of one Loom2,000409 for a Branch, a split, or a sibling. 400 for an imported file.
Looms in the list100: the pinned ones first, then the others by their last changeAn older Loom stays, and a read of its id finds it.
Nodes that run at once8, for all UsersA Node waits queued.
Characters of a Loom's title120The API keeps the first 120 characters.
Characters of a title from the root40, from the root's first lineThe API keeps the first 40 characters.

The 409 for a full Loom says how many more Nodes fit. A Loom's Nodes include each Node that you have not deleted, at any depth.

Spend limit

The API pauses new GPU work when the GPUs cost $3,000 in 24 hours, and an admin can pause it too. Only an admin lifts the pause.

While the pause is onWhat happens
POST /v1/completions, POST /v1/completion-jobs, POST /v1/harvest, a Branch, and the App's Runs429 spend_cap, with Retry-After: 3600 and x-should-retry: false
A Completion, a Job, a harvest, or a Node that already runsIt finishes.
A Job or a Node that is queued, or a harvest that is pendingIt waits, and runs when the pause ends.
A Job, a harvest, or a Node that the API puts back in the queue during the pause, as at a restartIt waits too (When the API restarts).

Request size

LimitNumberPast the limit
Body of one request, on every route but POST /v1/harvest8 MiB (8,388,608 bytes)413. A body sent in chunks, without Content-Length, gets 413 when it passes the cap. The API checks the key first.
Body of POST /v1/harvest50 MiB (52,428,800 bytes)413. A body sent in chunks, without Content-Length, gets 413 when it passes the cap. The API checks the key first.
Idempotency-Key1 to 255 characters400
Fields of one CompletionThe caps in Size caps400, param names the field

Time limits

LimitNumberPast the limit
Wait for Inference14 minutes for an answer, and 14 minutes between two chunks of a streamThe error object of 504 upstream_deadline, Could not reach Inference: Request timed out., with retryable: false. The API has sent status 200 by then. A request without a stream gets the error object as its body. A stream gets it as its last event (The 14-minute wait).
Wait for Inference's answer to start, for a Job or the App's Runs and Branches45 minutes, through a start of a cold modelThe request fails with Could not reach Inference: Request timed out.
Wait for the answer of a Completion without a stream150 secondsThe answer starts: 200, then a space every 5 seconds until the Completion's JSON.
Wait for Inference's answer to a stream to start2 secondsThe stream starts: 200, then a : keepalive comment line every 5 seconds until Inference answers. A later error is the last event.
Tries to sign in, ask for a reset email, or set a new password, from one address5 a minuteThe App says how many seconds to wait.
Password link of the approval email7 days, used once. Only the newest link works.The link no longer works.
Password reset link1 hour, used onceThe link no longer works.
Session in the App30 days from its last renewal. The App renews it at most once a day while you use it.The App takes you to sign-in.
GPU run of one harvest60 minutes on llama-8b, and 150 minutes on llama-405b and trinity-truebaseThe harvest fails, its error says that it timed out, and it costs nothing.
wait of a read of a harvest0 to 60 seconds400

Cold starts and long requests explains the 14 minutes, the 45 minutes, the 150 seconds, and the 2 seconds.

Kept data

DataKeptAfter that
Result of an ended Job24 hours after the Job endedThe result route answers 410 job_result_expired. The Job stays.
Activations of a Playground Run7 days after the Run endedThe Run shows its text and tokens without them.
A deleted Loom, Node, or Playground Run14 days after the deleteThe API erases it. You cannot read it from the moment you delete it.
An Idempotency-Key and its answer24 hoursA request with the same key runs as a new request.
Files of a completed harvestWith no endThe API deletes none of them.
A link to a file of a harvest7 days from the answer that made itThe link no longer works. Each answer of GET /v1/harvest/{job_id} for a done Job makes new links.

On this page