LLM usage explainer
Paste a usage object or a whole response from any provider and see what each count means, what is inside what, and what the request cost, slice by slice.
What it does
Paste a usage object, or the whole response it came in. It can come from OpenAI Chat Completions, OpenAI Responses, Anthropic Messages or Gemini, and xAI and Salyro answer in the Chat Completions shape. The explainer shows:
- The slices the request is billed by: ordinary input, input read from the cache, input written to the cache, and output. Reasoning is shown as the part of the output it is.
- What each field means, and which one is inside which.
- What each slice cost, and the total, on the model the response names. When it names none that Salyro publishes, it says so and prices on the model you choose.
Everything runs in your browser: nothing you paste is sent anywhere.
Why the same request reads differently
The providers count the same tokens in different ways:
- OpenAI (Chat Completions and Responses), xAI and Salyro:
prompt_tokensorinput_tokensincludes the cached and written tokens. The ordinary input is what is left after taking them away. - Anthropic:
input_tokensexcludes the cache. Anthropic's API reference states: "Total input tokens in a request is the summation ofinput_tokens,cache_creation_input_tokens, andcache_read_input_tokens." - Gemini:
promptTokenCountincludes the cached content. Thinking tokens and tool-use prompt tokens are counted apart, and billed as output and input.
Adding a cached count on top of a total that already includes it bills those tokens twice. The explainer reads each convention once, the way Salyro's gateway records a request, and every slice adds up.
How the cost is worked out
The cost is Salyro's own arithmetic, the same code the gateway prices usage with:
- The price band is chosen by the prompt size.
- Each slice gets its own rate, and cache writes cost more than ordinary input.
- The slices add up to the total the gateway would record, to the last decimal place.
Prices come from Salyro's catalogue, as of today, and each price shows its source. A price nobody has verified is shown as not priced, with the reason, never as $0. Today that includes Anthropic's cache writes: the price list has no verified cache-write rate for Anthropic's models, so a request that wrote to Anthropic's cache is not priced rather than priced at the wrong rate.
When the counts contradict each other, for example cached tokens above the whole input, the explainer shows an error. The cost is not priced. The counts are not adjusted to make them fit.
What it does not know
- Where the field meanings come from. Anthropic's are quoted from its API reference. OpenAI's and Gemini's pages could not be read when this was written, so their explanations are how Salyro's gateway reads those fields, and the explainer says so.
- Your own contract. It prices at list prices, not at a negotiated discount, and not at Batch API rates.
- The price on the day of the request. It prices at the prices in force today, which may differ from the day the request was made.
FAQ
Is cached_tokens part of prompt_tokens?
Yes, in OpenAI's Chat Completions: prompt_tokens counts every input token, cached ones included. In Anthropic's Messages API the cache counts are separate, and the whole input is the sum of all three fields.
Are reasoning tokens billed on top of the output?
No. Reasoning or thinking tokens are part of the output count and are billed at the output rate. The explainer shows them inside the output, not beside it.
Sources
The Anthropic field meanings quote the Messages API reference on platform.claude.com. The other providers' readings are those of Salyro's gateway. Prices come from Salyro's catalogue, with the page each price was read from shown under the result.
Where the numbers come from
- Model and pricing data is a snapshot of the catalogue Salyro itself uses, taken when this site was built.
