List Keys
List all keys for a given user / team / organization.
Parameters: expand: Optional[List[str]] - Expand related objects (e.g. 'user' to include user information) status: Optional[str] - Filter by status: "active", "expired", "revoked" (blocked) or "deleted". "deleted" reads the LiteLLM_DeletedVerificationToken archive; the other values partition the live key table, so every live key matches exactly one of them.
Returns: { "keys": List[str] or List[UserAPIKeyAuth], "total_count": int, "current_page": int, "total_pages": int, }
When expand includes "user", each key object will include a "user" field with the associated user object. Note: When expand=user is specified, full key objects are returned regardless of the return_full_object parameter.
Request
- Base URL: https://apiclaw.biz (the document declares no server; this is the origin it was published from)
- URL: https://apiclaw.biz/key/list
- Auth: API key in header x-litellm-api-key
Query parameters
Page number
Page size
Filter keys by user ID. Exact match by default; set substring_matching=true (admin only) for case-insensitive substring matching.
Filter keys by team ID
Filter keys by organization ID
Filter keys by key hash
Filter keys by key alias. Exact match by default; set substring_matching=true for case-insensitive substring matching.
Combined search: matches keys whose token (key hash) equals the value OR whose key_alias contains it (case-insensitive).
Return full key object
Include all keys for teams that user is an admin of.
Include keys created by the user
Column to sort by (e.g. 'user_id', 'created_at', 'spend')
Sort order ('asc' or 'desc')
Expand related objects (e.g. 'user')
Filter by status: 'active' (not blocked, not expired), 'expired' (not blocked, past expiry), 'revoked' (blocked) or 'deleted' (archived keys). Omit to return live keys regardless of status.
Filter keys by project ID
Filter keys by access group ID
Filter keys by agent ID
If true, match key_alias (any caller) and user_id (proxy admins only) as case-insensitive substrings instead of exact values. Defaults to false: /key/list matched these exactly before substring search was added, and an exact user_id filter must never return another user's keys.
Filter keys by expiration. 'expired' returns keys whose expires is in the past; 'active' returns keys that never expire or expire in the future. Omit to return keys regardless of expiration.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.