Perspectives

What an AI request really costs, and the four levers that cut it by 70 percent

Token prices fall every quarter, yet AI bills keep rising. A worked example of where the money goes in a production assistant, why agents cost far more than chat, and how caching, retrieval, routing and batching change the math.

Engineering7 min readNovember 19, 2026

Model prices have fallen steadily for three years. Most of the AI bills we review have gone the other way. Both things are true, and the gap between them is where most of the waste sits.

The reason is simple. A price per million tokens tells you almost nothing about what one useful answer costs. That depends on how many tokens each request carries, how many requests a task needs, and how much of that work is repeated for no reason. Those are design decisions, and they are usually made by default.

This piece works through a real-shaped example. The prices are illustrative, set at round numbers in the range of today’s mid-tier and small models. Check your provider’s current rates; the logic does not change.

Anatomy of one request

Take an internal assistant that answers questions over company policies and contracts. A typical request sends the model:

  • Instructions: about 1,500 tokens of system prompt, covering tone, rules, format and refusal guidance.
  • Retrieved context: about 6,000 tokens, the top ten chunks returned by search.
  • Conversation history: about 1,500 tokens from earlier turns.
  • The question: about 100 tokens.

That is 9,100 tokens in. The answer is about 400 tokens out.

At an illustrative $3 per million input tokens and $15 per million output tokens, one request costs about 3.3 cents. Nobody worries about 3.3 cents.

Now run it at 20,000 questions a day, which is modest for a company of a few thousand people. That is about $670 a day, or roughly $20,000 a month, for one assistant. Add a second and third use case and you have a line item the CFO will ask about.

The first lesson is in the proportions. The user’s question is about 1 percent of what you pay for. The answer is under a fifth. More than 80 percent of the cost is context you chose to send.

Lever one: stop paying for the same instructions twice

The 1,500-token system prompt is identical on every request. Most major providers now offer prompt caching: if the start of a request matches something sent recently, those tokens are billed at a fraction of the normal rate, often around a tenth.

In our example, caching the instructions saves about 12 percent. That is useful, and it is close to free to implement. The catch is order. Caching works on the prefix of the request, so anything that changes per user (names, dates, the retrieved text) must come after the stable part. Teams that put “Today is Tuesday and you are helping Priya” at the top of the prompt quietly disable caching for everyone.

Lever two: send less context, not cheaper context

The largest block is retrieved text. Ten chunks of 600 tokens is a common default, chosen because it seemed safe during the pilot.

It rarely is. When we measure, the answer usually draws on two or three of those chunks. The rest add cost, add latency, and often make answers worse, because models give weight to whatever is in front of them.

The fix is a reranker: a small, fast model that scores the retrieved chunks against the question and keeps only the best few. Cut the context from 6,000 to 2,500 tokens and, together with caching, cost per request falls by about 44 percent. In most systems we have measured, answer quality goes up at the same time.

This is also why retrieval quality is a cost issue, not just an accuracy issue. Poor search compensates by sending more text.

Lever three: not every question needs your best model

Look at a week of real traffic and sort it. Many questions are simple: find the clause, quote the policy, summarize a short document. A small model handles these well at a fraction of the price, in our example about a twelfth.

A router sends each request to the cheapest model that can handle it. The router can be rules (question length, document type, user intent) or a small classifier trained on your own graded examples. Route 60 percent of traffic to the small model and keep the rest on the larger one, and the combined saving across all three levers is about 74 percent. The monthly bill goes from about $20,000 to about $5,200.

Two cautions. Routing must be measured, not assumed: run your evaluation set through both paths and confirm the small model holds up on the questions you send it. And keep a fallback, so that a low-confidence answer from the small model escalates instead of shipping.

Lever four: not everything needs an answer in two seconds

Some work is not interactive at all: summarizing yesterday’s tickets, classifying a backlog of documents, extracting fields from last month’s invoices. Most providers offer batch processing for this, with results within hours instead of seconds, typically at around half the price.

The design question is simple. For every workload, ask whether a person is waiting. If not, it belongs in a batch.

Why agents cost an order of magnitude more

Everything above assumes one model call per question. Agents are different, and this is where budgets most often break.

An agent works in a loop. It reads the task, calls a tool, reads the result, decides the next step, and repeats. Each step sends the whole conversation so far back to the model, because the model holds no memory between calls.

Suppose a task starts with 4,000 tokens of instructions and context, and each step adds 1,500 tokens of tool output. A twelve-step task does not send 4,000 tokens. It sends 4,000, then 5,500, then 7,000, and so on. Added up, that is about 147,000 input tokens for one task, around 45 cents at our illustrative price, compared with about one cent for the same 4,000 tokens sent once.

Cost grows faster than the number of steps, because every step pays again for everything before it. A few practical consequences:

  • Cap the steps. An agent that is stuck will happily loop. A hard limit and a clear failure path are cost controls as much as safety controls.
  • Trim tool output. A tool that returns a full database row or a whole web page, when the agent needs two fields, is paid for on every step that follows.
  • Summarize as you go. Replacing old turns with a short summary (often called compaction) keeps context flat instead of growing.
  • Cache the stable prefix. Instructions and tool definitions are identical on every step, so caching helps agents even more than chat.

Measure cost per completed task, not per call. A cheap model that needs twenty steps can cost more than a stronger model that needs six.

When does running your own model pay off?

Sooner or later someone asks whether it would be cheaper to host an open model. Sometimes it is. The deciding number is not the price of the hardware; it is utilization.

Illustratively, suppose a GPU server costs $40 an hour and can serve 2,000 tokens per second when fully busy. That is 7.2 million tokens an hour, or about $5.60 per million tokens. Competitive. But traffic is not flat. Business assistants are busy from nine to five and idle at night. At 25 percent average utilization, the same server costs about $22 per million tokens, far more than a hosted API.

Self-hosting tends to make sense when one or more of these holds:

  • Volume is high and steady enough to keep hardware busy, such as large batch workloads.
  • Data cannot leave your environment, and the hosted options in your cloud do not meet the requirement.
  • A small, fine-tuned model does one narrow job well, and running it is cheap.

It rarely makes sense for spiky, interactive traffic, or for a team without people who already run GPU infrastructure. The engineering cost of serving, scaling and patching models is real, and it does not appear on the token invoice.

What to put on the dashboard

The teams that control AI cost track a handful of numbers, by use case, every week:

  1. Cost per completed task, not per request or per token.
  2. Tokens per request, split by component: instructions, retrieved context, history, output. Context creep shows up here first.
  3. Cache hit rate. If it drops, someone changed the prompt order.
  4. Steps per agent task, and the share that hit the step limit.
  5. Quality on the evaluation set. Every cost change is checked against it, so savings never quietly cost accuracy.

Price versus cost

The price of a token is set by your provider. The cost of an answer is set by your architecture. In the systems we review, the gap between the two is usually larger than any discount a vendor will offer, and it is entirely within your control.