接口
认证
使用会话 Cookie 认证,或携带Authorization: Bearer <api-key>。
请求体
string
required
新密钥的便于识别的标签。
array
要授予的权限作用域列表。省略则继承默认。
响应
string
唯一的密钥标识符。
string
分配给密钥的名称。
string
完整的密钥值。仅显示一次。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST "https://router.example.com/v1/router/keys" \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{"name":"Production pipeline","scopes":["read","write"]}'
{
"id": "key_01hv8",
"name": "Production pipeline",
"key": "aria_9f3a4e...full-secret"
}
为咏唱引擎 ROUTER 创建一个新的 API 密钥。一次性返回完整密钥值,请妥善保管。可选的作用域用于限制权限。
curl -X POST "https://router.example.com/v1/router/keys" \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{"name":"Production pipeline","scopes":["read","write"]}'
{
"id": "key_01hv8",
"name": "Production pipeline",
"key": "aria_9f3a4e...full-secret"
}
POST /v1/router/keys
Authorization: Bearer <api-key>。
curl -X POST "https://router.example.com/v1/router/keys" \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{"name":"Production pipeline","scopes":["read","write"]}'
{
"id": "key_01hv8",
"name": "Production pipeline",
"key": "aria_9f3a4e...full-secret"
}
Was this page helpful?