概覽
這個 endpoint 會回傳單一 API Key 維度的用量明細,同時不暴露實體 routing 中繼資料。Query 參數
| 參數 | 型別 | 預設值 / 限制 | 說明 |
|---|---|---|---|
page | integer | 預設 1,最小 1 | 從 1 開始的頁碼 |
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 與 reporting 欄位。
- 當底層請求已完成結算時,每條用量明細還會包含
billing_transaction_id。建議將它與request_id一起用於請求級對帳。 - 內部 routing 與實體渠道中繼資料會持續被隱藏。
範例
請求 / 回應
精確 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.