Guide

How to Track AI Token Spend

A practical measurement plan for LLM token usage by model, workflow, user, agent, cost, and accepted output.

Updated 2026-05-12ai-spend / finops / cost-control
Desk note

Spend tracking fails when it starts at the invoice. The useful unit is the traced model call with enough metadata to explain who triggered it, why it ran, what it cost, and whether the result survived review.

Start with attribution

Every request should carry metadata that identifies the product surface, workflow, model, user or agent, prompt version, and environment. Without attribution, the only thing a cost dashboard can say is that money was spent somewhere.

  • Minimum tags: workflow, owner, model, prompt version, environment.
  • Useful extras: customer tier, feature flag, route, and task category.

ReceiptsRamp Economics Lab

On this siteAI FinOps topic hub

Record the cost inputs

Track input tokens, output tokens, cached tokens where available, retries, tool calls, latency, and model price at the time of the request. Preserve the pricing source or snapshot date so future readers understand the calculation.

  • Separate input and output tokens because pricing usually differs.
  • Keep retry count and tool-call count visible.

Attach outcome state

Token data becomes operational when paired with whether the output was accepted, edited, rejected, or escalated. That one field separates cost accounting from productivity theater.

  • Accepted output makes cost-per-task possible.
  • Edited or rejected output exposes prompts and routes that need repair.

Build outlier views

The first useful dashboards are not elaborate executive scoreboards. They are outlier views: highest-cost workflows, sudden jumps, high retry rates, expensive agents, and low-acceptance prompts.

  • Sort by total spend and by cost per accepted result.
  • Review the trace before changing the model or prompt.
Weekly briefing

The term is moving faster than the definition.

Tokenmaxxing keeps shifting as new receipts land. The weekly briefing tracks who's burning what, and why it matters.

Written by the desk's AI, human-reviewed before send, real numbers only.

Source trail

Current feed records connected to this guide

Generated Tokenmaxxing editorial thumbnail for The problem with AI model routing
newsTG
news

The problem with AI model routing

Techzine’s Erik van Klinken argues cross-provider model routing can quietly backfire: each hop to a cheaper model triggers a cold start that throws away prompt-cache and context savings, so recomputation can cost more than routing saves.

tokenmaxxingcost-governanceai-spend
Read note
Palantir AI sovereignty manifesto artwork
newsTN
newsmedium review

Palantir's 9-point manifesto decries tokenmaxxing and champions 'AI sovereignty'

Palantir dropped a 9-point 'AI sovereignty' manifesto on X, branding tokenmaxxing a hit of 'false progress' and taking direct aim at OpenAI and Anthropic's per-token pricing. CEO Alex Karp's jab: 'Why are they charging for tokens?'

tokenmaxxingexplainerworkplace-ai
Read note
O’Reilly Radar: The End of Tokenmaxxing artwork
newsOM
news

The End of Tokenmaxxing

O'Reilly's Mike Loukides argues the tokenmaxxing era ends once finance notices the bill: GitHub Copilot swapped unlimited access for $0.01 credits, GPT-5.5 costs 2x GPT-5.4, and Claude Fable doubles Opus 4.8 per token.

tokenmaxxingexplainerworkplace-ai
Read note
Project layer

Tools that make the guide operational

#1Direct
Routing

LiteLLM

BerriAI/litellm

An OpenAI-compatible gateway and SDK for calling many model providers with budgets, logging, load balancing, guardrails, and cost tracking.

53.2K9.6KSource-available
gatewaycost-trackingrouting
#2Direct
Observability

Langfuse

langfuse/langfuse

Open-source LLM engineering platform for observability, traces, metrics, evals, prompt management, datasets, and playground workflows.

30.9K3.2KSource-available
tracesevalscosts
#5Direct
Evaluation

promptfoo

promptfoo/promptfoo

A CLI and CI workflow for testing prompts, agents, and RAG systems across models, with evals and red-team style checks.

23.1K2.1KMIT
prompt-evalscirag
Briefing

Fresh source notes each week.

New tokenmaxxing links, model-router signals, agent usage research, and AI cost notes.