Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. What It Actually Costs to Run an LLM Feature
AI & Machine Learning

What It Actually Costs to Run an LLM Feature

A working cost model for AI features — tokens, retrieval, retries and the human review that never appears in vendor pricing.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Token prices are the small part. Real cost per task is tokens × retries, plus retrieval infrastructure, plus evaluation, plus the human review you will need for at least the first quarter. Model that per task at expected volume before you build, and set a hard spend cap — usage grows in ways nobody forecasts.

Start from cost per task, never cost per token

Token pricing is published and reassuringly small, which is why it misleads. What matters is what one completed unit of business work costs: one enquiry triaged, one document summarised, one ticket resolved.

That figure includes the prompt, the output, the retrieval calls, the retries when the first answer fails validation, and any second model call used to check the first. It is routinely three to ten times a naive estimate.

The five lines a real model includes

  1. Input tokens, including system prompt and retrieved context — usually the largest slice for document-heavy tasks.
  2. Output tokens, priced higher than input almost everywhere.
  3. Retries and validation. Assume 5–15% of calls run twice.
  4. Retrieval infrastructure — embedding, vector storage, and re-embedding when documents change.
  5. Human review, which for the first months is frequently the biggest number on the page.

Context length is the cost lever nobody adjusts

The quickest way to halve an AI bill is usually to stop sending so much context. Teams retrieve twenty chunks because it feels safer, when five well-chosen ones give the same answer at a quarter of the cost.

Measure quality against chunk count deliberately. In most retrieval systems we have tuned, accuracy plateaus well before the point teams had settled on, and everything past the plateau is money spent on reassurance.

Cache aggressively

Two kinds of caching matter. Prompt caching, where a stable system prompt or document is charged at a reduced rate on repeat calls, is close to free money for anything with a long fixed preamble. Response caching for repeated identical questions — surprisingly common in support — removes the call entirely.

Both need deliberate design. Put the stable content at the front of the prompt and the variable content at the end, or the cache never hits.

Route by difficulty

Sending every request to the strongest available model is the most common cause of an AI feature that works beautifully and cannot be afforded. Most workloads are a mixture: 70% easy classification, 20% moderate, 10% genuinely hard.

A cheap model with a confidence threshold that escalates to a stronger one typically cuts spend by half or more with no measurable quality difference. Build the routing in from the start — retrofitting it means re-evaluating everything.

Put a ceiling on it before launch

Every AI feature should ship with a hard spend cap, per-user rate limits and an alert at a defined daily threshold. Not because anyone plans to abuse it, but because an unnoticed loop can spend a month's budget over a weekend.

Also decide in advance what happens when the cap is reached: degrade to a cheaper model, queue the work, or fail with a clear message. Choosing that under pressure at 11pm produces worse decisions.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Is it cheaper to self-host an open model?

Only at sustained high volume. GPU capacity is billed whether you use it or not, so the crossover depends on utilisation rather than request count. Below roughly continuous usage, hosted APIs almost always win on total cost including engineering time.

How much should we budget for evaluation?

Plan for evaluation to be a real line item — building a test set of a few hundred real cases with expected answers, and rerunning it on every prompt or model change. Teams that skip it end up changing prompts based on anecdote.

Do prices keep falling?

They have fallen substantially over recent years for equivalent capability, and it is reasonable to expect the trend to continue. Do not, however, build a business case that only works at a future price.

What is a typical cost per task in practice?

For classification or extraction, fractions of a penny. For a retrieval-based answer, a penny or two. For a multi-step agent, pence to tens of pence. If yours is far above those, the usual cause is oversized context or an unnecessarily strong model.

Keep reading

More on AI & Machine Learning

Start here

Want a cost model before you commit?

Send us the task and expected volume. We will come back with a cost per task, a monthly figure at your volume, and the two levers that move it most.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →