latestOpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

key management

Block Key

Block an Virtual key from making any requests.

Parameters:

  • key: str - The key to block. Can be either the unhashed key (sk-...) or the hashed key value

Example:

curl --location 'http://0.0.0.0:4000/key/block'     --header 'Authorization: Bearer sk-1234'     --header 'Content-Type: application/json'     --data '{
    "key": "sk-Fn8Ej39NxjAXrvpUGKghGw"
}'

Note: This is an admin-only endpoint. Only proxy admins can block keys.

post/key/block

Headers

litellm-changed-bystring nullable

The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

Request body

keystring required

Response

Successful Response

tokenstring nullable
key_namestring nullable
key_aliasstring nullable
spendnumber
max_budgetnumber nullable
aliasesobject
configobject
user_idstring nullable
team_idstring nullable
agent_idstring nullable
project_idstring nullable
max_parallel_requestsinteger nullable
metadataobject
tpm_limitinteger nullable
rpm_limitinteger nullable
budget_durationstring nullable
budget_reset_atstring date-time nullable
permissionsobject
model_spendobject
model_max_budgetobject
soft_budget_cooldownboolean
blockedboolean nullable
litellm_budget_tableobject nullable
org_idstring nullable
created_atstring date-time nullable
created_bystring nullable
updated_atstring date-time nullable
updated_bystring nullable
last_activestring date-time nullable
object_permission_idstring nullable
access_group_idsstring[] nullable
rotation_countinteger nullable
auto_rotateboolean nullable
rotation_intervalstring nullable
last_rotation_atstring date-time nullable
key_rotation_atstring date-time nullable
router_settingsobject nullable