AI Glossary / AI foundations / Beginner

Inference cost

Inference Cost (AI foundations)

Definition

Inference cost is the expense of running a trained AI model to produce an output, such as an answer, a summary or a classification. It is separate from the cost of building or training the model. For hosted models it is usually billed per unit of text processed, and for self-hosted models it is the computing, energy and staff time needed to keep the model running. Definitions vary on whether support and monitoring are included.

What it means

Training a model is like building a factory. Inference is the cost of running the production line each time an order comes in. Most businesses never train a large model. They pay for inference every time a person or a system sends a request.

This makes inference cost a running cost that grows with use. A tool that costs little during a pilot with ten users can cost a great deal when a whole company uses it all day. Finance teams therefore treat it more like a utility bill than a software license.

How it works

Language models process text in small pieces called tokens. A token is roughly a short word or part of a word. Providers commonly charge separately for input tokens (what you send, including instructions and any documents you attach) and output tokens (what the model writes back). Output tokens often cost more per token than input tokens, though pricing varies by provider and model.

Several things drive the total. The first is the size and capability of the model, since larger models need more computing power per token. The second is the length of the prompt, because long instructions and pasted documents are charged every time they are sent. The third is the length of the answer. The fourth is volume: the number of requests per day. Some models that reason step by step also produce extra hidden tokens, which can raise the bill.

If you host a model yourself, the cost shifts. You pay for graphics processors or rented cloud capacity whether or not anyone is using them, plus engineers to maintain the setup. The cost per request then depends on how fully you keep that hardware busy. Common ways to lower cost include choosing a smaller model for simple tasks, shortening prompts, caching repeated content, limiting answer length and processing non-urgent work in batches.

Three practical examples

  • Finance team: A team uses a model to read supplier invoices and pull out totals and dates. Each invoice is a short input and a short output, so the cost per invoice is tiny. The monthly bill still depends on how many thousands of invoices arrive.
  • Retailer: An online store adds a chat assistant that answers product questions. Every message resends the store's long policy text as context. The retailer finds that trimming that text cuts cost without changing the answers customers see.
  • Support desk: A help desk drafts replies to tickets with a large model. It later routes simple password-reset tickets to a smaller, cheaper model and keeps the large one for complex cases. Quality stays acceptable and the average cost per ticket falls.

Think of it this way

Think of a taxi meter. You pay for each trip, and the fare depends on distance, vehicle type and how busy the roads are. A small, cheap trip costs little, but a fleet making thousands of trips a day adds up fast. The analogy stops working because a taxi fare is visible at the end of each ride, while AI usage can grow quietly in the background through automated calls that nobody watches.

Worked example

A fictional company, Larch Supply, uses a model to summarize customer emails. Assume the provider charges $2 per million input tokens and $8 per million output tokens. Each email plus instructions is 1,500 input tokens, and each summary is 200 output tokens.

Input cost per email: 1,500 / 1,000,000 x $2 = $0.003. Output cost per email: 200 / 1,000,000 x $8 = $0.0016. Total per email: $0.003 + $0.0016 = $0.0046.

Larch handles 20,000 emails a month. Monthly cost: 20,000 x $0.0046 = $92. Then the team adds a long 3,000-token policy document to every request, so input rises to 4,500 tokens. New input cost per email: 4,500 / 1,000,000 x $2 = $0.009. New total per email: $0.009 + $0.0016 = $0.0106. Monthly cost: 20,000 x $0.0106 = $212. One design choice more than doubled the bill.

Illustrative case study

Fictional case: Harbor Lane Insurance launched an internal assistant that answered staff questions about claims procedures. The pilot had 15 users and cost very little, so nobody tracked it. After a company-wide launch to 600 staff, the monthly bill was several times the forecast.

The finance lead asked for a breakdown. The data showed that every question carried the full 40-page procedures manual as context, and that many staff asked the same few questions. The team made three changes. They stored the answers to common questions and reused them, they sent only the relevant manual section instead of the whole document, and they moved simple lookups to a smaller model. They also set a monthly spending alert. The bill fell to a level the budget could carry, and the team added cost per question to its monthly review.

Common misconceptions and mistakes

Inference cost is a one-time setup fee. It is an ongoing cost that rises with every request, so a budget should model volume and prompt length, not just a launch price.

The biggest model is always the right choice. Larger models usually cost more per token, and many routine tasks work well on smaller ones, so test before assuming you need the largest.

Only the question I type counts toward the bill. Instructions, attached documents, earlier conversation history and the full answer are typically all counted, which is why prompts grow expensive.

Self-hosting is automatically cheaper. It removes per-token fees but adds hardware, energy and engineering costs, and it only pays off if the hardware stays well used.

Business use

Start by measuring a baseline. For one real task, record the average input tokens, output tokens and requests per month, then multiply by the provider's current prices. Track cost per task, such as cost per invoice or per ticket, rather than only the monthly total, so you can compare it with the value of the work saved. Set spending alerts and review usage regularly, because costs can change when prompts, models or volumes change.

The main risks are surprise bills, cost growth from automated or looping calls, and cutting cost so far that quality drops. Prices differ between providers and change over time, so check current rates before committing. Compare any saving against error rates and rework, since a cheap wrong answer can cost more than an expensive right one.

People also ask

What is the difference between training cost and inference cost?

Training cost is the large, mostly one-time expense of building a model. Inference cost is the smaller per-request expense of using it, which repeats with every use and is the main cost most businesses actually pay.

How can I reduce inference cost without losing quality?

Shorten prompts, send only relevant context, cap answer length, reuse stored answers for repeated questions and use smaller models for simple tasks. Test each change against a sample of real work to confirm quality holds.

Why is my AI bill higher than the pilot suggested?

Pilots have few users and short tests. Real use adds more users, longer documents, longer conversations and sometimes automated calls, all of which multiply token counts.

Check your understanding

In the Larch Supply example, what was the cost per email before the policy document was added?

Answer: $0.0046 per email: $0.003 for input plus $0.0016 for output.

Why did Larch's monthly bill rise from $92 to $212?

Answer: Adding a 3,000-token document raised input from 1,500 to 4,500 tokens per email, increasing cost per email to $0.0106 across 20,000 emails.

Name two things that drive inference cost for a hosted model?

Answer: Any two of: model size, prompt length, answer length and request volume.

Why track cost per task instead of only the monthly total?

Answer: Cost per task lets you compare the expense with the value of the work done and shows whether growth comes from volume or from wasteful design.

Related terms

  • Token
  • Context window
  • Latency
  • Model size
  • Fine-tuning
  • Training cost
  • Caching
  • Total cost of ownership

Learn next

Pick one AI task your team already runs and calculate its cost per task using real token counts and current provider prices. Then read about tokens and context windows to see how prompt length affects the bill, and about latency to understand the trade-off between speed, quality and cost.

  • Token
  • Latency

More in AI foundations

  • Human-level AI - Human-level AI is a term for artificial intelligence whose abilities are comparable to human abilities under a specified comparison.
  • Human-level performance - Human-level performance is the point at which an AI system matches the accuracy or quality that people reach on a specific task, measured against a stated...
  • ImageNet - ImageNet is a large, labeled collection of photographs organized by object category, built so researchers could train and compare computer vision systems.
  • Instruction-tuned model - An instruction-tuned model is a language model that has received extra training on examples of instructions paired with good responses, so it follows...
  • Intelligence - Intelligence is a broad term for capacities such as learning, reasoning, adapting and using information to achieve goals.
  • Interpretability research - Interpretability research is the scientific study of how AI models, especially neural networks, arrive at their outputs, with the aim of describing what...

Sources

Google, Machine Learning Glossary: https://developers.google.com/machine-learning/glossary ISO, ISO/IEC 22989 Artificial intelligence concepts and terminology: https://www.iso.org/standard/74296.html Stanford HAI, AI Index: https://hai.stanford.edu/ai-index The sources were consulted for the general meaning of inference and for context on how AI computing costs are discussed; the examples, analogy, worked example and case are original educational illustrations with made-up numbers. Checked 5 Nov 2026.

Previous: Inference attack Next: Inference Data

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer