LLM cost & token optimization

LLM cost optimization: cut your AI bill 40–70%.

Semantic caching, prompt compression and model routing, with an eval score on every change so quality never quietly drops. Most of the savings show up within weeks.

Book a free scoping call 30 minutes · no prep needed
Price
From $3.5K
Timeline
1–4 weeks
Typical saving
40–70% of the bill
Quality
Eval-gated, no regressions
Recent results
  • 65% lower LLM spend, SaaS platform
  • 31% of queries served from cache
  • $14K → $5K monthly bill in 9 days
Proof

Real bills, really cut.

All case studies

A good fit if

  • Your LLM API bill is past $5K/month and finance is asking pointed questions about runway impact.
  • You raised a seed round and need to stretch runway — cutting inference cost in half is a real budget lever you control.
  • You're paying GPT-4 or Sonnet prices for work a Haiku or 4o-mini could do, but you're afraid quality will drop if you switch.

Not a fit if

  • Your LLM bill is too small for the saving to cover the work
  • You won’t allow any change to prompts or models
  • You need a new product built (that’s the Sprint)
Pricing

A fixed scope, measured in dollars saved.

Specialized engagement$3,500 – $15,000
Starting at
$3,500
Timeline
1–4 weeks
Book a free scoping call

What moves the price

  • Size of your current bill (bigger bill = bigger absolute savings = more work worth doing)
  • Number of LLM endpoints and templates
  • Whether I'm working alongside your team or solo
  • Standalone vs bundled into a Retainer

Week-long cost audits start at $3,500 (same price as a Production Audit because the work is structurally similar). Full rollouts with caching, routing, prompt compression, and dashboards scale to $15K. On engagements over $10K I'll offer a savings-indexed fee: if I don't hit a pre-agreed % reduction, you only pay the floor.

Included
  • Cost audit by endpoint and conversation
  • Semantic cache for repeat questions
  • Model routing: cheap models for easy work
  • Eval harness that proves nothing regressed
  • Before / after savings dashboard
How it works

Measure, cut, prove, then hand over.

  1. Week 1

    Cost audit

    Instrument the app, pull 7 days of traces, produce a 1-page report: top spend hotspots, expected savings per intervention, estimated engineering cost.

  2. Week 2

    Quick wins

    Semantic caching and prompt compression — almost always the biggest unlock. Ship behind a feature flag.

  3. Week 3

    Model routing

    Classifier routes easy queries to Haiku / 4o-mini, hard queries to Sonnet / 4o. Eval-gated rollout.

  4. Week 4

    Hardening + handoff

    Dashboards, runbook, monitoring. Deliver the final savings report.

What you don't risk
  • No savings claim without a test score
  • Works with OpenAI, Anthropic, Bedrock, Azure
  • Runbook so savings don’t decay
  • Starts from $3.5K

Everything that's included

  • Full cost audit: per-endpoint token usage, cost-per-conversation, top 5 spending hotspots.
  • Semantic cache layer that de-duplicates near-identical queries (typically 25–40% savings alone).
  • Prompt compression across your top 10 templates — fewer tokens, same output.
  • Model-routing logic that sends easy queries to cheap/small models and hard queries to frontier models.
  • Eval harness that proves nothing regressed — I won't ship a savings claim without a test score.
  • Before/after dashboard showing dollars saved per week.
  • Runbook for your team so the savings don't decay after I leave.

What I build with

LLM cost optimization is a precise discipline, not a heuristic. My standard three-layer stack: (1) pgvector-backed semantic caching with ~31% hit rate and sub-50ms latency, (2) prompt compression that prunes average prompt length by ~38% using lazy context loading, (3) intent-aware model routing that redirects ~62% of queries to cheaper models (Haiku, 4o-mini) while reserving expensive models for complex reasoning. Teams that implement systematic caching + multi-model routing cut average monthly API spend ~65% without dropping CSAT — but only if it's eval-gated. Without evals, you ship silent quality drops.
  • LangSmith
  • LangFuse
  • GPTCache
  • Redis
  • pgvector
  • OpenAI
  • Anthropic
  • Amazon Bedrock
  • Azure OpenAI
  • Helicone
FAQ

Common questions.

Real questions from scoping calls. If yours isn't here, ask it on a free 30-minute call.

Usually three things: the most expensive model answers questions a cheaper one could handle, the same questions are paid for again and again with no cache, and prompts carry far more context than they need. OpenAI cost optimization and Anthropic bills follow the same pattern. A one-week audit shows exactly where your LLM costs go, endpoint by endpoint.

Most teams I audit are overpaying by 2–5×. Typical outcomes: 30% from semantic caching alone, another 15–25% from prompt compression and model routing combined. 40–70% total reduction is normal on support and RAG workloads; less on pure generation workloads.

One week. You grant read access to tracing (LangSmith, Helicone, or raw API logs), I instrument what's missing, pull 7 days of data, and deliver a report with prioritized interventions and expected savings per intervention.

Not necessarily. Semantic caching and prompt compression work without any model change. Model routing is optional — I only recommend it if the eval score holds up on the cheaper model for the easy-query bucket.

Works the same. The optimization layer (caching, routing, compression) sits above the provider, so savings carry whether you're on OpenAI direct, Anthropic direct, Bedrock, or Azure.

Three: (1) caching requires you to accept some semantic fuzziness on repeat queries, (2) model routing requires a strong eval harness or quality will silently drop, (3) savings decay if your team keeps adding new prompts without re-running the audit. I deliver a runbook so your team can maintain it.

Show me the bill. I'll show you what's recoverable.

Book a free scoping call
What happens after you book
  1. A 30-minute call about your situation
  2. A one-page scope with price and timeline, free
  3. You decide: go ahead, or keep the scope and walk away