Token demand
Spends on: What you send the model, and how much you let it write back.
Hides in: A prompt template that accumulated context nobody re-checked once it stopped being small.
Watch: p95 tokens per request
Six surfaces, 24 named levers, five ways a cost estimate lies, and the scoreboard that keeps them honest. This is the discipline behind the cost stage of the Handbook, not a pitch for a tool.
A per-token price on a pricing page prices one clean call. Production doesn't run one clean call per outcome. It runs however many attempts it actually takes, with retries, fallbacks, and chained agent calls that never show up in "tokens times price." That gap is why real spend routinely lands well above the number that got budgeted, discovered for the first time on an invoice instead of in a design review.
Cost isn't one number to watch. It's six surfaces, and spend hides in whichever one nobody is currently measuring. Skipping a surface doesn't make it free. It means the spend still happens, just somewhere the monthly invoice attributes to no one in particular.
Each surface hides spend a different way. None of them replace each other.
Spends on: What you send the model, and how much you let it write back.
Hides in: A prompt template that accumulated context nobody re-checked once it stopped being small.
Watch: p95 tokens per request
Spends on: Which model tier ever sees a given request.
Hides in: A feature that defaulted to the frontier model on day one and never got benchmarked against anything cheaper.
Watch: Blended cost per resolved request
Spends on: Whatever gets computed, embedded, or generated twice for the same reason.
Hides in: A single volatile token near the front of a prompt, quietly voiding a discount nobody's checked against provider usage data.
Watch: Cache-read share of input tokens
Spends on: Embedding, vector storage, and reindexing, running whether or not anyone reads the result.
Hides in: A finance review that reads this as an infrastructure line item and never connects it to the AI budget at all.
Watch: Tokens of retrieved context per query
Spends on: Every retry, fallback call, and extra step in an agent run that technically finished.
Hides in: A per-token estimate that priced one clean attempt, when production runs however many attempts it actually takes.
Watch: Retry spend as a share of total spend
Spends on: Nothing directly. This is the instrumentation layer that says which feature spent everything above.
Hides in: A cost spike that shows up as "the AI bill went up" with no feature name attached to it.
Watch: Share of spend with a resolved feature tag
Filter by when it applies (design, pre-launch, in production), then copy the visible list as a Markdown checklist.
Showing all 24 levers
Every dollar starts here: what you send the model and how much you let it generate in return. A demo prompt is small and hand-trimmed; a production prompt accumulates retrieved chunks, resent conversation history, and few-shot examples until nobody remembers why half of it is still there. None of that shows up as its own line item on the bill. It just shows up as more tokens, priced at whichever rate the input or output half happens to carry.
Not every request needs the strongest model on the price list, and paying frontier rates for a classification task a small model would have gotten right is the easiest efficiency most teams leave on the table. This surface is about which model tier handles a given request, decided per request class instead of once for the whole feature, and whether that decision is a config change or a rewrite the next time a cheaper option clears the bar.
A cache discount isn't something you get once, it's something you have to keep earning on every single call. One volatile token near the front of a prompt is enough to void it for the entire request, with no error and no warning that anything changed. This surface covers everything that stops the same computation from being paid for twice: prompt caching, retrieval caching, and reusing an answer instead of regenerating it.
Retrieval spend rarely gets counted as AI spend, because it looks like a database and infrastructure bill rather than a model one. Vector storage, embedding calls, and reindex jobs run on a schedule whether or not anyone ever reads what they produce. This is the surface most cost conversations skip entirely, right up until someone asks why the vector-store invoice keeps climbing on its own.
A retry on a malformed response, a fallback to a pricier model when the first one fails, and an extra step in an agent loop are all real, billed events that a per-token estimate never priced, because the estimate assumed one clean attempt per outcome and production runs however many attempts it actually takes. This surface is where most of the gap between the sticker price and the real invoice comes from.
None of the five surfaces above matter if nobody can trace a cost spike back to the feature that caused it, or stop that feature without waiting for a deploy window. This surface is the tagging, budgeting, alerting, and kill-switch layer underneath every other one: the difference between finding a regression on the monthly invoice and finding it the same afternoon.
No levers match that combination. Clear a filter to see more.
Every one of these produces a confidently wrong number, not an obviously broken one.
Looks like: A cost estimate multiplies a single blended $-per-token rate by a token count, as if input and output tokens cost the same.
Costs you: The estimate is wrong in a predictable direction, usually low, because output tokens are typically priced well above input tokens and a chatty feature spends most of its budget on the more expensive half.
Fix: Price the input and output halves of every request separately, using each one's own rate, before adding them back together.
See the lever: Bound output length on purpose →Looks like: A volume forecast counts real user requests only: no retries, no dev and staging traffic, no eval-suite runs against the same model.
Costs you: Every one of those omitted categories is a real, billed call. A retry-heavy feature can run several billed attempts per completed task even in a healthy system, none of which the happy-path forecast counted.
Fix: Model cost per completed task including every retry and fallback it actually took, not cost per request assuming the first attempt always lands.
See the lever: Cap retry and fallback depth explicitly →Looks like: The estimate applies a caching discount because the prompt "should" cache well, without ever pulling the actual cache-read number from provider usage data.
Costs you: A single volatile token near the front of the prompt is enough to void the discount entirely, and nothing in the system reports an error when that happens. The estimate keeps assuming a saving that stopped applying weeks ago.
Fix: Read the real cache-read share from provider usage data before building it into a forecast, and re-check it on a schedule, not once.
See the lever: Measure the cache-read share, don't assume it →Looks like: The reported figure is spend divided by API calls made, when the business actually pays for, and cares about, resolved outcomes.
Costs you: A feature with a low failure rate and a feature that silently retries three times per success can report the identical cost-per-call number, while one of them is costing three times as much per outcome that actually lands.
Fix: Divide total spend by completed-task count, not call count, and track the ratio between the two over time.
See the lever: Budget cost per completed task, not per call →Looks like: A cost projection multiplies the pilot's per-user cost by the target user count, assuming cost scales in a straight line with volume.
Costs you: Context accumulation and agent fan-out both tend to grow faster than user count, not in step with it. A chat feature that resends growing history, or an agent workflow that spawns more sub-tasks under real load, both cost more per user at scale than the pilot ever showed.
Fix: Model the growth curve for context size and step count separately from the growth curve for user count, and extrapolate each on its own.
See the lever: Give every agent run a hard ceiling →Every one of these is measurable today. None of them is trustworthy read alone. Pair it with the number next to it.
No invented benchmark numbers, no vendor price list. Just what's already documented on this site.
The cost-management framework our cost model's phases map onto. Retrieved 2026-08-24.
The capability list our cost levers are checked against. Retrieved 2026-08-24.
A Ship Audit runs this model against your specific system and tells you which surface is actually costing you money, versus which one just looks incomplete on paper.
What teams ask us before they model AI spend.
The estimate almost certainly priced one clean call per outcome, and production runs retries, fallbacks, and, for agents, several chained calls per completed task, none of which show up in a simple tokens-times-price model. See the five ways an estimate lies above; the gap is usually more than one of them at once.
Link to this answer: Why is our inference bill so much higher than what we estimated?Measuring cost per completed task instead of cost per call. It costs nothing to build beyond wiring a completion event through, and it's the lever that makes every other cost problem on this page visible instead of assumed.
Link to this answer: What's the single fastest lever to pull first?No. Start with token demand and model routing, the two surfaces every feature has regardless of shape. Add caching once volume is real, retrieval-pipeline cost once there is a knowledge base to maintain, and the failure-economics and attribution surfaces once there is enough traffic for a regression to actually cost money.
Link to this answer: Do we need all six surfaces on day one?It can, which is why every lever on this page is checked against the eval suite, not shipped on the strength of the invoice alone. A cut that drops the golden-set pass rate isn't a cost win, it's a quality regression wearing a smaller bill.
Link to this answer: Isn't cutting tokens just going to hurt quality?The calculator turns your own volume and failure-rate assumptions into a number. This page is the levers that move that number once you have it: six surfaces, 24 named changes, and the five ways the estimate feeding the calculator can already be wrong before you touch a single lever.
Link to this answer: How is this different from the AI Cost Calculator?Per-token prices change every few weeks and a table of them would be the fastest-rotting page on this site within a quarter. This page talks in ratios, shapes, and levers that stay true regardless of what a provider charges this month, and points at the calculator for the arithmetic itself.
Link to this answer: Why no per-token price table?Source: https://customlabs.io/cost/