
AI features that looked cheap in a demo can grow into a real monthly bill once users arrive. The good news is that you can usually reduce LLM API costs without hurting quality, because most bills are driven by a few patterns: the same long prompt sent again and again, work that did not need an instant answer, and big models doing small jobs.
This guide covers the four levers that matter most, with worked examples based on OpenAI’s and Anthropic’s published prices. Checked on 5 November 2026.
Key takeaways
- Measure cost per user action before optimising; you cannot cut what you do not track.
- OpenAI lists cached input for gpt-6.1-terra at $0.05 per million tokens against $1.00 for normal input.
- OpenAI’s Batch tier is half the Standard price for gpt-6.1-terra: $0.50 input and $2.50 output per million tokens.
- Anthropic charges cache reads at 0.1x the base input price on most models and 0.05x on Opus 5.5 and Sonnet 5.5, with cache writes at 1.25x for a 5-minute lifetime.
- Routing easy requests to a smaller model is often the biggest single saving.
In this guide
- Measure first
- Prompt caching
- Batch and flex pricing
- Model routing
- Trim prompts and outputs
- A cost-cutting plan
- FAQ
Measure first
Log input tokens, output tokens, cached tokens, model and feature for every call. Then compute cost per user action, such as per answer or per document. Our AI agent observability guide covers the tooling. Look for the top three features by spend; they are usually most of the bill.

Prompt caching
If many requests start with the same long text, such as a system prompt, tool definitions or a policy document, providers can reuse that prefix at a lower price.
| Provider | How it works | Published pricing |
|---|---|---|
| OpenAI | Repeated input billed at a lower cached-input rate | gpt-6.1-terra: $1.00 input, $0.05 cached input per 1M tokens |
| Anthropic | Opt in with cache_control, automatic or explicit breakpoints; 5-minute default lifetime, 1-hour option | Cache reads 0.1x base input (0.05x on Opus 5.5 and Sonnet 5.5); writes 1.25x (5 min) or 2x (1 hour) |
To get cache hits, keep the stable part of the prompt first and identical across calls, and put the changing part (the user’s message, timestamps, retrieved text) after it. Anthropic notes that prompts below a minimum length, 512 tokens on its newer models, are not cached at all.
| Example (our arithmetic) | Without cache | With cache reads |
|---|---|---|
| 10,000-token system prompt, 100,000 calls, gpt-6.1-terra input only | 1B tokens × $1.00 = about $1,000 | 1B tokens × $0.05 = about $50, plus write costs |
Is your AI bill growing faster than your users? Eoxys audits token usage and rebuilds prompts, caching and routing. Get a real project estimate within 24 hours. NDA on request.
Batch and flex pricing
Work that can wait, such as overnight document tagging, bulk summaries or evaluation runs, can use cheaper tiers. On OpenAI’s pricing page, Batch prices for gpt-6.1-terra are $0.50 input and $2.50 output per million tokens, half the Standard $1.00 and $5.00. A Flex tier is listed at the same rates.
| Workload | Needs instant answer? | Suggested tier |
|---|---|---|
| Customer chat | Yes | Standard, with caching |
| Nightly report generation | No | Batch |
| Re-running an evaluation set | No | Batch |
| Back-office classification | Usually no | Batch or Flex |
Model routing
Not every request needs your largest model. A router sends easy requests to a small model and escalates only hard ones. On OpenAI’s list prices, gpt-6-luna input is $0.10 per million tokens against $1.00 for gpt-6.1-terra, a tenfold difference.
- Classify the request first, with rules or a small model.
- Send FAQs, extraction and formatting to the small model.
- Escalate long reasoning, sensitive cases or low-confidence answers.
- Score both paths on the same test set so savings do not cost accuracy.
Trim prompts and outputs
| Waste | Fix |
|---|---|
| Whole documents pasted into every call | Retrieve only relevant passages; see RAG vs fine-tuning |
| Long chat history resent each turn | Summarise older turns |
| Verbose answers | Set output length and format limits |
| Retries after malformed output | Use structured outputs and validation |
| Unused tool definitions | Send only tools the step needs |
A cost-cutting plan
- Week 1: add token and cost logging per feature.
- Week 2: restructure the top feature’s prompt for caching.
- Week 3: move non-urgent jobs to Batch.
- Week 4: add routing for the highest-volume request type and compare quality.
- Re-check monthly. For budgets on new builds see AI MVP development cost and AI agent cost.
FAQ
What is the fastest way to reduce LLM API costs?
Measure cost per feature, then fix the biggest one. Prompt caching is often quickest when a long system prompt or document is reused; routing simple requests to a smaller model usually saves the most overall. Moving non-urgent work to a batch tier is another quick win.
How does prompt caching save money?
When requests share the same opening text, the provider stores that prefix and bills reuse at a lower cached-input rate. OpenAI lists gpt-6.1-terra cached input at $0.05 per million tokens against $1.00 normal. Anthropic bills cache reads at 0.1x base input on most models.
Does caching change the model’s answers?
No. Anthropic’s documentation states that prompt caching has no effect on output token generation; the response is identical to an uncached call. It only changes cost and speed for the repeated part of the prompt. Cache hits need exactly identical prefixes.
When should I use batch processing?
Use it for work that does not need an instant answer: nightly reports, bulk tagging, data clean-up and evaluation runs. OpenAI’s Batch tier for gpt-6.1-terra costs half the Standard price. Keep live user chats on the standard tier.
Will a smaller model hurt quality?
Sometimes, which is why routing should be tested. Build a test set of real requests, score small and large models on it, and only route the request types where the small model performs well enough. Escalate anything uncertain to the larger model.
Can Eoxys reduce our AI API bill?
Yes. We audit token usage, restructure prompts for caching, add batch jobs and routing, and set up cost dashboards. See our AI development services. Get a real project estimate within 24 hours.
Work with Eoxys
Eoxys IT Solution LLP has built websites, apps and AI products since 2009, with 700+ projects delivered. See the work on our portfolio, or explore our AI and machine learning solutions.
Eoxys builds and tunes AI products, agents and chatbots so they stay fast, accurate and affordable. Get a real project estimate within 24 hours. NDA on request. Prefer to talk? Call +91 96678 22661.
Related reading:
- AI Agent Observability: How to Trace and Debug Your Agents
- AI MVP Development Cost in 2026: What You Pay and Why
- AI Chatbot Development Cost in 2026: India vs US vs UK
Sources
Checked on 5 Nov 2026 against OpenAI’s API pricing page and Anthropic’s prompt caching documentation.
16+ Years Building Digital Products That Ship





16+ Years Building Digital Products That Ship



