查询用户所有的API Key
POST
/api/v1/user/admin/get-api-tokens获取用户账号下的所有API Key
请求速率限制:1QPS
请求参数
无
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
statusCode
integer
必需
message
string
必需
data
array [object {12}]
必需
key
string
必需
user_id
string
必需
remark
string
必需
created_at
string
必需
used_at
string | null
必需
expired_at
string
必需
used_times
string
必需
used_fee
string
必需
max_fee
string
必需
permissions
array[string]
必需
is_admin
boolean
必需
is_disabled
boolean
必需
示例
{
"statusCode": 200,
"message": "Get API keys success, total keys: 2",
"data": [
{
"key": "sk-41UCGyo895F374e4819dT3BlbKFJcaA8BC123f604800b1Be",
"user_id": "1",
"remark": "keyu02",
"created_at": "2023-08-17T10:12:53.000Z",
"used_at": "2023-08-17T12:26:20.000Z",
"expired_at": "2024-12-31T15:59:59.000Z",
"used_times": "0",
"used_fee": "0.00",
"max_fee": "3500000.00",
"permissions": [
"gpt-3.5-turbo"
],
"is_admin": false,
"is_disabled": false
},
{
"key": "sk-FAfz0Yju7gF6XNQIkFkfLrxs7lkaCtpEAQvCYMl1RoT8e0Bg",
"user_id": "1",
"remark": "Secret key",
"created_at": "2023-05-14T08:48:54.000Z",
"used_at": null,
"expired_at": "2033-05-11T08:48:54.000Z",
"used_times": "0",
"used_fee": "0.00",
"max_fee": "0.00",
"permissions": [
"gpt-4",
"gpt-4-0314",
"text-curie-001",
"dall-e",
"text-embedding-ada-002",
"claude-2-web"
],
"is_admin": true,
"is_disabled": true
}
]
}
最后修改时间: 1 年前