Usage
Where usage comes from and where to see it.
Usage is what the model reported for a request — input, cached and output tokens — and it is the only thing a request is charged on. Top Billing never estimates the final bill.
In every response
- Chat Completions:
usage.prompt_tokens,usage.completion_tokens,usage.prompt_tokens_details.cached_tokens. When streaming, addstream_options.include_usage. - Messages:
usage.input_tokens,output_tokens,cache_read_input_tokens,cache_creation_input_tokens. - Embeddings:
usage.prompt_tokens.
In the dashboard
Usage lists every request per project with its model, API key, tokens, charge and status, filterable by period (7, 30 or 90 days) and model, with daily spend and breakdowns by model, key and protocol. The dashboard shows today’s spend and recent activity.
Settlement
A request reserves an upper bound before it runs and settles on the reported usage afterwards; the unused part is released at once. If a model ever fails to report usage, the request is not charged and is held for reconciliation instead of being guessed. See Credits & billing.