start_timestamp / end_timestamp 是秒级 Unix 时间戳。未传=不限。type| 值 | 含义 |
|---|---|
| 0 | 未知 |
| 1 | 充值 (Topup) |
| 2 | 消费 (Consume) |
| 3 | 管理 (Manage) |
| 4 | 系统 (System) |
| 5 | 错误 (Error) |
| 6 | 退款 (Refund) |
id 是按页重编号后的名义 id,不是数据库主键other 是 JSON 字符串,含计费细节(模型倍率、缓存、Token 细分等),需自行解析channel_name 仅给管理员返回,普通用户与明文访问令牌均为空字符串curl --location 'https://api.openai-hub.com/api/log/self' \
--header 'Authorization: Bearer sk-0ABIEXVjh9****Qckjy' \
--header 'New-Api-User: 1'{
"success": true,
"message": "string",
"data": {
"page": 0,
"page_size": 0,
"total": 0,
"items": [
{
"id": 0,
"user_id": 0,
"created_at": 0,
"type": 0,
"content": "string",
"username": "string",
"token_name": "string",
"model_name": "string",
"quota": 0,
"prompt_tokens": 0,
"completion_tokens": 0,
"use_time": 0,
"is_stream": true,
"channel": 0,
"channel_name": "string",
"token_id": 0,
"group": "string",
"ip": "string",
"request_id": "string",
"other": "string"
}
]
}
}