Almost every quote request we get that mentions AI has the same question buried in it somewhere: what will this cost to run? And almost every time, the client has already done the math on a pricing page. Input tokens, output tokens, multiply by expected requests, done. Fifty dollars a month. Easy.
Then the thing ships and the invoice is six hundred dollars, and nobody can explain why.
The gap isn't mysterious. It's just that token pricing is maybe a third of your real LLM production cost, and the other two-thirds live in places you don't see until the feature has actual users. I want to walk through all of it honestly — including the parts where my advice is "don't use an LLM for this."
Start with the token math, but do it properly
Model providers charge separately for input (what you send) and output (what you get back). Output is typically several times more expensive than input. Reasoning-style models charge you for internal thinking tokens too, which you never see but absolutely pay for.
Here's where estimates go wrong. People count the user's question — say 30 tokens — and forget everything else riding along with it:
- System prompt. Your instructions, tone rules, formatting rules, guardrails. In a mature feature this is often 800–2,000 tokens, sent on every single call.
- Few-shot examples. Another few hundred to a couple of thousand tokens if you're steering output quality with examples.
- Retrieved context. If you're doing RAG, you're stuffing 3–10 document chunks in. That's commonly 2,000–6,000 tokens.
- Conversation history. Turn five of a chat re-sends turns one through four. Cost per message grows as the conversation does.
- Tool definitions. Function-calling schemas are tokens too, and they're sent every call.
So that 30-token question is realistically a 5,000-token request. That's not a rounding error — it's a 150x difference from the naive estimate. Before you budget anything, write one real production-shaped prompt and count the tokens in it. That number is your actual unit.
Then multiply by the retry factor
In production you will retry. Rate limits, timeouts, malformed JSON, a tool call that came back wrong, a validation step that rejected the output. A well-built pipeline might run 1.1–1.4 calls per user-visible result. Agentic workflows that loop through planning and tool use can easily run 5–15 model calls for one user action. If you're building an agent, your real cost per task is an order of magnitude above a single chat completion. Budget for that from day one.
The costs nobody puts in the spreadsheet
This is the part that surprises people, so I'll be specific about what actually shows up.
Vector database and embeddings
If you're doing retrieval, you need somewhere to store embeddings. Embedding generation itself is cheap — it's one of the few genuinely cheap things here. The hosting isn't always. Managed vector databases typically start free or near-free and climb into the low hundreds per month once you're past a few hundred thousand vectors with real query volume. Postgres with pgvector on a server you already run is often the smarter call for small and mid-size corpora, and we recommend it more often than we recommend a dedicated vector DB.
Also: re-embedding. Every time you change embedding models or chunking strategy, you re-process the entire corpus. Plan for doing that two or three times while you're tuning.
Observability
You cannot debug an LLM feature from application logs. You need per-call tracing — the exact prompt, the retrieved chunks, the raw response, latency, token counts, cost attribution. Tools like Langfuse, LangSmith or Helicone handle this. Self-hosted open-source options cost you server time; hosted tiers commonly run somewhere between $50 and $200 a month at modest volume.
Skipping this is the single most expensive decision I see teams make. Not because the tool is pricey, but because without it you burn engineer-weeks guessing at why quality dropped.
Evaluation
If you want your AI feature to stay good after prompt changes, model upgrades and content updates, you need an eval set. That means a few hundred representative inputs with expected outputs or grading criteria, run on every change. If you grade with an LLM — the common approach — your eval runs cost real money, sometimes more per month than your production traffic during active development.
Engineering time
This dwarfs everything above and it's the line item that never makes it onto the slide. A production LLM feature is not a wrapper around an API call. It's prompt iteration, chunking strategy, fallback handling, output validation, rate-limit backoff, caching, safety filtering, and a feedback loop for bad outputs. The infrastructure around the model is the work. The model call is twenty lines.
What a realistic monthly bill looks like
Rough, honest ranges from projects in the shapes we see most often. Treat these as ballparks, not quotes — model pricing shifts constantly and your usage pattern matters more than anything.
- Internal tool, 20–50 staff, document Q&A: often $40–$150/month in model spend. Genuinely small. Observability and hosting may cost more than the inference.
- Customer-facing support assistant, a few thousand conversations a month: commonly $300–$1,200/month all-in once you include retries, retrieval, and tooling.
- Agentic workflow processing documents or running multi-step tasks at volume: this is where bills reach four figures and keep going. Cost per task, not cost per token, is the number to watch.
How to actually bring the cost down
In rough order of impact per hour of effort:
- Use prompt caching. Major providers now discount repeated prefixes heavily. Put your stable system prompt and examples first, variable content last. This alone can cut input costs dramatically on chat-style workloads.
- Route by difficulty. Send the easy 80% to a small, cheap model and escalate only hard cases to the frontier model. Classification, extraction, routing and short summaries almost never need your most expensive option.
- Cap output length. Output tokens cost multiples of input. Ask for terse answers and enforce it with max_tokens.
- Retrieve less, better. Going from ten chunks to four with a reranker usually improves quality and cuts cost.
- Cache semantically. In support and FAQ use cases, a meaningful share of questions repeat. Caching those responses is free money.
Should you self-host to save money?
Usually no. A GPU instance capable of serving a decent open model runs roughly $400–$1,500 a month depending on the card, and that's before anyone's time to run it. The break-even against API pricing sits at genuinely high, steady volume. Self-hosting makes sense when data residency, compliance or latency demands it — not as a cost play for a feature doing a few thousand calls a day. If you want a straight opinion on your numbers, that's a conversation we're happy to have through our AI & ML development team.
When the honest answer is "don't"
Some of the best advice I've given clients has been to not build the AI feature. A few cases where an LLM is the wrong tool:
- The task is deterministic. Parsing a structured file, validating a form, calculating anything. Regex and code are free, instant, and correct every time.
- You need a guaranteed answer. If being wrong 2% of the time is unacceptable and there's no human review step, rethink the design.
- Your data is a mess. RAG on badly organised documents produces confidently wrong answers. Fix the content first; it's cheaper and it helps your humans too.
- Search would do. A lot of "AI assistant" requests are really "our search is bad." Better search often solves it at a fraction of the LLM production cost.
Where LLMs do earn their keep is messy, high-volume, language-shaped work — summarising long threads, drafting replies, extracting fields from unstructured documents, classifying inbound enquiries. That last one is exactly why we built lead scoring and enrichment into Orbis Lead CRM: small, cheap, frequent calls on text a human would otherwise read manually. You can see more of the systems we've shipped in our work.
The short version
Count tokens on a real production prompt, not a toy one. Multiply by your retry and tool-call factor. Add observability, retrieval infrastructure and evals. Then add engineering time, which is the biggest number on the page. Build a cost dashboard in week one, before the surprise invoice arrives rather than after.
If you're weighing up an AI feature and want a straight, numbers-first read on what it'll cost to build and run — including whether you should build it at all — get in touch. We'll give you the honest version, even when it's smaller than you expected.