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

Request details

GET/api/usage/requests/{request_id}

Fetch the reconciliation record for one completed request. Use this when response usage is not enough, especially for cache write tokens, provider raw usage fields, billing line items and routing metadata.

Path parameters

request_idstring
required

Request ID for a request made by the same API key. Lazu rejects attempts to read another key's request details.

Response fields

request_idstring

The requested request ID.

modelstring

Requested model or route name.

resolved_modelstring
nullable

Actual upstream model after routing and model mapping.

usage.dimensionsobject[]

Normalized dimensions such as input, output, cache_read, cache_write_5m, cache_write_1h, cache_miss, audio and image dimensions.

billing.line_itemsobject[]

Billable usage lines with price, quantity and total charge.

provider_usage.raw_fieldsobject

Compact provider-native usage fields retained for reconciliation.

routingobject
nullable

Route decision metadata when the request used routing.

Cache field guidance

OpenAI-compatible responses may show cache reads as

usage.prompt_tokens_details.cached_tokens or usage.input_tokens_details.cached_tokens. Cache writes may appear as cache_write_tokens, cache_write_5m_tokens or cache_write_1h_tokens only when the upstream reports them.

For billing and reconciliation, this endpoint is the more complete source.

See also