What is Cost Per Inference?
Cost Per Inference is the average cost of running an AI model one time to generate a single response or prediction, accounting for compute, tokens, and any API fees involved. It's the core unit economics metric for any product built on top of AI models, since inference costs scale directly with usage.
TL;DR
Cost per inference is what it costs, on average, to get one answer out of an AI model. It's the unit economics number that determines whether an AI feature is profitable at scale.
Formula
Cost Per Inference = Total AI Compute or API Spend / Number of Inference Requests
Why It Matters
Unlike traditional software, where serving one more user costs almost nothing, AI features carry a real marginal cost every single time a model runs. That makes cost per inference the number that decides whether a product's AI features are actually profitable as usage grows, not just impressive in a demo. A team that ignores it can end up in a position where the more successful and widely used a feature becomes, the more money it loses. Tracking it also exposes which requests are expensive relative to the value they deliver, which is what makes routing strategies, like using a cheaper model for simple queries, possible in the first place. It's typically watched alongside inference latency and prompt success rate, since the cheapest model is only a good choice if it's still fast and accurate enough to be useful.
Example
A company spends $8,000 in a month on model API calls and processes 400,000 requests. Cost per inference is $8,000 divided by 400,000, which equals $0.02 per request. Switching to a smaller, faster model for simpler requests and reserving the larger, more expensive model only for complex queries is a common way to lower blended cost per inference without sacrificing quality on the requests that actually need the stronger model.
Frequently Asked Questions