179 questions
No questions match those filters.
Your LLM API bill hit 50 lakh rupees per month. How do...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansMost runaway LLM bills share the same root cause: a majority of traffic that doesn’t need the most expensive model is going to it anyway. The single biggest fix is usually routing — auditing traffic to find the share of simple, repetitive queries and sending those to a cheap small model instead, saving the bulk of spend on its own.
From there it’s a stack of smaller wins: prompt caching for the shared system-prompt prefix, since providers now charge a fraction of the price for cached tokens on repeat calls; trimming prompts that have accumulated unnecessary examples over time; caching full responses for the queries that repeat exactly; and, for predictable high-volume workloads, self-hosting an open model rather than paying per-token API rates.
A SaaS company at a 50-lakh monthly bill found 60% of its traffic was simple FAQs going to a flagship model. Routing those to a cheaper model saved the largest chunk, prompt caching added more, and caching the top 100 recurring queries closed the rest — landing at roughly 8 lakh a month, with the whole project paying for itself inside the first month.