Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
介面 / Usage

請求詳情

GET/api/usage/requests/{request_id}

查詢一次已完成請求的對帳記錄。OpenAI-compatible 響應裡的 usage 不一定包含完整 cache write、provider raw usage、計費明細和 routing metadata,完整資訊看這個介面。

路徑參數

request_idstring
required

同一把 API Key 發起的請求 ID。Lazu 不允許讀取其它 key 的請求詳情。

響應欄位

request_idstring

請求 ID。

modelstring

使用者請求的模型或 route 名稱。

resolved_modelstring
nullable

實際上游模型。

usage.dimensionsobject[]

標準化 usage 維度,例如 inputoutputcache_readcache_write_5mcache_write_1hcache_miss

billing.line_itemsobject[]

計費明細。

provider_usage.raw_fieldsobject

用於對帳的 provider 原始 usage 欄位。

routingobject
nullable

請求經過 routing 時返回路由 metadata。

Cache 欄位

OpenAI-compatible 響應裡,cache read 可能出現在

usage.prompt_tokens_details.cached_tokensusage.input_tokens_details.cached_tokens。cache write 只有在上游返回時才會出現。

如果要對帳或排查費用,以請求詳情 API 為準。

相關頁面