Which requests count
Kontext counts model requests that write tool calls or read their results. A tool call usually involves two requests. One writes the call, and the next reads its output. Each request counts once, regardless of how many tools it calls. Kontext excludes chat turns without a tool call and context compaction requests. Every request includes the session’s instructions, tool definitions, and earlier turns. A short shell command can therefore require a large request. Cost counts all that context.How the endpoint captures usage
Kontext hooks locate each session’s local transcript for the endpoint. The endpoint reads token counts in the background, outside the tool call decision. It sends them with the session data.
Only subagents with registered transcripts count. Kontext does not estimate subagent usage from the parent session.
Kontext counts each request once, even when the endpoint rereads the transcript. The endpoint fills in incomplete counts on later reads. The transcript contains the turn’s final request only after the tool finishes. Refresh Cost once the turn completes.
The endpoint sends usage metadata: the agent, model, timestamps, token counts, and tool names and IDs that link requests to tool calls. Prompts, responses, reasoning text, tool arguments, and tool output stay in the transcript. Tool call data in Explore follows your data collection settings instead.
Token types
Total tokens is the sum of the four types. When a transcript leaves a count out, Kontext keeps it unknown and flags the request as having incomplete token counts.
Pricing
Kontext multiplies each token count by the model’s rate for that type and adds the costs. Rates come from each provider’s published API prices, including the higher long-context rate some OpenAI models charge. Each request gets a price when it arrives. Later price updates do not change recorded costs. Kontext leaves a request unpriced if its model lacks a price, its token counts are missing or inconsistent, or its cache write duration is unknown. Its reported tokens still count. The dashboard warns that cost totals include only priced requests.Compare with your provider invoice
You can compare API-equivalent cost across agents, models, and people at standard API rates. Kontext excludes subscription charges, negotiated discounts, separate tool-service fees, and requests without tools. Your provider’s billing records show what you paid.If Cost is empty
- Check that the endpoint runs a CLI release with usage capture, and start a new agent session after you update.
- Widen the time range.
- Run a harmless tool call in Claude Code or Codex and let the turn finish.
- Select Refresh.