The LLM metric that matters: cost per accepted result

A cheaper token does not guarantee a cheaper workflow. Retries, rejected answers and human correction can overwhelm a model discount. Build an economic view of the complete task, then use model routing, context design and caching to improve it without quietly lowering the acceptance bar.

An LLM usage dashboard showing tokens, caching, and cost limits

Manage the workflow, not just the API invoice

  • Log every call with tokens, cost, feature, team and customer.
  • Measure unit cost, such as cost per resolved ticket.
  • Use the smallest model that meets the quality bar, and route by task.
  • Prompt caching, batch APIs and shorter outputs cut costs further.
  • Re-test quality on an evaluation set after every change.

The invoice sees calls; the business buys outcomes

Most model APIs meter input and output by token, with separate rates and sometimes additional billing categories. A document workflow, however, may make several calls, retry a failed extraction and send the result to a person for correction. The invoice cannot tell you whether the document was accepted.

Apply FinOps at the task boundary. Calculate total model and supporting service cost divided by accepted completions over the same period. Track review effort separately, or include it explicitly in a fully loaded measure. Never improve the denominator by counting partial or rejected work as success.

Connect a task trace to the bill

Assign a task ID and connect every model call, retrieval, tool invocation and retry to it. Record model and prompt versions so a change in cost can be traced to a release. Use pseudonymous customer identifiers where possible; cost observability is not a reason to copy sensitive prompts into unrestricted logs.

  • Log every call with the model, input tokens, output tokens, latency and cost, plus the feature, team and customer that triggered it.
  • Use separate API keys or projects per product or environment, so provider dashboards can split spend.
  • Measure unit cost: cost per resolved ticket, per document processed or per active customer, not just total spend.
  • Set budgets and alerts per feature, and rate limits per customer, before usage scales.
  • Track GPUs separately if you self-host models: utilization, idle hours and cost per thousand requests.

Choose the lever that matches the cost driver

If calls per task are rising, inspect retries and agent loops before changing models. If input tokens dominate, inspect retrieval and repeated context. If outputs are discarded, inspect the task definition. Each diagnosis leads to a different intervention; a blanket token limit may simply turn valid completions into failures.

LeverWhat to doWatch out for
Model choiceUse the smallest model that meets your quality bar for each task; route easy requests to cheaper modelsTest quality on a real evaluation set before switching
Prompt and context sizeTrim system prompts, retrieve fewer and better chunks in RAG, summarize long historiesCutting context too far lowers answer quality
Output lengthAsk for concise or structured output and set a maximum output lengthOutput tokens are often priced higher than input tokens
Prompt cachingUse the provider's prompt caching for long, repeated prefixes such as instructions and documentsCache rules and pricing differ by provider
Batch processingSend non-urgent work through batch APIs, which providers typically offer at a discountResults arrive later, not in real time
Response cachingReuse answers to identical or near-identical requestsStale answers if source data changes
Retries and loopsCap agent steps and retries; stop runaway loopsAgents can call models many times per task

Run a quality-constrained cost experiment

Freeze an evaluation set that represents easy, difficult and consequential cases. Set minimum acceptance, latency and safety requirements before comparing configurations. A small model that frequently escalates to a larger one must be evaluated as a two-stage route, including both calls and the routing decision.

  1. Build an evaluation set of real examples with expected answers.
  2. Measure quality and cost per task on the current setup.
  3. Change one lever at a time (model, prompt, context, caching) and re-run the evaluation.
  4. Keep the change only if quality holds and unit cost drops.
  5. Repeat monthly; new models and prices appear constantly.

Show the distribution, not only the average

Compare ordinary tasks with the expensive tail. A small number of long conversations or looping jobs can dominate spend while leaving the average looking healthy. Put a maximum execution budget on each task and define a useful fallback when that budget is reached.

  • Spend by model, feature, team and customer, with the trend over time.
  • Cost per unit of value (per ticket, document or conversation).
  • Token mix: input, output and cached tokens.
  • Anomalies: sudden jumps in calls, tokens per call or retries.
  • GPU utilization and idle cost, if you run your own models.

Reconcile your estimates with the provider invoice, including cache writes, cache reads, batch rates and any other billed categories. Price versions matter: rerunning last month's usage at today's rates is a scenario, not the historical cost.

Response caching also needs a permission boundary. Include relevant tenant, authorization and source-version context in the cache strategy; do not share an answer simply because two users asked the same words. Invalidate stale results and measure the actual hit rate before forecasting savings.

Make the next release economically testable

For each optimization, retain the baseline, evaluation results, expected unit-cost change and rollback trigger. An acceptable result at a sustainable cost is the objective. Our FinOps for AI overview places model usage alongside GPU and infrastructure costs.

Frequently asked questions

Are output tokens more expensive than input tokens?

With most providers, yes. That is why limiting output length and asking for structured, concise answers is one of the simplest savings.

Is self-hosting an open-source model cheaper?

Sometimes, at high and steady volume. Include GPU cost, idle time and engineering effort, and compare cost per request, not just list prices.

What is prompt caching?

A provider feature that stores a long, repeated part of your prompt so later calls that reuse it are cheaper and faster.

Can you manage our AI spend alongside cloud costs?

Yes. Our FinOps service covers token, GPU and AI platform spend together with cloud infrastructure.

More questions? See all FAQs →

Quasphere team

Quasphere team

Written by the FinOps practitioners, cloud and DevOps engineers and applied AI engineers who deliver this work for our clients. About Quasphere.

Bring a task trace, not just a token total

Review where model calls become accepted business outcomes and where cost leaks into retries or rework.