There's a quiet price war happening in AI right now, and most of it isn't coming from OpenAI, Anthropic, or Google. It's coming from a wave of open-weight models - several out of Chinese labs - that have spent the last year closing the capability gap with the frontier proprietary tier while undercutting it on price by one, sometimes two orders of magnitude. If you're still routing every request to a $5-input/$25-output flagship model by default, you're probably overpaying for a meaningful chunk of your traffic.
None of these are toy models. They're scoring competitively on real benchmarks - SWE-bench, GPQA, long-context retrieval - against models that cost 10-30x more per token. If you've been searching for the cheapest LLM that won't force you to compromise on quality, this is where to start. Here are five worth putting in your rotation, plus the actual case for when not to reach for them.
1. DeepSeek V4 (Flash and Pro)
DeepSeek has been the pace-setter of this entire price war. DeepSeek V4 Flash runs at roughly $0.14 input / $0.28 output per million tokens in most hosted comparisons - a fraction of a cent for most real requests - while still landing in the "GPT-4o class" range on general capability according to several independent evaluations. The Pro tier steps up in reasoning quality for closer to $0.87--$2 per million output tokens depending on host, still dramatically cheaper than any Western frontier model.
Best for: high-volume production traffic, classification, summarization, anything where you're sending millions of requests a month and the per-token cost compounds fast. Trade-off: where you host it matters more than with a single-vendor API - quality varies between providers depending on whether they serve the full-precision weights or a quantized version to cut costs further.
2. Qwen3 (Flash / Max)
Alibaba's Qwen line spans an unusually wide range, from ultra-budget tiers around $0.01--$0.28 per million tokens up to Qwen3 Max at roughly $3.90 output for a 262K-context, production-grade option. That range is the actual selling point: you can route trivial tasks to the cheapest tier and step up to Max only when a request actually needs it, all within the same model family and (in most hosts) the same API shape.
Best for: teams that want one model family covering the entire spectrum from "cheap classifier" to "solid general-purpose model," without switching vendors as requirements change. Trade-off: the cheapest tiers are genuinely built for simple tasks - don't expect flagship-level reasoning at the $0.01 price point.
3. GLM-5.2 (Zhipu)
GLM has positioned itself as a strong reasoning and structured chain-of-thought option, priced around $1.40 input / $4.40 output per million tokens in most current listings - still well under half of Claude or GPT flagship pricing, with several benchmarks putting its GPQA Diamond and coding scores in genuinely competitive territory against proprietary models. It's also frequently cited as one of the stronger options for Chinese-language tasks specifically, if that's part of your workload.
Best for: reasoning-heavy tasks and structured output where you want more than a budget model but don't want to pay flagship prices. Trade-off: some benchmark claims for GLM have drawn conflicting secondary reports - worth spot-checking against your own eval set rather than taking a single number at face value, which is generally good practice with any model but especially here given the pace of updates.
4. MiniMax (M2 / M2.5 / M2.7)
MiniMax has quietly become one of the better price-to-coding-capability ratios on the market, with pricing in the $0.30 input / $1.20 output range depending on version, and evaluations placing MiniMax M3 as one of the cheapest models to clear 80% on SWE-bench Verified. If your workload is code-heavy and cost-sensitive, this is one of the first places to look before defaulting to a flagship model.
Best for: coding agents and dev-tooling workloads where you need real capability but flagship pricing doesn't make sense at your volume. Trade-off: less brand recognition and a smaller surrounding ecosystem than DeepSeek or Qwen, so tooling and community support can be thinner.
5. Kimi (K2.5 / K2.6)
Moonshot's Kimi line sits at the more premium end of this list - output pricing in the $3--$15 range depending on version and host - but it earns the spot with genuinely large context windows (up to 256K tokens) and an unusually low cache-hit rate (some hosts quote around $0.07 per million tokens for cached content), which matters a lot if your application reuses long system prompts across many requests. Treat it as the "expensive by this list's standards, still cheap by frontier standards" option.
Best for: long-context workloads with heavy prompt reuse, where the cache-pricing advantage adds up fast. Trade-off: less of a true budget option than the others here - pick it for the long-context and caching story specifically, not raw price.
Where cheap models actually fall short
Worth saying plainly: none of this means you should route everything to the cheapest model available. Cheap open-weight models tend to do well on well-defined, bounded tasks - classification, extraction, summarization, routine code generation - and less well on tasks that require holding a very long, ambiguous chain of reasoning without drifting, or agentic workflows that need to self-correct across many steps. The realistic pattern most teams land on isn't "replace Claude and GPT," it's "reserve Claude and GPT for the 10-20% of requests that actually need that capability, and route the rest to something an order of magnitude cheaper."
Using an AI Gateway: Getting Five Cheap Models in One
That routing pattern is simple to describe and genuinely annoying to build yourself. Each of the five providers above has its own SDK quirks, its own auth, its own rate limits and uptime characteristics - and if you're hand-rolling the logic that decides "is this request simple enough for DeepSeek Flash, or does it need Claude," you're maintaining infrastructure that has nothing to do with your actual product.
This is exactly the kind of problem an AI gateway like SayGM is built to absorb - if you're not familiar with the term, an AI gateway is a single, unified API that sits in front of multiple model providers so your application talks to one endpoint instead of five. SayGM's OpenAI-compatible API means swapping in a cheaper model for part of your traffic doesn't mean rewriting your request logic. If you're still prototyping, most providers on this list - along with SayGM itself - offer a free LLM API tier for testing before you commit real spend - and SayGM's cascade mode handles the failover case directly: define a primary and fallback model, and if one is slow, rate-limited, or down, the request automatically routes to the next one, without your application needing to know or care which model actually answered. Fusion mode goes further for cases where cost isn't the only concern - querying a cheap model and a frontier model on the same prompt and merging the outputs, useful when you want a budget model's speed with a spot-check from something stronger.
There's a privacy angle here too that's easy to overlook: when you're routing sensitive prompts across five different providers to save money, you're also trusting five different companies' infrastructure with that data. SayGM routes every request - regardless of which underlying model answers it - through a hardware-verified TEE, so prompts are sealed end-to-end whether you're hitting a $0.14 budget model or a $50 flagship one. Cost optimization and prompt privacy end up being the same integration instead of two separate problems to solve.
If you're building the kind of routing logic described above, SayGM's model leaderboard is worth checking before you commit to any single "cheap" model - it benchmarks exactly this tier of models on fixed-seed MATH-500 and GPQA-Diamond suites with per-question pass/fail transparency, so you can see where a budget model actually holds up versus where it quietly falls apart on your kind of task.
Whether you end up building this yourself or reaching for a unified API like SayGM, the underlying move is the same: stop treating "which model" as a one-time decision and start treating it as a routing problem.
What's your current cost-routing setup look like - one model for everything, or do you already split traffic by task?
FAQ
What is the cheapest LLM API available right now?
Among hosted options, DeepSeek V4 Flash is generally the cheapest LLM with real production quality, priced around $0.14 input / $0.28 output per million tokens in most comparisons. Even cheaper ultra-budget tiers exist (some Qwen and GLM variants dip near $0.01 per million tokens), but those are built for simple, bounded tasks rather than general-purpose use.
Is there a free LLM API I can use for testing?
Yes - most of the providers above offer a free LLM API tier with rate limits for prototyping, including free-tier access to smaller open-weight models. It's a reasonable way to validate a model fits your task before moving to paid, production-volume pricing.
What does "OpenAI-compatible API" mean?
An OpenAI-compatible API mirrors the request and response format of OpenAI's API, so you can point your existing OpenAI SDK code at a different provider (or a gateway like SayGM) just by changing the base URL and API key, without rewriting your application logic.
What is an AI gateway?
An AI gateway is a unified API layer that sits between your application and multiple LLM providers, letting you access several models - cheap and frontier alike - through a single integration, with built-in routing features like failover and load balancing instead of you having to build that logic yourself.
What's the difference between a unified API and calling each model provider directly?
Calling providers directly means managing separate SDKs, API keys, and rate limits for every model you use. A unified API consolidates that into one endpoint and one billing relationship, which is especially useful once you're routing traffic across multiple cheap models and a frontier model based on task complexity.
Top comments (0)