Every AI bill is built on tokens. Understanding and tracking token consumption is the difference between a bill you can manage and one you can only pay. The trap is that most teams track only the tokens they can see, and miss the ones that quietly dominate the cost.

Input tokens are the hidden half

You pay for the tokens you send as well as the tokens you receive, and on many applications input dominates. A summarization task returning two hundred tokens might send four thousand tokens of document. Tracking only output tokens, the visible half, produces cost estimates that run consistently low. Track both, and track the ratio between them per feature.

Where tokens accumulate

Three patterns drive token consumption. Conversation history that resends the full exchange on every turn, retrieval that stuffs documents into each request as context, and system prompts that carry instructions and examples on every single call. Each is invisible per call and substantial in aggregate. Tracking tokens by feature shows which pattern is driving which cost.

From tokens to cost per outcome

Raw token counts are an input, not an answer. The useful step is grouping the tokens that go into one business outcome and pricing the outcome, not the call. A task that takes many token-heavy calls costs more than one that takes few, and cost per outcome is the number that makes that visible and worth optimizing.

Controls that follow from tracking

Once you can see where tokens go, the controls are clear. Cap conversation history with a token budget and summarize older turns. Tune retrieval to send the most relevant context rather than the most context. Compress system prompts to what every call genuinely needs. Each control targets a token pattern the tracking revealed.

Tokens are the atom of AI cost. Track both halves, group them by outcome, and the bill stops being a mystery and becomes a set of specific, addressable numbers.