跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt

Use this file to discover all available pages before exploring further.

PUT /api-keys/

更新已有 API Key 的名称与描述等元数据。

路径参数

keyId
string
必填
要更新的 API Key ID。

请求体

name
string
新名称(1–100 个字符)。
description
string
新描述(最多 500 个字符)。
permissions
array
新的权限列表。

响应

success
boolean
更新是否成功。
message
string
状态说明。
apiKey
object
更新后的详情。
curl -X PUT https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Production Key",
    "description": "Updated description"
  }'
{
  "success": true,
  "message": "API key updated successfully",
  "apiKey": {
    "id": "llm_1706123456_abc123def456",
    "name": "Updated Production Key",
    "description": "Updated description",
    "permissions": [],
    "updatedAt": "2026-01-27T10:00:00.000Z"
  }
}