Skip to main content
Token usage measures the content processed by the model in collected requests. Agents often resend conversation history across turns, so usage can greatly exceed the text you typed and the final answer. Assess usage alongside the task, request count, cache, and tool activity. Costs also depend on rates and billing mode. See complete model costs to add missing prices, understand cache charges, and value Coding Plan usage as a separate token-rate reference.

Align the comparison scope

Use the same space, Agent, model, time range, and set of records. A Session may contain multiple traces, and a Trace may contain multiple model requests. A dashboard total and one model node measure different scopes. Token counts are also different from cost. Even when a data source supplies monetary amounts, cache pricing, provider billing rules, and collection completeness affect comparisons. Use the provider’s bill for actual charges.

Read the known subtotal and reporting coverage

The native Trace list and detail summary use the same usage accounting. Read the completeness message beside the number: Model calls include generations and embeddings, with each call counted once. If a call has no reported total but its normalized input and output are both complete, their sum can establish a known total. Input, output, and total completeness are assessed separately: a known total can still have an unknown input or output breakdown. The detail image below uses a separate example: two of three model calls sum to 120 tokens and the remaining call has unknown usage. Both list and detail retain the 120 subtotal, 2 / 3 coverage, and unknown full total. Find the model node with missing usage and check its source fields and collection configuration before comparing a dashboard or bill.
Native Trace detail showing a known subtotal of 120 tokens, an unknown full total, and two of three calls with known totalsDark native Trace detail showing a known subtotal of 120 tokens and two of three calls with known totals

Detail summary with a known subtotal and 2 / 3 reporting coverage · demonstration data · click to enlarge

Even 11 / 11 only means those identified calls have known totals; it does not prove every call was collected. Nested model calls can report overlapping usage. The UI keeps the overlap warning and unknown total instead of presenting the subtotal as deduplicated consumption. When no model call is identified, this usage summary is omitted; that alone does not establish zero consumption.

Does input already include cache?

For Codex, cached tokens are a subset of input; reasoning tokens are a subset of output. Do not add them again. Cache hit rate divides cached input by total input; do not infer a rate when the denominator is zero. Other Agents and framework integrations can use different fields. Check the current metric tooltip and the model node’s raw usage before reusing a formula just because a field is named input_tokens.

Check a worked example

This hypothetical Claude Code request illustrates the field relationships: A dashboard can show 5,000 new input tokens while normalized input is 50,000. First verify that the record actually contains these four components. Adding cache to 50,000 again would double-count it.
Where 53,000 tokens come fromWhere 53,000 tokens come from

Where 53,000 tokens come from

Click a diagram to open the full-size SVG.

Check one of your own records

Start with a completed Trace containing a model call:
  1. Open Agent traces → Trace, confirm the space, Agent, source, and time range, then open Chain in the details.
  2. Select one model call. In native details, expand Attributes on the right and switch to JSON. In Langfuse details, inspect the usage badge and Metadata. Record the input, output, cache, and total fields actually present, with the Trace and node IDs.
  3. Check whether fields are normalized and input already includes cache; do not apply a dashboard formula just because node fields have similar names. Calculate only with complete, defined buckets, and do not add cache to input that already includes it. For one model call, prefer its reported total; do not replace it with a sum of incomplete input or output buckets. For the whole Trace, also check reporting coverage and overlap warnings.
  4. Return to Data dashboard, record the total and request count for the same interval, and check for other requests before explaining a difference.
The result is a set of numbers with IDs, a time range, source fields, and a calculation. If only the total is known, record that the breakdown is unknown. Gather collection or application-side usage evidence to investigate further; do not fill missing buckets with zero.

Explain differences between views

Use the dashboard to locate the time and model, then inspect raw usage in a model node of a Trace. Record both comparison scopes and field names, rather than just two totals.