概览
该接口返回单个 API Key 维度的分页用量明细,不暴露提供商执行细节。Query 参数
| 参数 | 类型 | 默认值 / 限制 | 说明 |
|---|---|---|---|
page | integer | 默认 1,最小 1 | 1-based 页码 |
limit | integer | 默认 50,最小 1,最大 100 | 每页条数 |
model | string | 最大长度 100 | 请求时使用的模型名 |
modelVendor | string | 最大长度 100 | 公开模型厂商 |
scene | enum | - | chat, image, audio, video, embedding, rerank, translation, music, 3d, realtime |
accessChannel | enum | - | platform 或 byok |
startDate | string | - | 起始时间,接受带时区的 RFC3339 或 YYYY-MM-DD |
endDate | string | - | 结束时间,接受带时区的 RFC3339 或 YYYY-MM-DD |
startDate 和 endDate,则 startDate 必须早于或等于 endDate。
说明
- 响应是分页的。
- 响应只包含公开账单和报表字段。
- 当底层请求已完成结算时,每条用量明细还会包含
billing_transaction_id。建议将它与request_id一起用于请求级对账。 - 供应商执行细节会被隐藏。
示例
请求 / 响应
精确 schema 和响应字段请使用上方的交互式 OpenAPI 面板。Response example
Important fields
API key summary using the same fields as list/create/update responses.
Paginated usage rows.
Pagination metadata with
page, limit, total, and totalPages.Aggregated totals for the selected filters.
Aggregated breakdowns for the selected filters.
Public request identifier for support and reconciliation.
Settled billing transaction id when available.
Requested public model name.
Logical public model used for reporting.
Public model vendor.
Public request scene.
platform or byok.Billing usage unit, such as
per_token.Usage quantity as a JSON number for display.
Exact usage quantity as a decimal string.
Prompt token count.
Completion token count.
Total token count.
Cache read token count.
Total cache write token count.
Five-minute cache write token count.
One-hour cache write token count.
Cost in USD as a JSON number for display.
Exact cost in USD as a decimal string.
ISO usage row timestamp.
Total request count.
Total cost in USD as a JSON number for display.
Exact total cost in USD as a decimal string.
Total prompt tokens.
Total completion tokens.
Total tokens.
Usage quantity grouped by usage unit.
Breakdown by requested public model.
Breakdown by logical public model.
Breakdown by public model vendor.
Breakdown by public request scene.
Breakdown by
platform or byok access channel.Daily cost trend.