For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rate limits

List Rate Limit Rules

get

List every rule in effect: the config.yml rules, then the ones stored here.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Responses
200

Successful Response

application/json

Every rule in effect: config-file rules first, then stored ones, each in name order.

get/api/v1/rate-limits
GET /api/v1/rate-limits HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
200

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"
    }
  ]
}

Create Rate Limit Rule

post

Add a rule. It applies from the next request on this replica, and on every replica within 30 seconds.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Body

A rule to add. The same fields, limits and validation as a rate_limits entry in config.yml.

budgetsstring[] · nullableOptional

The budget IDs a per: budget rule counts, each on its own; unset counts every budget. Refused on any other rule.

lease_secnumberOptional

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.

Default: 900
max_concurrentinteger · min: 1 · nullableOptional

Requests in flight at once.

modestring · enumOptional

'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.

Default: enforcePossible values:
modelsstring[] · nullableOptional

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.

namestringRequired

Names the rule in a 429's detail and in the counter's key. Unique across rate_limits.

Pattern: ^[A-Za-z0-9_.-]+$
perstring · enumRequired

What one count is shared by.

Possible values:
rpminteger · min: 1 · nullableOptional

Requests per minute.

tpminteger · min: 1 · nullableOptional

Tokens per minute, counted on what each request used; see tpm_admission for how a request is admitted.

tpm_admissionstring · enumOptional

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.

Default: usedPossible values:
Responses
201

Successful Response

application/json

One rule in effect, and where it is defined.

budgetsstring[] · nullableOptional

The budget IDs a per: budget rule counts, each on its own; unset counts every budget. Refused on any other rule.

lease_secnumberOptional

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.

Default: 900
max_concurrentinteger · min: 1 · nullableOptional

Requests in flight at once.

modestring · enumOptional

'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.

Default: enforcePossible values:
modelsstring[] · nullableOptional

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.

namestringRequired

Names the rule in a 429's detail and in the counter's key. Unique across rate_limits.

Pattern: ^[A-Za-z0-9_.-]+$
perstring · enumRequired

What one count is shared by.

Possible values:
rpminteger · min: 1 · nullableOptional

Requests per minute.

sourcestring · enumRequired

'config' for a rule from config.yml, which is read-only here; 'dashboard' for a stored one.

Possible values:
tpminteger · min: 1 · nullableOptional

Tokens per minute, counted on what each request used; see tpm_admission for how a request is admitted.

tpm_admissionstring · enumOptional

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.

Default: usedPossible values:
updated_atstring · date-time · nullableOptional

When a stored rule last changed.

post/api/v1/rate-limits
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"
}

Update Rate Limit Rule

patch

Change a stored rule. Requests it already counted stay counted. A config.yml rule answers 409.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
namestringRequired
Body

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.

budgetsstring[] · nullableOptional

The budget IDs a per: budget rule counts; null for every budget, and on any other rule.

lease_secnumber · nullableOptional

How long a max_concurrent slot is held at most.

max_concurrentinteger · min: 1 · nullableOptional

Requests in flight at once.

modestring · enum · nullableOptional

'enforce' refuses a request over the rule; 'report' serves it and names the rule.

Possible values:
modelsstring[] · nullableOptional

The instance:model names a per: model rule limits; null for any other rule.

perstring · enum · nullableOptional

What one count is shared by.

Possible values:
rpminteger · min: 1 · nullableOptional

Requests per minute.

tpminteger · min: 1 · nullableOptional

Tokens per minute.

tpm_admissionstring · enum · nullableOptional

'used' counts only what a request used; 'estimate' holds its estimate.

Possible values:
Responses
200

Successful Response

application/json

One rule in effect, and where it is defined.

budgetsstring[] · nullableOptional

The budget IDs a per: budget rule counts, each on its own; unset counts every budget. Refused on any other rule.

lease_secnumberOptional

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.

Default: 900
max_concurrentinteger · min: 1 · nullableOptional

Requests in flight at once.

modestring · enumOptional

'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.

Default: enforcePossible values:
modelsstring[] · nullableOptional

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.

namestringRequired

Names the rule in a 429's detail and in the counter's key. Unique across rate_limits.

Pattern: ^[A-Za-z0-9_.-]+$
perstring · enumRequired

What one count is shared by.

Possible values:
rpminteger · min: 1 · nullableOptional

Requests per minute.

sourcestring · enumRequired

'config' for a rule from config.yml, which is read-only here; 'dashboard' for a stored one.

Possible values:
tpminteger · min: 1 · nullableOptional

Tokens per minute, counted on what each request used; see tpm_admission for how a request is admitted.

tpm_admissionstring · enumOptional

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.

Default: usedPossible values:
updated_atstring · date-time · nullableOptional

When a stored rule last changed.

patch/api/v1/rate-limits/{name}
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"
}

Delete Rate Limit Rule

delete

Remove a stored rule. A config.yml rule answers 409.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
namestringRequired
Responses
204

Successful Response

No content

delete/api/v1/rate-limits/{name}
DELETE /api/v1/rate-limits/{name} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?