跳转到主要内容
POST
创建 API Key

授权

Authorization
string
header
必填

在控制台创建的管理密钥;read 可读取,write 还可修改 API Key。不接受推理 API Key。

请求体

application/json
name
string
必填
Required string length: 1 - 60
memberName
string | null
Maximum string length: 80
memberEmail
string | null
Maximum string length: 200
expiresAt
integer<int64> | null

未来的 Unix 毫秒时间戳;null 清除到期时间。

defaultTags
object
allowedModels
string[] | null

精确模型 ID 或 provider/* 规则;null 允许工作空间所有已开通模型,空数组无效。

Required array length: 1 - 50 elements
budget
integer | null
必填范围: 0 <= x <= 1000000000000
remaining
integer | null
必填范围: 0 <= x <= 1000000000000
resetPeriod
enum<string>
可用选项:
none,
daily,
weekly,
monthly

响应

请求成功。

id
string
必填
key
string
必填
expiresAt
integer | null