Reading LLM Usage and Pricing by Token Category

Total token count alone cannot reproduce an LLM bill.
At minimum, separate regular input, cached input, cache writes, output, and tool charges.
Reasoning tokens can also be recorded separately from the final text shown on screen.
ChatGPT subscriptions and usage-based API billing are separate paths as well.
This note describes how to map a usage response to a price table.
Separate authentication and billing paths first
Using Codex as an example, ChatGPT sign-in and API-key sign-in are different paths.
The former relates to an allowance in a subscription.
The latter relates to usage-based API billing.
Do not aggregate the Codex authentication and pricing paths as if they were one usage account.
When checking a model price, record the model ID, unit, and verification date first.
Read usage in five categories
| Category | What it contains | Pricing treatment |
|---|---|---|
| Input | Instructions, history, tool definitions, and attachments | Regular input price |
| Cached input | Reused input | Cache-read price |
| Cache write | Input written to an explicit cache | Cache-write price |
| Output | Final answer, tool calls, and reasoning | Output price |
| Tool | External tools such as web search | Tool-specific price |
Cached input is not necessarily an additional set of tokens on top of regular input.
Many APIs expose cached tokens as a breakdown inside input_tokens.
Cache-write accounting and field names can differ by API and model.
Check the usage totals before adding the same tokens to both regular input and cached input.
OpenAI’s latest model guidance describes GPT-5.6 cache writes at 1.25x the uncached input rate and cache reads at the discounted rate.
Build a conceptual formula before mapping fields
When prices are stated per one million tokens, the conceptual calculation is:
Cost = regular input × input price
+ cached input × cache-read price
+ cache write × cache-write price
+ output × output price
+ tool charges
Confirm whether regular input means total input minus cached input or is returned as its own usage field.
Also check whether explicit cache writes are included in the input total for the API you use.
Divide token counts by 1,000,000 before multiplying by the unit price.
Recalculate an example with 8.3 million input tokens
The official GPT-5.6 comparison page lists these prices per one million tokens:
| Model | Input | Cached input | Output |
|---|---|---|---|
| Sol | $5.00 | $0.50 | $30.00 |
| Terra | $2.00 | $0.20 | $12.00 |
| Luna | $0.20 | $0.02 | $1.20 |
Assume that all 8.3 million input tokens are regular input and that no request triggers long-context pricing.
Input alone costs $41.50 with Sol, $16.60 with Terra, and $1.66 with Luna.
If 90% is read from cache, regular input is 830,000 tokens and cached input is 7.47 million tokens.
The input portion becomes:
| Model | Estimated input portion |
|---|---|
| Sol | $7.885 |
| Terra | $3.154 |
| Luna | $0.3154 |
This example excludes output, cache writes, and tool charges.
Track output and tool-call growth separately from cache hit rate.
Do not hide reasoning tokens inside final text
A reasoning model can consume tokens for internal reasoning even when the final answer is short.
If an API response includes a breakdown such as output_tokens_details.reasoning_tokens, inspect it.
Estimating from final-text length alone understates output usage.
Increasing reasoning effort may increase tokens, latency, and cost.
It does not guarantee higher quality, so measure success rate and total cost on representative tasks.
Use lower effort for routine work and test higher effort only on ambiguous tasks with a high cost of failure.
Treat long-context pricing as request-level data
The GPT-5.6 model pages state that a request exceeding 272K input tokens receives a 2x input and 1.5x output multiplier for the entire request.
The bill differs when 8.3 million tokens come from many small requests rather than a few huge requests.
Store per-request input length as well as daily totals.
If every request sends a huge context, revisit history partitioning, caching, and removal of irrelevant information before choosing a cheaper model.
Estimation checklist
- Whether authentication uses a subscription or API key
- Model ID and pricing verification date
- Input and cached-input breakdown
- Cache-write accounting
- Total output including reasoning
- Requests subject to long-context pricing
- Tool-call count and unit price
- Processing tier such as Standard, Batch, or Flex
Record not only “how many tokens were used,” but how many tokens fell into each pricing category and how often.
That record lets you compare model changes, cache improvements, and shorter prompts on the same basis.
