What an AI Feature Actually Costs in Production
An AI feature’s real cost isn’t the per-token sticker price. It’s cost per successful user outcome at real traffic, after every retry, every fallback call, and every prompt that quietly grew, and that number typically runs five to twenty times the sticker. Cost behaves like a runtime property that drifts as usage and models change, so instrument it on every call, assert on it in the eval suite, and review the curve on a schedule.
The gap isn’t dishonesty or bad math. It’s that a demo bills a handful of clean calls against one API key, and nobody has a reason to model what happens when that call runs thousands of times a day against real, messy input. Cost deserves the same ongoing attention as latency or error rate. Checking it once at launch and moving on isn’t enough.
Why is the per-token price the wrong number?
Token counts compound in ways a demo hides. A single test call with a short prompt and a short answer looks cheap in isolation. Production input is longer (real documents, real conversation history, real edge cases that need more context to resolve), and a lot of features quietly re-send that growing context on every turn. A chat feature that starts a session at 500 input tokens and accumulates history can be paying for 5,000 tokens of repeated context by turn ten, and that growth is invisible until someone graphs cost per session instead of cost per call.
Latency and cost pull in opposite directions. The fix for a slow response is often a smaller, faster model or a shorter prompt. The fix for a low-quality response is often a bigger model or more context. Every AI feature sits somewhere on that tradeoff, and treating it as fixed instead of tunable means you’re stuck with whichever choice you made in week one, even after traffic and requirements change. The teams that manage this well track quality, latency, and cost as three dials on the same feature, not as separate concerns owned by separate people.
Retries and fallbacks bill twice, too. A rate limit, a malformed tool call, a model that returns something the parser can’t handle: all of these trigger a retry, and a retry means paying for the same request twice while the user waits for the second attempt. If your fallback chain routes to a second provider on failure, you’re now paying two different pricing schedules for one user action. None of this shows up in a per-call price estimate. All of it shows up in the actual bill.
Nobody notices a slow price change. Providers adjust pricing, deprecate cheaper model tiers, and change what counts as an input versus output token regularly, often multiple times a year. A cost model built once at launch and never revisited will be wrong within a quarter — not because anyone made a mistake, but because the ground it was built on moved.
We put concrete, modeled numbers on this gap in what AI actually costs, by workload, a reproducible cost-per-successful-outcome benchmark across four common workloads, with every price, token count, and multiplier shown.
How do you make cost a first-class metric?
The fix looks the same as the fix for any other production concern: instrument it, alert on it, and put it in the same review as correctness. Concretely, that means logging token count, model, and dollar cost on every model call, tagged by feature and by user, so “what does this cost” is a query instead of a guess. It means putting a cost assertion in the eval suite alongside the accuracy assertion, so a prompt change that improves quality by tripling token usage shows up as a tradeoff decision, not a silent win. And it means reviewing the cost curve against usage growth on a schedule, not only when finance asks a pointed question.
Before you write a line of code, it’s worth doing the back-of-envelope version of this yourself: model what it will actually cost at your expected traffic and see where the multiplier comes from.
We built CostMon because this same problem shows up one level up, across an entire stack rather than a single feature. Spend on AI, cloud, and SaaS is scattered across a dozen billing consoles, each with its own units and its own delay before a charge shows up. So “what are we actually spending” ends up being a guess assembled from memory instead of a number anyone can point to. The instinct that motivated it is the same one that should apply inside a single AI feature: cost is knowable, it’s just rarely tracked with the same rigor as the metrics people actually look at.
How does this fit into a client engagement?
When we build an AI feature, cost instrumentation goes in at the same time as the feature itself, not as a follow-up ticket after the first surprising invoice. That means per-call cost logging from day one, a cost ceiling agreed with the client before launch rather than discovered afterward, and cost as one of the numbers (alongside quality and latency, tracking the same five-to-twenty-times multiplier discussed above) we report when we hand a feature over. It’s a small amount of extra work up front, and it’s the difference between a team that can answer “is this still worth running at this volume” with data, and one that finds out the answer only when someone finally reads the invoice line by line.
Two specific mechanisms behind a bill that runs ahead of the estimate: see the field guide entries on retry-amplified spend and prompt cache never hits.
FAQ
Answers to the questions this piece raises.
01 What does an AI feature actually cost in production?
Cost per successful user outcome at real traffic is typically five to twenty times the per-token sticker price, once you include longer real-world inputs, accumulated context, retries, and fallback calls to a second provider. Most teams meet that number for the first time on an invoice, not in a design review.
02 Why do token costs balloon beyond the estimate?
Production input is longer than demo input, and many features re-send growing context every turn: a chat session starting at 500 input tokens can pay for 5,000 tokens of repeated context by turn ten. Retries and cross-provider fallbacks then bill the same request twice.
03 How do you keep AI cost under control?
Treat cost as a first-class metric: log token count, model, and dollar cost per call tagged by feature and user; put a cost assertion in the eval suite so a quality win that triples spend shows as a tradeoff; and review the cost curve against usage growth on a schedule, not just when finance asks.