Skip to content
zelo Français

Paul · zelo · 22 · ex-42 school

Your AI bill doubled. Here's why — and how to stop it.

An OpenAI or Anthropic bill doubling month over month is rarely a usage problem: it's an architecture problem. No cache, wrong model routing, bloated prompts, redundant calls. I run 6 products with LLMs in production. The 5 levers below cut my API costs by 40–70% without touching quality. They apply in 2–4 weeks on any stack.

Three reasons your bill keeps climbing

Most teams discover these problems on next month's invoice.

  1. No cache on similar requests

    If two users ask similar questions hours apart, you pay for two inferences. Without semantic caching (Redis + embeddings), every request hits the API even if the answer is 95% identical. On high-volume products, 30 to 60% of calls are cacheable.

  2. The same model for every task

    GPT-4o or Claude Sonnet cost 10–20× more than Haiku or GPT-4o-mini. Many teams use their most powerful model for everything — including simple classifications, reformulations and content filters that don't need deep reasoning. Task-complexity routing cuts the bill by 30–50% with no perceivable quality loss.

  3. Prompts bloated with unnecessary context

    Every token sent costs money. A 4,000-token prompt where 1,200 would do is 3× more expensive on every call. Prompts naturally grow over time: accumulated instructions, untruncated conversation history, redundant examples. A prompt audit reduces context size by 20–40% without changing output quality.

5 levers to cut the bill in half

These five mechanisms apply in order — from fastest to highest impact.

  1. Semantic cache (immediate effect)

    Vectorise each request before sending it to the API. Compare against the Redis cache: if cosine similarity exceeds 0.92, return the cached response. Result: 30–60% fewer API calls on products with high volumes of similar queries (support, FAQ, reformulation). Setup: 1–2 days on a Node or Python stack.

  2. Model routing by task complexity

    Classify each task before the LLM call: complex reasoning → Sonnet/GPT-4o; classification, reformulation, short summary → Haiku/GPT-4o-mini. A simple router (keywords + prompt length) is enough to start. Typical impact: 30–50% reduction in total bill, zero degradation on complex tasks.

  3. Prompt compression and cleanup

    Audit every production prompt: remove duplicates, truncate conversation history to 3–5 turns, replace long examples with short representative ones. Set a token budget per task type. Result: 20–40% fewer tokens per call, with no change in output quality.

  4. Batching and async queues

    Non-urgent tasks (summaries, indexing, data enrichment) don't need real-time responses. Push them into an async queue and batch them (10–100 requests per batch) to use batch APIs (50% cheaper at both Anthropic and OpenAI) and smooth out load spikes. Ideal for document processing workflows.

  5. Token budgets and real-time alerts

    Set a token budget per user, per session and per feature. Trigger an alert if a feature exceeds 3× its baseline over a rolling 1-hour window. Stop call loops (a bug can trigger hundreds of calls in minutes). This safety net prevents surprise invoices and forces teams to measure their cost per feature.

6 products with LLMs in production — real numbers

Not a blog post: API costs measured on commercial products in production for 14 months.

What I can do for your team

Two engagements depending on your urgency.

Learn more: LLM in production → · RAG enterprise chatbot → · AI consulting pricing →

FAQ

Cut your AI bill — without sacrificing quality

Cost audit, cache and routing setup, or monthly retainer. Describe your situation in a few lines.

Discuss your project