Token kinds and how each is priced
Providers charge different amounts for different kinds of token, and they count them differently. Provantix keeps each kind it is told about, makes them mean the same thing whichever provider sent them, and prices each at its own rate.
What is kept
| Field | Meaning |
|---|---|
tokens_in |
All input tokens, including the ones read from or written to a cache. |
tokens_cache_read |
The part of the input served from a cache. |
tokens_cache_write |
The part of the input written to a cache. |
tokens_out |
All output tokens, including reasoning. |
tokens_reasoning |
The part of the output that was reasoning. |
service_tier |
standard, batch, priority or flex. |
A kind the source did not report is not recorded. It is never shown as zero, and a cache share is never shown as 0% for a source that did not report a cache.
How providers count, and what Provantix does
| Provider | What it reports | What Provantix does |
|---|---|---|
| Anthropic | Input tokens without cache reads and writes, which come as separate fields. | Adds the three, so tokens_in is the real total. |
| OpenAI | Input tokens including the cached ones. Reasoning is inside the output count. | Keeps the total as sent. |
| Gemini | Input including cached content. Thinking tokens are not in the output count. | Keeps the input, and adds thinking to the output. |
| DeepSeek, Kimi, GLM, OpenRouter | Input including cache hits (OpenAI-style). | Treated as OpenAI. |
This is written from the providers' published usage fields and the OpenTelemetry GenAI conventions. It has not yet been checked against live responses from each provider.
Two safeguards, because instrumentation does not always follow the provider's own rule:
- A source can say which it sent, with the span attribute
provantix.usage.input_includes_cacheset totrueorfalse. That wins over the provider's default. - If the cache figures add up to more than the input, they cannot be parts of it. Provantix adds them, and records the basis as
input_excludes_cache_inferred, so a judgement is never shown as a report.
The span attributes read
| Kind | Attributes, first match wins |
|---|---|
| Cache read | gen_ai.usage.cache_read.input_tokens, gen_ai.usage.cache_read_input_tokens, llm.token_count.prompt_details.cache_read |
| Cache write | gen_ai.usage.cache_creation.input_tokens, gen_ai.usage.cache_creation_input_tokens, llm.token_count.prompt_details.cache_write |
| Reasoning | gen_ai.usage.reasoning.output_tokens, gen_ai.usage.reasoning_tokens, llm.token_count.completion_details.reasoning |
| Tier | provantix.usage.tier, openai.response.service_tier, gen_ai.openai.response.service_tier |
The OpenTelemetry attributes for cache use are still marked as in development, so names may change. The SDK reads the same names, and its buildAAR({ model }) accepts tokensCacheRead, tokensCacheWrite, tokensReasoning, serviceTier and usageBasis directly. The LangSmith importer carries the cache and reasoning figures LangChain reports.
Prices
Each model's price row has the input and output prices, and optionally a cached input price, a cache write price, a reasoning price, and a batch, priority and flex multiplier (of the whole standard cost). Set them under Settings, Cost tab, Model prices, or with POST /v1/prices. Leaving an optional price out keeps what is set; sending null clears it to not set.
A price that is not set is never zero.
- A call that read from a cache, where the model has no cached price, is priced for its other parts. The cache part is named as unpriced, and the call is counted with the unpriced calls. Its cost is at least what is shown.
- A batch, priority or flex call where the model has no multiplier for that tier has its whole cost left unpriced, not guessed at the standard rate.
- A model with no price row is unpriced, as before.
Provantix ships no prices
Provantix does not invent a price. A new organization has an empty price table, and a model costs nothing, and shows as unpriced, until you enter your own rate for it (Settings, Cost tab, Model prices) or, when it is connected, the provider's own figures are pulled in. This holds for every model, however well known.
An earlier version put 11 list prices into every organization. They are removed: a row that is still exactly as it was supplied is deleted, and any figure that came from one is cleared and shows as not recorded. A price you entered or edited yourself is never touched. No call on the live platform had been priced from the removed rows.
The Cost page
The Cost page shows tokens by kind for each model: input, output, tokens from the cache, the cache share, an estimated saving, and reasoning. The cache share is over the calls that reported a cache figure, so a model whose calls did not report one reads not recorded. The saving is the cached tokens times the difference between the input price and the cached price on file, and reads no cached price set when there is none. It is an estimate from your price table, not a billing figure.
Records already stored
Nothing already stored is rewritten. Earlier records have none of these fields and price exactly as before. From the deploy that added this, new records carry them where the source reports them. Anthropic input counts on new records are the full total, so they are higher than the same call would have read before.