查询令牌请求日志
GET
https://api.chatgptsb.com/api/log/token
请求参数
Query 参数
key
string
可选
示例值:
sk-xxxxx
Header 参数
Content-Type
string
必需
示例值:
application/json
Authorization
string
令牌KEY
示例值:
Bearer sk-xxxx
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.chatgptsb.com/api/log/token?key=sk-xxxxx' \
--header 'Authorization: Bearer sk-xxxx' \
--header 'Content-Type: application/json'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"data": [
{
"id": 104204,
"user_id": 1,
"created_at": 1732439625,
"type": 2,
"content": "模型倍率 0.07,补全倍率 4.00,分组倍率 1.00",
"username": "ayok",
"token_name": "测试-6Sy2nl",
"model_name": "gpt-4o-mini",
"quota": 3,
"prompt_tokens": 8,
"completion_tokens": 9,
"use_time": 1,
"is_stream": false,
"channel": 190,
"token_id": 439,
"other": "{\"admin_info\":{\"use_channel\":[\"190\"]},\"completion_ratio\":4,\"frt\":-1000,\"group_ratio\":1,\"model_price\":-1,\"model_ratio\":0.075}"
},
{
"id": 104329,
"user_id": 1,
"created_at": 1732439879,
"type": 2,
"content": "模型倍率 0.07,补全倍率 4.00,分组倍率 1.00",
"username": "ayok",
"token_name": "测试-6Sy2nl",
"model_name": "gpt-4o-mini",
"quota": 3,
"prompt_tokens": 8,
"completion_tokens": 9,
"use_time": 0,
"is_stream": false,
"channel": 262,
"token_id": 439,
"other": "{\"admin_info\":{\"use_channel\":[\"262\"]},\"completion_ratio\":4,\"frt\":-1000,\"group_ratio\":1,\"model_price\":-1,\"model_ratio\":0.075}"
},
{
"id": 104404,
"user_id": 1,
"created_at": 1732439995,
"type": 2,
"content": "模型倍率 0.07,补全倍率 4.00,分组倍率 1.00",
"username": "ayok",
"token_name": "测试-6Sy2nl",
"model_name": "gpt-4o-mini",
"quota": 3,
"prompt_tokens": 8,
"completion_tokens": 9,
"use_time": 0,
"is_stream": false,
"channel": 262,
"token_id": 439,
"other": "{\"admin_info\":{\"use_channel\":[\"262\"]},\"completion_ratio\":4,\"frt\":-1000,\"group_ratio\":1,\"model_price\":-1,\"model_ratio\":0.075}"
}
],
"message": "",
"success": true
}
修改于 2024-12-16 12:23:31