Skip to main content
GET
Usage and cost for a single request

Authorizations

Authorization
string
header
required

Virtual API key. Create one from the FlexAI dashboard. Pass as Authorization: Bearer sk-xxxx.

Path Parameters

request_id
string
required

The x-litellm-call-id header value from the original response.

Response

Successful response

object
enum<string>
required
Available options:
usage.request
currency
enum<string>
required
Available options:
USD
request_id
string
required
model
string
required

Raw ledger id — the served routing target; not stable across packaging changes.

canonical_model
string
required

Stable catalog id; use this to group and reconcile per-model.

status
string
required

success, failure, or unknown. Failed requests typically report zero tokens and $0 spend.

prompt_tokens
integer
required
completion_tokens
integer
required
total_tokens
integer
required
total_spend
number
required
modality
enum<string>
required
Available options:
text
billing_unit
string
required
started_at
string<date-time>
required
ended_at
string<date-time>
required
generated_at
string<date-time>
required
cached_tokens
integer | null

How many of prompt_tokens were served from the prompt cache. Cached tokens bill at a lower rate, so this is what explains a total_spend below what prompt_tokens and the published per-token price would suggest — the two are not meant to agree on a cache-heavy request.

null means billing has not written this request yet (the same window in which total_spend is 0.0), which is different from a request that had no cache hits — that reports 0.

units_consumed
number | null