Rate limits
Call, token, size and wait limits, with the error each returns.
Every limit returns an error code. Retry-After is in seconds. Sizes are in KB and MB: 1 KB is 1,024 bytes and
1 MB is 1,048,576 bytes. Each entry below gives the limit, its value and the error a request over the limit gets.
Limits
Keys
- Account key (
abk_) calls - 60 a minute and 5,000 per 24 hours by default, set per key; both windows roll. Error:
429 rate_limited. - LLM key (
hlk_) chat completions - 200 a UTC day by default; resets at 00:00 UTC. Error:
429 daily_limit.
Language models
- Tokens per member account
- 300,000 a UTC day; resets at 00:00 UTC. Error:
429 daily_tokens. - Open chat completions per member account
- 64; frees when a completion ends. Error:
429 too_many_streams. - Open chat completions per account on one model
- The model's
max_parallel; frees when a completion ends. Error:400 too_many_parallel. - Chat request body
- 32 MB. Error:
413 too_large. - Tokens per chat request
- The model's
context_length. Error:400, with the model's own errortypeascode.
Audio and media
- Media processing time per member account
- 600 s a UTC day by default; resets at 00:00 UTC. Error:
429 budget-exhausted. - Open media jobs per key
- 1,000 queued or running; frees when a job ends. Error:
429 too-many-open. - JSON request body
- 4 MB on the audio and media routes. Error:
413 too-large. - Audio or image file
- 20 MB in
POST /v1/media/uploadsandPOST /v1/audio/transcriptions. Error:413 too-large. - Saved voices per member account
- 30 by default; frees when a voice is deleted. Error:
422 voice_quota.
Notes
- A member account is an albastov.com account other than the owner's. The owner's account has no token, open-completion or media-processing limit.
- Member account limits apply to every key of the account.
max_paralleldoes not apply tohlk_keys; a model withmax_parallel1 answers a second open request with400 parallel_unsupported. max_parallelandcontext_lengthper model are inGET /v1/models.- Open completions count toward the
hlk_daily limit;GET /v1/modelsdoes not. - A
429 daily_limitor429 daily_tokensbody carrieslimitandused;429 budget-exhaustedcarriesresets_at.
Events limits
- Publish requests, per publish key
- 120 a minute, bursts of 30. Error:
429 rate_limitedwithRetry-After. - Published events, per publish key
- 300 a minute; each event of a batch counts. Error:
429 rate_limitedwithRetry-After. - Calls, per events key
- 600 a minute and 200,000 a day. Error:
429 rate_limitedwithRetry-After: 60. - Publish body
- 16 KB; a batch 256 KB and at most 100 events;
data8 KB. Error:413 body_too_largefor a body over its size. idempotency_keywindow- 7 days, per source.
- Webhook body
- 2 MB. Error:
413 body_too_large. - Webhook deliveries, per source
- 120 a minute, bursts of 30. Error:
429 rate_limitedwithRetry-After. - Refused webhook requests, per client address
- 30, then 1 more every 2 s. Error:
429 rate_limitedwithRetry-After. - Open streams, per read key
- 8. Error:
429 too_many_streams. - Stream catch-up
- 1,000 events.
- History
- 90 days per source by default.
Waits
- Model not loaded
503 model_loadingwithRetry-Afterandretry_after_s; a streamed request withoutX-LLM-Waitstays open up to 1800 s while the model waits in the queue and loads.- Request waiting in the queue
503 queuedwithpositionandRetry-After.- Speech or transcription not finished in time
503 queuedwithjob_idandRetry-After; the job stays in media jobs.- Speech or transcription job past its queue timeout
503 queue-timeoutwithjob_idandRetry-After; the job has expired.- Non-streamed request with no response within about 100 s
524, plain text; stream the request instead.
Staying within limits
- Set
max_tokenson every chat completion. - Stream long chat completions with
"stream": true. - A non-streamed request without
X-LLM-Waitfor a model that is not loaded waits up to 80 s, then answers503 model_loadingor503 queued.stateinGET /v1/modelsshows which models are loaded.
Retry rules per status: Errors.