{"head":{"title":"Which LLM API Is Cheapest? It Depends on Your Token Mix","description":"The cheapest LLM API depends on your mix of input, cached input and output tokens and on the quality you need. Senior engineers with AI-native delivery.","canonical":"https://oceanlab.in/questions/which-llm-api-is-cheapest"},"crumbs":[{"name":"Home","path":"/"},{"name":"Questions","path":"/questions"},{"name":"Which LLM API is cheapest?","path":"/questions/which-llm-api-is-cheapest"}],"question":"Which LLM API is cheapest?","answer":["There is no single answer: the cheapest model depends on your mix of fresh input, cached input and output ",{"href":"/glossary/token","text":"tokens"},", and on the cheapest model that still passes your quality bar. Prices also change often, so compare current prices on your own workload rather than trusting a ranking."],"sections":[{"heading":"Why rankings mislead","body":[["Providers price input, cached input and output separately, and the ratios differ. A model with cheap output can lose to one with cheap cached input on a workload that resends long prompts. The same total token count can cost very different amounts depending on the split."],["The real unit is cost per finished task. A cheaper model that needs longer prompts, more retries or more human fixes can cost more overall."]],"bullets":[]},{"heading":"How to compare","body":[],"bullets":[["Log a sample of real requests with their input, cached and output tokens."],["Build a small set of ",{"href":"/glossary/llm-evals","text":"evals"}," from real cases with a pass mark."],["Run the candidate models on the evals and keep the ones that pass."],["Price the passing models on your token mix using current prices, including ",{"href":"/glossary/batch-api","text":"batch"}," and caching discounts you can actually use."],["Consider ",{"href":"/glossary/model-routing","text":"model routing"},": a small model for easy requests and a larger one only for hard ones."]]}],"faqs":[{"question":"Is an open model always cheaper?","answer":"Not always. Hosted open models can be cheap per token, and self-hosting swaps token fees for machines and engineering time. Compare total cost."},{"question":"Do cheaper models hurt quality?","answer":"Sometimes, on some tasks. That is why evals come first: they show where a smaller model is good enough."},{"question":"Where can I see current prices?","answer":"Our LLM API pricing page lists provider prices with a source and a checked date. Always confirm on the provider's own page before committing."}],"terms":[{"href":"/glossary/token","label":"token"},{"href":"/glossary/model-routing","label":"model routing"},{"href":"/glossary/batch-api","label":"batch API"},{"href":"/glossary/llm-evals","label":"LLM evals"},{"href":"/glossary/llm","label":"LLM"}],"tools":[{"href":"/tools/llm-model-picker","label":"LLM model picker","detail":"Free tool"},{"href":"/tools/llm-api-cost-calculator","label":"LLM API cost calculator","detail":"Free tool"},{"href":"/tools/prompt-caching-savings","label":"Prompt caching savings","detail":"Free tool"}],"links":[{"href":"/pricing/categories/llm-api","label":"LLM API pricing","detail":"Model prices side by side, with sources."},{"href":"/pricing","label":"Pricing library","detail":"Software and API prices, each with its source and date."},{"href":"/ai-automation","label":"AI automation","detail":"How OceanLab automates company workflows with AI."}],"related":[{"href":"/questions/how-to-estimate-llm-costs","label":"How do I estimate LLM costs?","detail":"Question"},{"href":"/questions/does-prompt-caching-save-money","label":"Does prompt caching save money?","detail":"Question"},{"href":"/questions/how-to-reduce-llm-api-costs","label":"How do I reduce LLM API costs?","detail":"Question"},{"href":"/compare/ai-agent-vs-workflow-automation","label":"AI agent vs workflow automation","detail":"Comparison"},{"href":"/compare/rag-vs-fine-tuning","label":"RAG vs fine-tuning","detail":"Comparison"},{"href":"/glossary","label":"Glossary","detail":"Every term, in plain words."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}