latestOpenAPI 3.1.02026-08-197104501.1 MB
8fbaab4fc7c5
key management
Delete Key Fn
Delete a key from the key management system.
Parameters::
- keys (List[str]): A list of keys or hashed keys to delete. Example {"keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]}
- key_aliases (List[str]): A list of key aliases to delete. Can be passed instead of keys.Example {"key_aliases": ["alias1", "alias2"]}
Returns:
- deleted_keys (List[str]): A list of deleted keys. Example {"deleted_keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]}
Example:
curl --location 'http://0.0.0.0:4000/key/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"keys": ["sk-QWrxEynunsNpV1zT48HIrw"]
}'
Raises: HTTPException: If an error occurs during key deletion.
post/key/delete
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
Response
Successful Response
{"stackTrail":"paths:/key/delete:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}