How I Saved a Client ₹85K/Month on AI API Costs

2026-03-15 · 6 min read
AICost OptimizationLLMAPI

The ₹95K Wake-Up Call

A few months ago, a mid-sized e-commerce client came to me with a problem that made my jaw drop. They were spending ₹95,000 per month on OpenAI API calls — and climbing. Their product description generator, customer support chatbot, and review summarizer were all making raw API calls with zero optimization. Every single user interaction was a fresh, expensive hit to GPT-4.

By the time I was done restructuring their AI pipeline, that bill was down to ₹10,000 per month. A 97.5% reduction. No loss in quality. No degraded user experience.

Here is exactly how I did it — and how you can apply the same strategies to your own AI-powered applications.

Step 1: Audit Every Single API Call

Before touching any code, I spent two days doing something most developers skip — actually understanding what the API was being used for. I instrumented their codebase with logging to capture every call: the prompt, the model, the token count, and the response time.

What I found was staggering:

  • 68% of calls were near-duplicates. Slight variations of the same product description prompt were being sent hundreds of times per day.
  • 22% of calls used GPT-4 for tasks GPT-3.5-turbo handled identically. Things like formatting text, extracting keywords, and generating meta tags.
  • The remaining 10% were legitimately complex tasks that genuinely needed a powerful model.

This breakdown gave me a clear roadmap. If you are spending more than ₹20K per month on LLM APIs without having done this audit, you are almost certainly overpaying.

The Audit Approach

I built a lightweight wrapper that captured call metadata — the prompt hash, model used, input/output tokens, estimated cost, and calling endpoint. After running this for a week, I had a full picture of where money was going and which calls were redundant.

The key insight: most teams have no idea what their AI is actually doing. They built it, shipped it, and stopped looking at the bills until the finance team complained.

Step 2: Implement Semantic Caching

This single change cut costs by more than half. The idea is simple: if someone asks a question that is semantically similar to a question you have already answered, serve the cached response instead of making a new API call.

I used Redis with vector embeddings for similarity matching. The threshold was critical — 0.95 similarity. Too low and you serve irrelevant cached answers. Too high and the cache never hits. I arrived at 0.95 after testing with 500 real prompt pairs.

Cache Hit Rates by Use Case

After a month of production data:

| Use Case | Cache Hit Rate | Monthly Savings | |---|---|---| | Product descriptions | 78% | ₹31,000 | | Support chatbot | 45% | ₹18,000 | | Review summaries | 82% | ₹9,000 |

The product description and review summary caches performed exceptionally well because the inputs were structured and repetitive. The chatbot was lower because conversations are inherently more variable, but 45% is still significant.

Step 3: Smart Model Switching

Not every task needs GPT-4. This sounds obvious, but I see teams defaulting to the most expensive model for everything because "it works." That is like taking a helicopter to the grocery store.

I built a simple router that classified incoming requests and assigned them to the cheapest model that could handle the task:

  • Keyword extraction, formatting, meta tags → GPT-3.5-turbo (cheapest)
  • Product descriptions, support responses → GPT-4o-mini (mid-range)
  • Complex analysis, strategy content → GPT-4o (premium, used sparingly)

The trick is validating that the cheaper model actually produces acceptable output. I ran A/B tests for two weeks, comparing outputs on every task type. For keyword extraction and formatting, the outputs were indistinguishable. For product descriptions, GPT-4o-mini was 95% as good at 1/10th the cost.

This model routing alone saved another ₹22,000 per month.

Step 4: Batch Processing for Non-Real-Time Tasks

The review summarizer was running in real-time — every time a new review came in, it triggered an API call. But nobody needed instant summaries. The summaries were displayed on product pages that updated once a day.

I moved review summarization to a nightly batch job that processed all new reviews at once, grouped by product. Instead of 200+ individual calls per day, we made 20-30 batched calls per night.

Batching also enabled better prompt engineering — sending multiple reviews in a single prompt produces better summaries than processing them one at a time, because the model can identify common themes and contradictions.

Step 5: Prompt Engineering for Token Efficiency

The final optimization was unglamorous but effective — rewriting prompts to use fewer tokens while producing the same output.

Their original product description prompt was 380 tokens of meandering instructions. I rewrote it to 95 tokens with clearer, structured requirements. The responses were actually better because the model had less ambiguity to deal with.

That 75% reduction in prompt tokens compounded across thousands of daily calls. Small on a per-call basis, but it adds up to ₹1,500 per month.

The Final Numbers

| Strategy | Monthly Savings | |---|---| | Semantic caching | ₹58,000 | | Model switching | ₹22,000 | | Batch processing | ₹3,500 | | Prompt optimization | ₹1,500 | | Total | ₹85,000 |

The new monthly bill: approximately ₹10,000. The client was thrilled, and the system actually performed better because we had reduced latency through caching and right-sized the models for each task.

Key Takeaways

  1. Audit first. You cannot optimize what you have not measured. Spend time understanding your usage patterns before making changes.
  2. Cache aggressively. Semantic caching is the single highest-impact optimization for most applications.
  3. Match the model to the task. Use the cheapest model that produces acceptable output. Test this rigorously.
  4. Batch when real-time is not required. Not every AI feature needs sub-second responses.
  5. Optimize prompts. Shorter, clearer prompts save tokens and often produce better results.

If you are running AI features in production and your monthly API bill makes you uncomfortable, start with step one. The audit alone will reveal opportunities you did not know existed.

I help businesses optimize their AI infrastructure every week. If you want a personalized audit of your AI API costs, get in touch.

Archit Mittal

Archit Mittal

AI Automation Expert | I Automate Chaos. Helping businesses save lakhs through intelligent automation.

Get weekly automation insights

Join 500+ business leaders who receive practical automation tips every week.

Share:LinkedInTwitter
Book a Call →