AI & LLM cost
Per-request cost
The fully-loaded cost of a single API call (input tokens, output tokens, and any tool calls) expressed as one number per request or per completed task.
Last updated
Definition
Per-request cost turns token-level pricing into a number a product or engineering decision can be made against: "this feature costs $0.004 per completion" is actionable in a way that "$3 per million output tokens" is not on its own. It's the AI/LLM equivalent of unit economics, and it's most useful when tracked per feature or per workload rather than as one blended average across everything the product does.
Setting a rough expected per-request cost before a feature ships is what makes a later regression (a prompt that grew without anyone noticing, a model swap that didn't get evaluated for cost) visible immediately instead of discovered a month later on the invoice.
Where it shows up
Per-request cost is a computed figure, built by multiplying a single request's input and output token counts, and any tool calls it made, by the provider's own published per-token rates, using the same usage object the API response already returns for that one call, before any markup.
What makes it expensive
This gets expensive fast: tracking one blended average across an entire product instead of a per-feature figure, which hides a single feature's cost regression inside an otherwise stable-looking total. Write down what a feature is expected to cost per request before it ships. Without that number there is nothing for a regression to fail against.
Related
Token spend moves every day.
Model prices and rate limits change between invoices. CostMon tracks your AI spend daily, so a change shows up before the bill does.