Rate limits
List every rule in effect: the config.yml rules, then the ones stored here.
Enter your API key here (sent as Otari-Key header).
Successful Response
Every rule in effect: config-file rules first, then stored ones, each in name order.
GET /api/v1/rate-limits HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
Successful Response
{
"rules": [
{
"budgets": [
"text"
],
"lease_sec": 900,
"max_concurrent": 1,
"mode": "enforce",
"models": [
"text"
],
"name": "text",
"per": "deployment",
"rpm": 1,
"source": "config",
"tpm": 1,
"tpm_admission": "used",
"updated_at": "2026-01-01T00:00:00.000Z"
}
]
}Add a rule. It applies from the next request on this replica, and on every replica within 30 seconds.
Enter your API key here (sent as Otari-Key header).
A rule to add. The same fields, limits and validation as a rate_limits entry in config.yml.
The budget IDs a per: budget rule counts, each on its own; unset counts every budget. Refused on any other rule.
How long a max_concurrent slot is held at most. A slot is given back when its response ends; this bounds what a process that dies mid-request keeps.
900Requests in flight at once.
'enforce' (the default) refuses a request over the limit with 429. 'report' counts the same way but serves the request, naming the rule in the Otari-Rate-Limit-Exceeded response header, so a limit can be watched before it is enforced.
enforcePossible values: The models a per: model rule limits, each as instance:model (the provider instance the model is called through, then the model), each counted on its own. Required there and refused on any other rule.
Names the rule in a 429's detail and in the counter's key. Unique across rate_limits.
^[A-Za-z0-9_.-]+$What one count is shared by.
Requests per minute.
Tokens per minute, counted on what each request used; see tpm_admission for how a request is admitted.
How a tpm limit admits a request. 'used' (the default) admits a request while the minute's tokens are under the limit and counts what it used once it completes, as LiteLLM does. 'estimate' holds the request's estimate (prompt plus max output, or budget_estimate_default_output_tokens) while it runs and refuses it when that does not fit, which is how providers count their own quotas: use it for a limit meant to stay under one.
usedPossible values: Successful Response
One rule in effect, and where it is defined.
The budget IDs a per: budget rule counts, each on its own; unset counts every budget. Refused on any other rule.
How long a max_concurrent slot is held at most. A slot is given back when its response ends; this bounds what a process that dies mid-request keeps.
900Requests in flight at once.
'enforce' (the default) refuses a request over the limit with 429. 'report' counts the same way but serves the request, naming the rule in the Otari-Rate-Limit-Exceeded response header, so a limit can be watched before it is enforced.
enforcePossible values: The models a per: model rule limits, each as instance:model (the provider instance the model is called through, then the model), each counted on its own. Required there and refused on any other rule.
Names the rule in a 429's detail and in the counter's key. Unique across rate_limits.
^[A-Za-z0-9_.-]+$What one count is shared by.
Requests per minute.
'config' for a rule from config.yml, which is read-only here; 'dashboard' for a stored one.
Tokens per minute, counted on what each request used; see tpm_admission for how a request is admitted.
How a tpm limit admits a request. 'used' (the default) admits a request while the minute's tokens are under the limit and counts what it used once it completes, as LiteLLM does. 'estimate' holds the request's estimate (prompt plus max output, or budget_estimate_default_output_tokens) while it runs and refuses it when that does not fit, which is how providers count their own quotas: use it for a limit meant to stay under one.
usedPossible values: When a stored rule last changed.
Validation Error
POST /api/v1/rate-limits HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 50
{
"name": "keys",
"per": "key",
"rpm": 600,
"tpm": 200000
}{
"budgets": [
"text"
],
"lease_sec": 900,
"max_concurrent": 1,
"mode": "enforce",
"models": [
"text"
],
"name": "text",
"per": "deployment",
"rpm": 1,
"source": "config",
"tpm": 1,
"tpm_admission": "used",
"updated_at": "2026-01-01T00:00:00.000Z"
}Change a stored rule. Requests it already counted stay counted. A config.yml rule answers 409.
Enter your API key here (sent as Otari-Key header).
Fields to change on a stored rule. An omitted field keeps its value; null clears a limit.
The merged rule must still set at least one of rpm, tpm or max_concurrent.
The budget IDs a per: budget rule counts; null for every budget, and on any other rule.
How long a max_concurrent slot is held at most.
Requests in flight at once.
'enforce' refuses a request over the rule; 'report' serves it and names the rule.
The instance:model names a per: model rule limits; null for any other rule.
What one count is shared by.
Requests per minute.
Tokens per minute.
'used' counts only what a request used; 'estimate' holds its estimate.
Successful Response
One rule in effect, and where it is defined.
The budget IDs a per: budget rule counts, each on its own; unset counts every budget. Refused on any other rule.
How long a max_concurrent slot is held at most. A slot is given back when its response ends; this bounds what a process that dies mid-request keeps.
900Requests in flight at once.
'enforce' (the default) refuses a request over the limit with 429. 'report' counts the same way but serves the request, naming the rule in the Otari-Rate-Limit-Exceeded response header, so a limit can be watched before it is enforced.
enforcePossible values: The models a per: model rule limits, each as instance:model (the provider instance the model is called through, then the model), each counted on its own. Required there and refused on any other rule.
Names the rule in a 429's detail and in the counter's key. Unique across rate_limits.
^[A-Za-z0-9_.-]+$What one count is shared by.
Requests per minute.
'config' for a rule from config.yml, which is read-only here; 'dashboard' for a stored one.
Tokens per minute, counted on what each request used; see tpm_admission for how a request is admitted.
How a tpm limit admits a request. 'used' (the default) admits a request while the minute's tokens are under the limit and counts what it used once it completes, as LiteLLM does. 'estimate' holds the request's estimate (prompt plus max output, or budget_estimate_default_output_tokens) while it runs and refuses it when that does not fit, which is how providers count their own quotas: use it for a limit meant to stay under one.
usedPossible values: When a stored rule last changed.
Validation Error
PATCH /api/v1/rate-limits/{name} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 12
{
"rpm": 1200
}{
"budgets": [
"text"
],
"lease_sec": 900,
"max_concurrent": 1,
"mode": "enforce",
"models": [
"text"
],
"name": "text",
"per": "deployment",
"rpm": 1,
"source": "config",
"tpm": 1,
"tpm_admission": "used",
"updated_at": "2026-01-01T00:00:00.000Z"
}Remove a stored rule. A config.yml rule answers 409.
Enter your API key here (sent as Otari-Key header).
Successful Response
No content
Validation Error
DELETE /api/v1/rate-limits/{name} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?
