rate-limits

Update Rate Limit Rule

Changed on

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

patch/api/v1/rate-limits/{name}

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Path parameters

namestring required

Request body

lease_secnumber nullable

How long a max_concurrent slot is held at most.

max_concurrentinteger nullable

Requests in flight at once.

modelsstring[] nullable

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

per'deployment' | 'key' | 'user' | 'model' nullable

What one count is shared by.

rpminteger nullable

Requests per minute.

tpminteger nullable

Tokens per minute.

tpm_admission'used' | 'estimate' nullable

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

Example request

{
  "rpm": 1200
}

Response

Successful Response

lease_secnumber

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.

max_concurrentinteger nullable

Requests in flight at once.

modelsstring[] nullable

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.

namestring required

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

per'deployment' | 'key' | 'user' | 'model' required

What one count is shared by.

rpminteger nullable

Requests per minute.

source'config' | 'dashboard' required

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

tpminteger nullable

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

tpm_admission'used' | 'estimate'

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.

updated_atstring date-time nullable

When a stored rule last changed.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status