update-key
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUpdate Key
更新密钥
Update an existing API key on a live LiteLLM proxy.
在运行中的LiteLLM代理上更新现有API密钥。
Setup
配置
LITELLM_BASE_URL — e.g. https://my-proxy.example.com
LITELLM_API_KEY — proxy admin keyAPI reference: https://litellm.vercel.app/docs/proxy/virtual_keys
LITELLM_BASE_URL — 示例:https://my-proxy.example.com
LITELLM_API_KEY — 代理管理员密钥Ask the user
询问用户信息
- Key (required) — the value. If they don't have it, list keys:
sk-...bashcurl -s "$BASE/key/list?size=25&return_full_object=true" -H "Authorization: Bearer $KEY" - What to change — any combination of:
- (float)
max_budget - (list)
models - (string)
key_alias - /
tpm_limit(int)rpm_limit - (e.g.
duration— extends expiry from now)30d - /
team_id(reassign ownership)user_id
- 密钥(必填)—— 格式为的值。如果用户没有该密钥,可列出所有密钥:
sk-...bashcurl -s "$BASE/key/list?size=25&return_full_object=true" -H "Authorization: Bearer $KEY" - 要修改的内容—— 可选择以下任意组合:
- (浮点数)
max_budget - (列表)
models - (字符串)
key_alias - /
tpm_limit(整数)rpm_limit - (例如
duration— 从当前时间延长过期时间)30d - /
team_id(重新分配所有权)user_id
Run
执行操作
bash
curl -s -X POST "$BASE/key/update" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"key": "<sk-...>",
"max_budget": <value>,
"models": [<models>],
"duration": "<duration>"
}'Only include the fields being changed.
bash
curl -s -X POST "$BASE/key/update" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"key": "<sk-...>",
"max_budget": <value>,
"models": [<models>],
"duration": "<duration>"
}'仅包含需要修改的字段。
Output
输出结果
Show the updated , , , .
key_aliasmax_budgetmodelsexpires展示更新后的、、、字段。
key_aliasmax_budgetmodelsexpires