/api/v1/billing/usage
Billing
账单使用 API(Beta)
Get paginated billing usage data for the authenticated user. NOTE: This is a beta endpoint and may be subject to change.
GET
/api/v1/billing/usage
导出用户的用量数据。响应字段说明如下:
- timestamp:账单使用条目的创建时间戳
- sku:与账单使用条目关联的产品
- pricePerUnitUsd:以美元计的单价
- unit:消耗的单位数量
- amount:账单使用条目的总收费金额
- currency:账单使用条目所收取的货币
- notes:关于账单使用条目的备注
- inferenceDetails.requestId:与推理关联的请求 ID
- inferenceDetails.inferenceExecutionTime:推理执行所用时间(毫秒)
- inferenceDetails.promptTokens:prompt 中请求的 token 数量。仅在 LLM 用量中出现。
- inferenceDetails.completionTokens:completion 中使用的 token 数量。仅在 LLM 用量中出现。
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求头
Accept header to specify the response format
示例:
"application/json, text/csv"
查询参数
Filter by currency
可用选项:
USD, VCU, DIEM, BUNDLED_CREDITS 示例:
"USD"
End date for filtering records (ISO 8601)
示例:
"2024-12-31T23:59:59.000Z"
Number of items per page
必填范围:
0 < x <= 500示例:
200
Page number for pagination
必填范围:
x > 0示例:
1
Sort order for createdAt field
可用选项:
asc, desc 示例:
"desc"
Start date for filtering records (ISO 8601)
示例:
"2024-01-01T00:00:00.000Z"