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
Generated Tokenmaxxing editorial thumbnail for Why Token Optimization Is a Gift to the Hyperscalers
newsU
newsmedium review

Why Token Optimization Is a Gift to the Hyperscalers

UncoverAlpha's Rihard Jarc argues the pivot from tokenmaxxing to token optimization — routing cheap work to cheaper models — won't shrink AI bills. It multiplies token volume, and the hyperscalers renting the compute collect either way.

tokenmaxxingmodel-routerai-spend
Read note
IT Pro source artwork
agentIP
agent

‘What we’re seeing right now is just rapid escalation in AI token spend’: Accenture tells staff to stop using AI for unnecessary tasks amid surging costs

Leaked internal audio, reported by IT Pro via 404 Media, shows Accenture telling staff to stop burning AI tokens on low-value work like turning PDFs into slide decks, as its agentic-AI lead flags a sharp jump in token spend.

tokenmaxxingagentstoken-consumption
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.

52.8K9.5KSource-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.6K3.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.

23K2.1KMIT
prompt-evalscirag
Briefing

Fresh source notes each week.

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