Don't Ask What AI Costs: Ask How Many Tokens Your Real Hourly Rate Is Worth
A breakdown of the real $/token economics from production: why an investigation report costs $3.47, how a stateless API turns a naive loop into O(N²), why output is 5x more expensive than input, and how a named antagonist from a market-research pipeline racked up $47,000 in 11 days. Every number verified, with sources. An audit checklist tool for your own books inside.
The Meter That Keeps Running While You Sleep
1865. The economist William Stanley Jevons looks at the new, thriftier steam engines and makes a logical forecast: when an engine burns less coal for the same work, Britain will start burning less coal. Instead, consumption explodes upward. Cheaper fuel means more engines, more factories, more coal. Efficiency didn't switch off appetite, it took the safety catch off it.
February 2025. After DeepSeek showed that a frontier model could be trained for a fraction of the expected budget, Satya Nadella posts the same law almost word for word: "As AI gets more efficient and accessible, we will see its use skyrocket, turning it into a commodity we just can't get enough of." A hundred and sixty years between the quotes, and the mechanics are identical: you make a unit cheaper, and you make ten times more of it.
I keep this law in mind every time I open the console and see the figure next to a single investigation report: $3.47. Not $35. Not 35 cents. Three dollars forty-seven for one report, and that number is from my own production, from twelve AI Growth Ops cases (from the author's own archive, not externally verifiable). Everyone I show it to has the same first reaction: "that's pocket change." The second reaction, when I say there won't be one report but a thousand a month: silence. Because $3.47 × 1000 is no longer pocket change, it's a budget line item. And Jevons leans toward your ear and quietly reminds you: you won't stop at a thousand, because now you can afford ten.
This article is a dissection of one $3.47. I'll break it down into tokens so you can run your own audit of your bill tonight. But first, about the one who straps the meter onto your agent's wrist and goes to sleep.
The Named Antagonist: The Quiet Analyzer↔Verifier Loop
November 2025. A team launches a market-research pipeline: four LangChain agents coordinating among themselves. The Analyzer generates content. The Verifier looks and says: "needs more analysis." The Analyzer dutifully generates more. The Verifier again: "more." And so on, with no per-agent budget ceiling, no kill switch to intercept the next call. Two polite bots endlessly asking each other for permission to continue, the most expensive exchange of pleasantries in production history.
The loop ran for 11 days. 264 hours. $47,000. The bill wasn't spotted on the dashboard. It was spotted in the invoice, after the money had already burned. The author of the post-mortem framed a diagnosis worth carving on the wall of anyone who builds agents: "Tracking how much you've spent is not the same as controlling how much you'll spend next."
Here is the face of this article's antagonist. It's not an evil model. It's an obedient bureaucrat nobody told to stop, and an owner who watched the dashboard instead of keeping a hand on the kill switch. The alert fires after the money is gone. Enforcement intercepts before the next call. Between those two prepositions, "after" and "before," lies exactly $47,000.
And before you think "that's not me," meet its quiet twin, the one that doesn't explode but just drips.
The Mirror: A Wizard Re-Reading Its Own Report
PostHog, an analytics company, has an install agent named Wizard that helps users connect the product. An engineer sits down to see what a single run costs and finds the figure: $6.67 per run, per user. The spread between the most and least expensive run is up to 150%. I'll leave the post-mortem's title as is, because there's no sharper way to put it: "How we caught our AI agent embezzling tokens."
The dissection turned up three flaws, and each is a perfect mirror of corporate waste, only in tokens:
Flaw one, Wizard's bureaucracy. On the final conclude step, the agent re-read the entire codebase to "confirm" a file it had written itself a minute earlier. Doubling the cost of an entire phase for the ritual of "what if I lied to myself." If you've ever seen an employee print the same report three times "just to be sure," you've seen this flaw in human form, except that employee at least didn't bill you for the paper.
Flaw two, compaction amnesia. After context compression the agent forgot it had already read files and re-read them, which triggered a write to the cache, which costs 12x more than reading from cache. It was paying the premium rate to remember its own thought.
Flaw three, runaway subagents. In one extreme case Wizard spawned 5 subagents, stood waiting for 5 minutes, then killed the process because two of the five never returned. Fifteen minutes and a pile of tokens, on a parade where half the orchestra never made it to the end of the street, and you paid for all of them.
The fundamental rule PostHog learned in blood: splitting a request into subagents pays off only when you save 12x more tokens than you duplicate. Otherwise "parallelism" is just a more expensive way to do the same thing. Fixing the conclude step alone cut the cost of that phase by roughly 70%.
And here's why this mirror stings: the $47,000 antagonist is a rare catastrophe, you notice it. But a $6.67 Wizard is your Tuesday. It's profitable, it works, it's "fine." That's exactly why you don't look at it.
Why One Report Costs $3.47, Not 35 Cents
Now, the math. Base price of Claude Opus (tier 4.5/4.8): $5 per million input tokens and $25 per million output. Cache read is 0.1x of input, that is $0.50 per million. A 5-minute cache write is 1.25x ($6.25/MTok), an hourly one 2x ($10/MTok). Memorize the key asymmetry: output costs 5x more than input. Which means an agent's verbosity isn't a stylistic flaw. It's a tax it levies on you for every extra word, and the invoice arrives at month's end as a single number where you can no longer see which words you overpaid for.
The official documentation has a sample example: an hour of work with 50k input and 15k output tokens = $0.625. And if 40k of input comes from cache, $0.525. Hold that benchmark. Now I'll reconstruct my $3.47 from those same verified rates, line by line, so you can check the arithmetic (the structure is my production report; the numbers reconcile to Anthropic's rates):
| Cost line | Volume | Rate | Cost |
|---|---|---|---|
| Input (fresh context, instructions) | 120,000 tok | $5 / MTok | $0.600 |
| Input from cache (repeated system blocks) | 380,000 tok | $0.50 / MTok | $0.190 |
| Cache write (5-min, first pass) | 60,000 tok | $6.25 / MTok | $0.375 |
| Output (report generation, this is where the bill lives) | 78,000 tok | $25 / MTok | $1.950 |
| Web search (line item) | ~35 queries | $10 / 1000 | $0.350 |
| Total for one investigation report | $3.47 | ||
Look at where the money ran off to. $1.95 of $3.47 is output. More than half the bill was eaten by text generation, because output is five times pricier. The $0.19 cache read is your friend; the $0.375 cache write is the very mechanism that burned Wizard when amnesia made it rewrite the cache from scratch. The same line item can be a saving or a penalty, depending on whether you're reading the cache or rewriting it.
But that's only the price of one honest pass. The real horror starts when the agent loops, and that's where algorithmic complexity enters.
Algorithmic Complexity as a Wallet: O(N²)
A stateless API remembers nothing. Every subsequent step of the agent you pay for together with the entire prior history, fresh, in full. Picture a taxi in gridlock: the car hasn't moved a meter, but the meter's digits keep clicking up, because you pay for time, not distance. A stateless agent is a taxi parked in place, reading aloud the streets already driven, charging you for each as if it had just driven it.
The math is merciless. A naive 20-step loop putting out 1000 tokens per step yields not 20,000 input tokens, as linear intuition suggests, but about 210,000 cumulative, because on step 20 the model drags all 19 previous ones behind it. This is O(N²): cost grows as the square of the step count. A Reflexion-style loop over 10 iterations burns up to 50x the tokens of a single linear pass.
Now this section's main thesis in one sentence: an investigation report is expensive not because the model is expensive, but because the model re-reads its own diary on every page. Wizard re-read the codebase. The quiet Analyzer↔Verifier loop re-read the entire dialogue for 264 hours straight. These aren't different diseases, they're one disease at different scales. O(N²) is its formula.
Architecture Beats the Model: The Lever Nobody Mentions
The instinct when the bill stings: "I'll buy a smarter model, it'll do it cleaner." That's the same as hiring a more brilliant accountant in the hope he'll rewrite the same invoice faster for 264 hours straight. The problem isn't the executor's IQ, the problem is that nobody told him to stop. The data say it unambiguously: the real lever is architecture, not the model's price tag.
The academic proof. The BudgetMLAgent system cut the average cost per run by more than 94%, a final figure of $0.054 per task against a baseline of about $0.93 for single-agent GPT-4, and it did so not with a pricier model but the opposite: a cheap/free model carries most of the agentic calls, and escalation to the expensive one kicks in only on failure. Cheap-model-first, escalate-on-failure. A related method (AgentDiet, trajectory reduction) lowers coding baselines too: $1.277 → $0.933 on Claude 4 Sonnet and $0.701 → $0.449 on Gemini 2.5 Pro. Not the model's genius, the discipline of routing.
And the context for why this isn't theory. Opus 4.5 itself dropped 67% in price at release ($15/$75 → $5/$25) and at the same time started doing the same work with fewer tokens: where Sonnet 4.5 put out ~500 output tokens, Opus 4.5 often fit in ~120 (hence "76% fewer tokens"), plus ~50% fewer tool calls, and with Tool Search the savings compounded all the way to 85%. A double discount: cheaper per token and fewer tokens. The real cost per task fell far deeper than the headline 67%.
Look at the spread of real production benchmarks from ZenML's database of 1,200+ deployments, and lay your $3.47 alongside them. Because the bill, in the end, you'll notice not on the dashboard but right here, in the "cost per unit" line:
| Case | Cost per unit | What they did |
|---|---|---|
| Riskspan (private-credit deal processing) | < $50 / deal | 90x drop, weeks → days |
| PGA Tour (article generation) | $0.25 / article | -95% cost, 800 articles/week |
| Care Access | -86% cost | prompt-caching redesign |
| BudgetMLAgent (academic) | $0.054 / task | -94%, cheap-first + escalation |
| GetOnStack (counterexample) | $127 → $47,000 | unnoticed infinite loop, 11 days |
| My investigation report | $3.47 / report | full context + web search, no aggressive routing |
Shopify, in the same database, recorded separately: tool outputs eat 100x more tokens than the user message. That is, it's not your prompt that bloats the bill, it's what the tools return back into context. And the same report run through different models (say GPT-4o at its $2.50/$10 per million versus Opus) swings $/report by 5-10x before any architectural change at all. Routing is the first lever. Cache is the second.
Counter-Pressure: When Architectural Optimization Is a Waste of Time
Not every team paying $3.47 a report does it out of naivety. If your pipeline processes 20 reports a month, not 20 thousand, then architectural optimization means spending 40 hours of engineering time to save $62 a year. The cognitive overhead of cheap-first routing (two model tiers, escalation logic, separate testing of each path) is real: BudgetMLAgent emerged in an academic lab where the cheap model is GPT-3.5 and escalation is hand-wired for a specific domain. Porting that to production without infrastructure is not "just change a line in the config."
But here's what that doesn't explain: O(N²) grows independently of volume. The $47,000 Analyzer↔Verifier loop started as a small pipeline, and that's exactly why it went unnoticed. Architectural discipline at low volumes isn't about saving cents. It's that the same pattern that "works fine" at 20 reports will, at 2,000, not merely cost more: it will cost nonlinearly more, because the context window will be larger, the iterations more numerous, and there still won't be a kill switch. The question isn't "is it worth optimizing now," the question is "do you know where your growth will break your bill."
Observability ≠ Control (and Why Jevons Always Wins)
Anthropic leaves on the table a lever most teams don't pick up: the Batch API gives exactly -50% on both input and output (Opus 4.5 in batch = $2.50/$12.50), and these discounts stack with prompt caching. That same $3.47 report of mine, run not synchronously but as a time-insensitive batch job with a warm cache, would cost noticeably less. So why is the default a synchronous, expensive call? Because it's habitual. Because "I need it now." Because nobody sat down and did the math, and the laziness to count has a tariff too, they just bill it to you at the end of the month.
And here the circle with Jevons closes. The GetOnStack counterexample is a scene out of the '90s: a family watches the disk of the electric meter spin while a forgotten heater hums in an empty room. Nobody sees the cost until the bill arrives: $127 for the first week, $47,000 for the fourth. The heater (the infinite loop) hummed in a room nobody entered. The dashboard showed the number. What should have stopped it was the execution layer, a kill switch, not a human reading notifications in the morning over coffee. People like that always notice the bill not on the dashboard.
And here's the dark finale of Jevons' law for you personally. Suppose you did everything right: cache warm, routing smart, batch enabled, and $3.47 turned into $0.40. Victory? No. Because now running a report is so cheap that you run it not when needed but when the mood strikes. Every optimization isn't a saving. It's an indulgence: permission to let yourself not think once more before hitting "run." The unit price falls; the bill rises. Jevons wasn't wrong on coal and isn't wrong on tokens.
The Tool: A Checklist to Audit Your $/report Tonight
Enough mirror. Here's the kill switch. Eight questions for your most expensive agent, go through them not tomorrow, today. Seven of them save cents. The eighth saves the company, and it's the one everyone leaves for last:
| # | Question for your agent | Red flag → action |
|---|---|---|
| 1 | What % of the bill is output, not input? | >50% → cut verbosity, ask for shorter answers in the system prompt |
| 2 | How many cumulative input tokens over N steps? | Grows as O(N²) → set a step limit and compaction without re-reading |
| 3 | Does the agent re-read what it just wrote itself? | Yes → cut the "confirm" step (PostHog: -70% on the phase) |
| 4 | Is your cache being read or rewritten? | Writes more frequent than reads → fix compaction amnesia (a write is 12x pricier) |
| 5 | Does a subagent save ≥12x tokens vs. duplication? | No → don't split the request, it's more expensive |
| 6 | Does a cheap model carry the routine, the expensive one only escalation? | No → adopt cheap-first (BudgetMLAgent: -94%) |
| 7 | Is this a synchronous call or a batch with a warm cache? | Synchronous when it needn't be → batch (-50% input and output) |
| 8 | Is there a per-agent budget and a pre-call kill switch? | No → this is your future $47,000; set enforcement, not an alert |
Question #8 is the most important. All the rest save cents. The eighth saves you from the invoice you notice 11 days later, after the money has burned, not on the dashboard.
The Hard Finale
Before you write off $3.47 as your own carelessness, look at how the product is built. Anthropic's and OpenAI's API pricing has no line-item breakdown by default: you see one number at month's end, not "$1.95 for output, $0.375 for cache write." The Batch API, which gives -50% on input and output, is buried in the docs far from the default quick-start. Output costs 5x more than input, not because generation is 5x harder, but because that's how the pricing model is built, one that rewards verbose agents and punishes those who don't count. A company that sells tokens has a direct interest in you buying more tokens. That's not conspiracy, it's just a business model worth keeping in mind when you read the documentation.
There's another divide too: the FinOps teams of large corporations have dedicated people, monitoring tools, and budget cycles for this work. A solo founder or a small team pays double, both for unoptimized tokens and for the absence of a system that would automate this audit. The structural advantage here isn't intelligence, it's resources for observability.
So $3.47 a report isn't the price of "carelessness." It's the price of a system designed without a line-item bill by default. Half the sum is verbosity you didn't ask to shorten (and that nobody showed you as a separate line). A quarter is cache being rewritten because the agent forgot what it thought a minute ago. The rest is tools returning a hundred times more than you asked for. Each of these mechanisms is in the documentation. But the documentation is written after you've already launched the agent.
And here's the last scene. The film "In Time," 2011: everyone has a green counter implanted on the right forearm, and when it hits zero the person simply drops dead in the middle of the street. Time is the currency: coffee is paid for in minutes, a bus in hours. Your agent has a counter running on its "wrist" too, only in tokens. And while the quiet Analyzer↔Verifier loop asks itself permission for "more analysis," that counter runs. 11 days. $47,000. You'll notice the bill not on the dashboard, you'll notice it in the invoice, when there's nothing left to stop.
The question isn't how much one investigation report costs. The question is whether anyone is standing by the kill switch, or whether you, like that owner, are watching the dashboard and waiting for the bill to arrive. The counter is running right now. While you finished reading this sentence, it clicked once more. And you'll pay for that click too.
Frequently asked
What is Jevons' paradox and what does it have to do with the cost of AI?
It's an 1865 observation: when technology makes a resource more efficient, consumption doesn't fall, it rises, because the cheaper unit takes the safety catch off appetite. In tokens, this means every optimization of a report's cost becomes a license to run it more often, so the total bill grows rather than shrinks.
Why are output tokens more expensive than input tokens?
In Claude Opus, input costs $5/MTok and output costs $25/MTok, 5x more. Not because generation is five times harder, but because that's how the pricing model is built. The consequence: an agent's verbosity is a direct tax, and more than half of a typical bill is eaten by text generation itself.
What does it mean that an agent's cost grows as O(N²)?
A stateless API remembers nothing, so at every step you pay for the entire prior history all over again. A naive 20-step loop at 1000 tokens a step yields not 20,000 but about 210,000 cumulative input tokens. Cost grows as the square of the step count, the agent pays for every page of the diary as many times as it flips through it.
How is observability different from control?
An alert says you spent, after the money is already gone. Enforcement says you will not spend, intercepting before the next call. The dashboard showed the number the whole time the Analyzer↔Verifier loop spent 11 days grinding out $47,000; what should have stopped it was an execution layer with a pre-call kill switch, not a human reading notifications in the morning.
What exactly do I do to avoid getting a $47,000 invoice?
Most important, set a per-agent budget and a pre-call kill switch (enforcement, not an alert). Then: cut output verbosity, cap steps and compaction without re-reading, remove the confirm step, fix cache amnesia, don't split into subagents without 12x savings, and adopt cheap-model-first with escalation (BudgetMLAgent: -94%).
Comments
Signed-in readers only — to keep it human, not a bot swamp.