· AI

Inference is most of the AI bill

Most organizations will never train a large model. They will run one every day, and that is where the money goes. A way to estimate the cost for a hosted API and for your own hardware.

Training gets the headlines because the numbers are huge and the hardware is photogenic. Most organizations will never train a large model. They will pick one that already exists and run it, and running it is where the money goes.

The reason is structural. Training or fine-tuning is a job with a start and an end, and you can cost it like a project. Inference is a service. It runs every time a user or a program asks the model something, for as long as the product exists, and the cost scales with how useful the product turns out to be. AWS made the general point back in May 2021, before the current wave of large language models: "For production ML applications, inference accounts for up to 90% of total compute costs." Treat that as a direction, since it predates today's models and says "up to."

Something else confuses budgets. The price of a unit of inference has fallen fast. Stanford's 2025 AI Index reported that the cost of querying a model performing at the level of GPT-3.5 dropped more than 280-fold between November 2022 and October 2024. People read that and assume the bill will shrink. The bills I see grow anyway, because usage grows faster than the unit price falls. Prompts get longer as teams add retrieved documents to them. A single user action turns into several model calls when an agent plans, calls tools and checks its own work. More people use the thing. When tokens are cheap, teams spend more of them.

Estimating an API bill

If you call a hosted model, you pay per token, and input and output tokens are priced separately. Look at a current price list to see the structure (AWS's Bedrock pricing page is a good example). Each model has a price per million input tokens and a price per million output tokens, and output is usually the more expensive of the two.

The estimate is arithmetic. Multiply requests per day by input tokens per request and by the input rate. Do the same for output tokens at the output rate. Add the two.

The hard part is getting honest token counts. Take a support assistant as an illustration. Each request carries 2,000 tokens of instructions and retrieved context and returns 300 tokens. At 50,000 requests a day that is 100 million input tokens and 15 million output tokens, every day. Look at which number is bigger. In a system like this, most of what you pay for is the context you send, and the answer is the small part.

Tokens per day for one assistant
50,000
2,000
300
Input per day100 million
Output per day15 million

You send 6.7 tokens for every token you get back.

The starting values are the support assistant example in this post.

Things I see left out of the first estimate:

  • The system prompt and the retrieved documents go in on every call. A long prompt is a per-request cost for the life of the product.
  • Chat history is sent again on each turn. Turn ten carries turns one to nine with it.
  • Agents multiply calls. One task can be five requests or twenty, each with its own context.
  • Retries and timeouts are billed.
  • Test suites and evaluation runs use the same meter as production.
  • Embedding your documents is a separate charge, and you pay it again when the documents change.

The same price lists show the levers that cut the bill. Batch processing is discounted for work that can wait. Prompt caching charges less for the repeated part of a prompt. And a smaller model, where it is good enough for the task, costs less per token and usually answers faster.

Estimating when you host the model yourself

The shape of the cost changes completely. You stop paying per token and start paying per hour of GPU, whether or not anyone is using it. Cloud providers sell this shape too. Bedrock calls it Provisioned Throughput and bills it hourly per model unit, with one-month and six-month commitment options.

On your own hardware, the hourly cost is the server spread over its useful life, plus power, plus cooling, plus the people who keep it running. Divide that by the tokens you serve and you have your unit cost. The divisor is the part you control. A GPU server that is busy most of the day produces cheap tokens, and the same server answering a few hundred requests during business hours produces very expensive ones. I have watched teams compare their hardware cost against an API price as if the server would run flat out around the clock.

So the estimate needs more inputs than the API version:

  • The peak requests per second you must serve. This sizes the hardware.
  • The average load across the whole day, including nights and weekends. This sets utilization.
  • The response time you have promised. This limits how many requests you can batch together to raise utilization.
  • The power and cooling the servers need, and whether your facility has it to give.

You size the hardware for the peak and you fill it with the average. The gap between the two is capacity you pay for and do not use, and for an internal tool with office-hours usage that gap is most of the day.

There are good reasons to host anyway. The data may not be allowed to leave. The volume may be high and steady enough that a busy server beats the per-token price. Or the task may fit a small model that runs on hardware you already own. Each of those is a reason you can put a number on. "We want our own GPUs" is not one.

One caveat applies to all of this. Prices move often and models change faster. Any estimate you make is good for a few months. Build the spreadsheet so you can change the rates and the token counts without starting again.

Who owns the number

The application team owns tokens per request. They wrote the prompt, they chose how much context to retrieve, and they decide how many calls a task takes. The platform team owns the price per token: which model, which provider or which hardware, and how well utilized it is. Finance owns the forecast and should get both inputs separately, because they change for different reasons.

The practical step is to log input tokens, output tokens and the model name for every request from the first day of the pilot. Pilots are where the prompt grows without anyone deciding it should, and the log is the only place you will see it happen.

Views are my own.