Skip to main content
PATCH
/
v1
/
keys
/
{id}
/
limits
Set RPM / TPM rate limits on a key
curl --request PATCH \
  --url https://api.example.com/v1/keys/{id}/limits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "rpmLimit": 60,
  "tpmLimit": 100000
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "rpmLimit": 60,
  "tpmLimit": 100000
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
rpmLimit
object | null

Max requests per minute. null or 0 = unlimited.

Example:

60

tpmLimit
object | null

Max tokens per minute. null or 0 = unlimited.

Example:

100000

Response

Updated rate limits

id
string
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

rpmLimit
object | null
required
Example:

60

tpmLimit
object | null
required
Example:

100000