> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sailresearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate limits

> How Sail limits cache-aware input tokens for inference requests

Sail can limit input tokens per minute for each public model. Each configured
model has two limits:

* One limit for all organizations together.
* One limit for each organization.

These limits apply to single requests sent to `/v1/responses`,
`/v1/chat/completions`, and `/v1/messages`. They do not apply to the Batch API.

## Counted input tokens

Sail first estimates how many input tokens will not come from a known cache.
Known regular cache reads and [Supercache](/supercache) reads reduce the counted
input. A Supercache write counts as normal input because Sail must process the
full prompt.

Sail can then apply a rate-limit discount for the selected
[completion window](/completion-windows). Sail rounds the result up to a whole
token. This discount changes only rate-limit use. It does not change pricing.

## One-minute capacity

Each limit uses a token bucket with one minute of capacity. The bucket refills
continuously. A request is accepted only when both the global bucket and your
organization bucket have enough tokens.

A single large prompt can use the full bucket. There is no extra burst limit.
If one request needs more counted tokens than the full one-minute bucket, that
same request cannot pass after a wait. Reduce the input, use an existing cached
prefix, or select another supported completion window.

An idempotent replay of an accepted request does not use the buckets again.

## Limit responses

Sail returns:

* `429` when your organization bucket does not have enough tokens.
* `529` when the global model bucket does not have enough tokens.

Both responses include `Retry-After` in seconds. Wait for that time before you
retry. Use the same idempotency key for retries. A request rejected by this
limit is not submitted for inference and does not keep an idempotency
reservation.

For `/v1/messages`, send the key in the `anthropic-idempotency-key` header.
For the other routes, send it in the `Idempotency-Key` header.

See [Idempotency](/idempotency) for retry-safe request examples.
