$npx -y skills add BerriAI/litellm-skills --skill delete-keyDelete one or more API keys from a live LiteLLM proxy. Ask for the key(s) and confirm before calling POST /key/delete.
| 1 | # Delete Key |
| 2 | |
| 3 | Delete one or more API keys from a live LiteLLM proxy. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ``` |
| 8 | LITELLM_BASE_URL — e.g. https://my-proxy.example.com |
| 9 | LITELLM_API_KEY — proxy admin key |
| 10 | ``` |
| 11 | |
| 12 | ## Ask the user |
| 13 | |
| 14 | 1. **Key(s)** (`sk-...`) or **key alias(es)** — if they don't have them, list first: |
| 15 | ```bash |
| 16 | curl -s "$BASE/key/list?size=25&return_full_object=true" -H "Authorization: Bearer $KEY" |
| 17 | ``` |
| 18 | 2. **Confirm** — show the key alias and ask for confirmation before deleting. |
| 19 | |
| 20 | ## Run |
| 21 | |
| 22 | By key value: |
| 23 | ```bash |
| 24 | curl -s -X POST "$BASE/key/delete" \ |
| 25 | -H "Authorization: Bearer $KEY" \ |
| 26 | -H "Content-Type: application/json" \ |
| 27 | -d '{"keys": ["<sk-...>"]}' |
| 28 | ``` |
| 29 | |
| 30 | By alias: |
| 31 | ```bash |
| 32 | curl -s -X POST "$BASE/key/delete" \ |
| 33 | -H "Authorization: Bearer $KEY" \ |
| 34 | -H "Content-Type: application/json" \ |
| 35 | -d '{"key_aliases": ["<alias>"]}' |
| 36 | ``` |
| 37 | |
| 38 | ## Output |
| 39 | |
| 40 | Show the `deleted_keys` list from the response. |