What an AI feature actually costs to run

The price per million tokens is where an AI budget starts, not where it ends. How caching, batch processing and model routing change the bill, and the costs that never appear on the API invoice.

By Nabil Ahmed7 minute read

Engineers installing F-1 engines on the Saturn V S-IC first stage in a static test stand
Engineers at NASA's Marshall Space Flight Center install F-1 engines on the Saturn V S-IC stage for testing, 1965. NASA ID MSFC-6521876, via Wikimedia Commons. Photo: NASA.

Most AI budgets start with a single number: the price per million tokens on a vendor's pricing page. It's almost never where the cost ends up. The bill for a feature in production depends on how the prompt is built, which model handles which request, whether the work has to happen right now, and a set of costs that never show up on the API invoice at all.

This matters for more than tidy accounting. When Gartner predicted that at least 30% of generative AI projects would be abandoned after proof of concept by the end of 2025, it listed escalating costs alongside poor data quality, inadequate risk controls and unclear business value. Rita Sallam, the Gartner analyst quoted in the release, put it plainly: "costs aren't as predictable as other technologies."

Here's how we break the cost down when we help a team take a feature from pilot to production.

Tokens: input is cheap, output is not

All three large API vendors price text models per million tokens, with separate rates for what you send (input) and what the model writes back (output). We checked the official pricing pages on October 25, 2026. A few examples from each:

  • OpenAI. GPT-6.1 Sol is listed at $2.00 per million input tokens and $10.00 per million output tokens. The smaller GPT-6 Luna is $0.10 and $0.50.
  • Anthropic. Claude Sonnet 5.5 is $2 input and $10 output per million tokens. Claude Haiku 5.5 is $0.10 and $0.50 for prompts up to 100,000 tokens.
  • Google. Gemini 3.8 Flash on the standard tier is $0.75 input and $3.75 output through December 31, 2026, rising to $1.50 and $7.50 starting January 1, 2027.

Three things in those pages are worth reading closely.

Output costs about five times input. That ratio holds for every model listed above. A feature that writes long answers costs more than one that reads long documents and returns a label, even if the documents are bigger. Asking for a short, structured answer is one of the cheapest changes a team can make.

Thinking counts as output. Google's page says outright that its output price includes thinking tokens. Reasoning a model does before it answers is billed, even though no user ever reads it.

A token isn't the same unit everywhere. Anthropic notes that its newer tokenizer, used from Claude 4.7 onward, produces approximately 30% more tokens for the same text. Comparing list prices across vendors, or even across model generations, without measuring your own prompts can mislead you.

Prices also move. Google's page already shows dated increases for several models. Whatever number goes into the business case should carry the date it was checked.

Three discounts that are already on the price list

Prompt caching. Most production prompts repeat a large fixed part on every call: instructions, tool definitions, examples, policy text. All three vendors charge less when that repeated prefix is served from a cache. OpenAI's documentation says that for GPT-5.6 and later, cache writes cost 1.25 times the normal input rate, and reads cost 0.1 times that rate on most models and 0.05 times on GPT-6.1 Sol. Anthropic's table follows the same shape: Sonnet 5.5 charges $2.50 per million tokens to write the cache for five minutes and $0.10 per million for a hit. Google lists a separate context caching price for each model, and some models add an hourly storage charge. The catch is that caching only pays if the fixed part comes first and doesn't change between calls. Putting today's date or the user's name at the top of the prompt quietly turns it off.

Batch processing. Not everything needs an answer in two seconds. OpenAI's Batch API offers 50% lower costs in exchange for a turnaround window of up to 24 hours. Anthropic's pricing page describes a 50 percent discount on both input and output tokens for its batch API, and Google's batch prices for Gemini 3.8 Flash are half its standard ones. Overnight enrichment, backfills, document classification and evaluation runs are all good candidates.

Routing to smaller models. The gap between model tiers is large. At list price, Claude Haiku 5.5 costs one-twentieth of Sonnet 5.5 per token, and GPT-6 Luna one-twentieth of GPT-6.1 Sol. Many requests in a real workload are routine: a clear case, a short lookup, a classification. If those go to the small model and only the hard ones go to the large model, the average cost per request drops sharply. The condition is that you can show the small model handles its share well enough, which is a job for the evaluation set, not for intuition.

A worked example

The table below is an illustrative estimate, not a quote and not a client's numbers. It uses Anthropic's list prices as checked on October 25, 2026. OpenAI's GPT-6.1 Sol and GPT-6 Luna have the same headline input and output prices, so the picture would be similar there.

Assumptions:

  • A feature that drafts replies to support cases, handling 50,000 requests a month.
  • Each request sends 6,000 input tokens: a fixed 4,000-token prefix (instructions, tool definitions, examples) and 2,000 tokens of case-specific data. It returns 600 output tokens.
  • With caching on, 95% of requests read the prefix from the cache and 5% write it (five-minute cache).
  • With routing, 70% of requests go to Haiku 5.5 and 30% to Sonnet 5.5, decided by simple rules on case type.
  • A nightly evaluation runs 200 cases on Sonnet 5.5 through the batch API, 30 nights a month, without caching.
  • About 3% of production calls are retried after timeouts or malformed output.
ScenarioWhat changesMonthly model cost
A. Pilot setupAll requests on Sonnet 5.5, no caching$900
B. CachingSame model, fixed prefix cached$544
C. Caching and routing70% of requests on Haiku 5.5$183
Nightly evaluation6,000 batch runs a month$54
RetriesAbout 3% on top of scenario C$5
Running totalScenario C plus evaluation and retriesabout $242

Two things stand out. First, the same feature can cost $900 or under $200 a month depending on decisions that have nothing to do with which vendor you picked. Most of the saving in scenario C comes from routing, and that's only safe if the evaluation set says the small model is good enough on its 70%. Second, the evaluation run costs a meaningful share of the optimized bill. That's fine. It's the line that tells you whether the other savings are real.

Change the assumptions and the numbers move a lot. Double the output length, turn on extended reasoning, or let users paste in 50-page contracts, and scenario A can grow several times over. That's why we size the estimate from a sample of real requests, not from a guess at the average.

A crawler-transporter carrying the Apollo 11 Saturn V and its mobile launcher toward Launch Complex 39A
The crawler-transporter carries the Apollo 11 Saturn V to Launch Complex 39A on May 20, 1969, at an average speed of less than one mile per hour. The engines get the attention; moving and preparing the vehicle took a whole system of its own. NASA ID KSC-69PC-0234, via Wikimedia Commons. Photo: NASA.

The costs that aren't on the API invoice

In our experience the token bill is rarely the largest line once a feature is live. The rest is mostly people and plumbing.

  • Evaluation. Beyond the tokens, someone has to keep the test set current, add the cases that failed last month, and read the nightly report. If a model judge grades the answers, its calls cost money too.
  • Retries and failures. Timeouts, rate limits and malformed responses all cost tokens, and a retry loop without a cap can multiply a bad day's bill. Agents that call tools in a loop need a step limit for the same reason.
  • Logging and observability. Readable traces of every call are how you debug and audit an AI feature. Storing full prompts and responses, at volume and for the retention period your security team requires, has its own storage and tooling cost.
  • Human review. If people approve drafts before they go out, their time is part of the unit cost. Measure it before and after launch.
  • Integration maintenance. The feature reads from and writes to systems like a CRM or an ERP. Schema changes, API version upgrades and permission changes on those systems keep arriving after launch, and each one needs an engineer.
  • Model changes. Vendors retire models and change prices. Every switch means rerunning the evaluation set, and sometimes reworking prompts.

Questions to ask before approving the budget

  • What's the expected cost per request, and was it measured on a sample of real requests or estimated?
  • Which prices does the estimate use, and on what date were they checked?
  • How much of each prompt is fixed, and is it structured so caching works?
  • Which parts of the workload can wait hours for an answer and run through a batch API?
  • Could a smaller model handle some of the requests, and what evidence would show it?
  • What caps exist on retries, agent steps and output length?
  • Who owns the evaluation set, the logs and the integrations after launch, and is their time in the budget?
  • At what monthly spend does someone get an alert, and who decides what happens next?

A feature whose cost per request is known, capped and reviewed every month is much harder to cancel for "escalating costs." Most of the work to get there happens before launch, and most of it is ordinary engineering.


Sources

Start a conversation.

A short paragraph is enough. A principal reads every message and replies within one working day.

Or email hello@farside.works. We use what you send only to reply. Privacy