Skip to content

The cheapest open-weight model API: DeepSeek, Kimi, GLM, Qwen and gpt-oss compared

Published 11 min read

The cheapest way to call an open-weight model like DeepSeek V4, Kimi K3, GLM-5.2, Qwen3 Coder or gpt-oss-120b is to buy it from whichever host currently serves the genuine weights at the lowest price, not from a fixed provider. Because the weights are public, many hosts compete on the same model, and prices for one model can differ several times over. The catch is that the cheapest quote is not always the same model: quantization, outdated checkpoints and capacity that never materializes all hide behind a low price.

What does “open-weight” actually mean?

An open-weight model is one whose trained parameters are published for anyone to download and run. That is narrower than “open source”: you usually get the weights and an inference recipe, sometimes a technical report, but rarely the training data or the full training code. What matters for an API buyer is the license, because it decides who is allowed to host the model commercially. DeepSeek V4 and GLM-5.2 ship under MIT, gpt-oss-120b and Qwen3-Coder-Next under Apache 2.0, and Moonshot’s Kimi K2 family used a modified MIT license. Permissive licenses are why each of these models is served by many independent hosts, not just its maker.

Compare that with a closed model, where the maker’s own API (plus perhaps a cloud partner or two) is the only supply. Closed models have one price. Open-weight models have a market, and markets have spreads.

Why do providers charge different prices for the same open-weight model?

Hosts pay different amounts for GPUs, run different inference stacks, batch requests differently and target different customers. A host optimized for raw speed charges a premium; a host with idle capacity overnight may undercut everyone. On top of the honest reasons, there are three dishonest or careless ones you need to watch for, because they all show up as “cheaper.”

  • Quantization. Running a model at lower numeric precision cuts memory and cost. Some models are designed for it: gpt-oss-120b ships in MXFP4, and DeepSeek V4 ships in FP4 and FP8. Trouble starts when a host quantizes further than the maker did, or uses a poor quantization recipe. The model still answers, but tool calls get flakier, long-context recall degrades and code compiles less often. You rarely see this in a single prompt; it shows up in your error rates a week later.
  • Outdated or substituted weights. Model families move fast. A host may still serve an earlier checkpoint under the new name, or a fine-tune, or a smaller sibling. The model id in your request is a label, not a guarantee.
  • Capacity that is not there. A low advertised price only matters if the host actually serves your request at that price. Some quotes are effectively bait: the host fails, times out or rate-limits once real traffic arrives, and your client falls back to something more expensive anyway.

The first-party API is not automatically the safe choice either. DeepSeek’s own API, for example, was reported in mid-2026 to return recurring 429 and 503 “server busy” responses at peak times, and DeepSeek announced plans for peak and off-peak pricing. Alibaba bills Qwen3-Coder-Next in tiers by request size, so one large-context request is billed entirely at a higher per-token rate. And gpt-oss-120b has no first-party API at all, so its price is set purely by the hosting market. If you need to understand how input, output, cached and reasoning tokens combine into a bill, start with LLM API pricing explained.

Which open-weight model should you use?

The five models below cover most production jobs. The descriptions draw on each maker’s published specs and independent evaluations as of mid-2026; open models move quickly, so treat rankings as a starting point and run your own evals on your own prompts. Live prices for each, on both lanes, are on the models page.

Five open-weight model families at a glance (maker specs, mid-2026)
ModelMaker and licenseSize and contextGood forWatch out for
DeepSeek V4 (Pro, Flash)DeepSeek, MITPro 1.6T total / 49B active; Flash 284B / 13B; 1M contextCoding and reasoning (Pro); high-volume general work (Flash)Text-only; independent evals flag verbosity and weak factual recall
Kimi K3Moonshot AI; K2 family used modified MIT2.8T total; 1,048,576 context; native image inputHard agentic and web-dev tasks near the closed frontierVerbose and slow from the first-party API; check the K3 license terms
GLM-5.2Z.ai, MIT744B total / 40B active; 1M contextAgentic coding inside coding agents; long agent trajectoriesVerbose at max thinking; looser guardrails than US reference models
Qwen3 Coder NextAlibaba, Apache 2.080B total / 3B active; 262,144 native contextBudget engine for coding agents; tool use; local runsWeaker on terminal-heavy tasks; non-thinking by design
gpt-oss-120bOpenAI, Apache 2.0116.8B total / about 5.1B active; 131,072 contextCheap, fast reasoning; classification, extraction, mathHigh hallucination rates on factual questions; pair with retrieval

For coding and coding agents

GLM-5.2 is the open model that held up best as an everyday agent inside coding harnesses in 2026: Z.ai trained its million-token context on long coding-agent trajectories, and it posted strong agentic-coding results such as Terminal-Bench 2.1. DeepSeek V4 Pro is the other heavyweight, with DeepSeek-reported SWE-bench Verified and LiveCodeBench numbers in frontier territory, though NIST’s independent evaluation scored it lower than the self-reported figure. For volume, Qwen3-Coder-Next is the cost play: with roughly 3B active parameters it is cheap to serve, it was trained on real repository tasks across several agent scaffolds, and it became a default budget model inside tools like Cline. A practical pattern is Qwen3 Coder or V4 Flash for routine edits and GLM-5.2 or V4 Pro when the task is hard. If you run these through an IDE or CLI agent, the connect guides show the three fields each tool needs, and what AI coding agents cost per month shows how model choice drives the bill.

For agents, tool use and browsing

Kimi K3 is the strongest of the group on hard agentic benchmarks in Moonshot’s own reporting, and independently it took the top spot on LMArena’s WebDev arena at launch. It is also the most expensive at its maker’s list price and notably verbose, so it earns its place on the hardest steps rather than every step. GLM-5.2 is the more economical default for multi-step tool use. Whatever you choose, verbosity matters as much as per-token price: a model that writes three times as many tokens per task can cost more overall despite a lower rate.

For chat, extraction and high volume

gpt-oss-120b is the efficiency pick: it fits on a single 80GB GPU, has adjustable reasoning effort (low, medium, high) set in the system message, and is among the fastest-served open models. Its weakness is factual recall, so ground it with retrieval or tools for knowledge work. DeepSeek V4 Flash is the other volume workhorse: DeepSeek says its reasoning closely approaches V4 Pro at a fraction of the cost.

For long context

DeepSeek V4, GLM-5.2 and Kimi K3 all offer million-token windows, and both DeepSeek and Z.ai built sparse-attention techniques specifically to make long contexts cheaper to serve. Qwen3-Coder-Next’s native window is 262,144 tokens and gpt-oss-120b’s is 131,072. A big window is not free, though: long prompts multiply input cost on every turn, which is where prompt caching earns its keep (LLM caching explained).

How do you know a provider is serving the real model?

If you buy directly from several hosts, you need your own checks. A reasonable minimum: a fixed set of canary prompts with known-good answers, run on a schedule against each host; tool-calling and JSON-schema tests, which degrade first under aggressive quantization; a long-context retrieval test near the window limit; and latency and error-rate tracking per host and model. Re-run them continuously, not once at onboarding, because hosts change their deployments without telling you. Then route around hosts that fail, which is the same circuit-breaker logic covered in LLM API fallbacks.

This is the job Smouter does as a gateway. Each request is shopped across a benchmarked pool of providers serving the same model weights. Every node is fingerprinted against the reference weights and benchmarked for latency and error rate continuously, so a node whose weights have drifted is struck from the quote list. Nodes that advertise a low price and then fail to serve are demoted before they can set your price. Smouter re-quotes on every call, so as the floor for a model moves through the day, your requests follow it. On the same model the site states prices up to 50% under OpenRouter; the live per-lane rates are on each model page.

There are two lanes, chosen per request with the x-smouter-lane header. Value, the default, is the sourcing pool described above and is where the discounts are. Verified sends the request to the model maker’s own endpoint under a zero-retention contract, for traffic that must be first-party; not every model is available on both lanes. The value vs verified support article covers when to use each, and zero data retention covers the privacy side.

How do you switch between open-weight models in code?

Because Smouter is OpenAI-compatible, comparing models is a loop over a string. Each response carries receipt headers such as x-smouter-charge and x-smouter-saved, so you can measure real cost per task while you evaluate. Copy current model ids from the models page; the ids below are the ones on the model guide pages.

python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.smouter.ai/v1",
    api_key="sk-smouter-...",
)

# Copy current ids from the models page
CANDIDATES = ["deepseek-v4-flash", "glm-5.2", "qwen3-coder-next", "gpt-oss-120b"]
prompt = "Write a Python function that parses ISO 8601 durations, with tests."

for model in CANDIDATES:
    raw = client.chat.completions.with_raw_response.create(
        model=model,
        messages=[{"role": "user", "content": prompt}],
    )
    resp = raw.parse()
    print(
        model,
        resp.usage.completion_tokens, "output tokens,",
        raw.headers.get("x-smouter-charge"), "charged,",
        raw.headers.get("x-smouter-saved"), "saved",
    )

If you would rather not pick at all, model: "auto" asks Smouter to choose the cheapest model that can handle each request; LLM model routing explains how that compares with fixed choices and when each makes sense.

So which open-weight API is cheapest?

By model, the cheapest to serve are the ones with the fewest active parameters: gpt-oss-120b, Qwen3-Coder-Next and DeepSeek V4 Flash. By provider, there is no permanent answer, because the floor for each model moves daily as hosts add capacity, change stacks and compete for traffic. The durable answer is structural: pick the smallest model that passes your evals, buy it from whichever verified host is cheapest at the moment of the request, cache what repeats, and keep a fallback ready. For the broader playbook, see how to reduce LLM API costs, and if you are comparing gateways that resell these models, OpenRouter alternatives lays out the options fairly.

Frequently asked questions

What is the cheapest open-weight LLM API?

It depends on the model and the moment. Models with few active parameters, such as gpt-oss-120b, Qwen3-Coder-Next and DeepSeek V4 Flash, are the cheapest to serve. For any one model the cheapest host changes daily, so a router that re-quotes each request across verified hosts usually beats a fixed provider. Live per-lane prices are on the Smouter models page.

Is open-weight the same as open source?

Not quite. Open-weight means the trained parameters are published so anyone can run the model. Open source traditionally also implies access to training code and data, which most model makers do not release. For API buyers the license is what matters: MIT and Apache 2.0, used by DeepSeek V4, GLM-5.2, Qwen3-Coder-Next and gpt-oss-120b, allow commercial hosting.

Why is the same model cheaper on some providers?

Hosts differ in hardware cost, inference software, batching and utilization, so their prices differ honestly. Some are cheaper for worse reasons: heavier quantization than the maker shipped, an older checkpoint served under the new name, or an advertised price backed by capacity that fails under real traffic. Check quality and reliability per host, not just the price.

Does quantization make an open-weight model worse?

It can. Some models ship quantized by design, like gpt-oss-120b in MXFP4 and DeepSeek V4 in FP4 and FP8, and are fine at that precision. Problems come from quantizing further or with a poor recipe: tool calls, JSON output and long-context recall usually degrade before simple chat does, so test those specifically on any host you use.

Which open-weight model is best for coding?

As of mid-2026, GLM-5.2 and DeepSeek V4 Pro were the strongest open models for hard coding and agentic work, with Kimi K3 close to the closed frontier on agentic tasks. Qwen3-Coder-Next and DeepSeek V4 Flash are the cost-efficient picks for routine edits inside coding agents. Run your own repository tasks before committing.

How does Smouter make sure a provider serves the real weights?

Every node in the value-lane pool is fingerprinted against the reference weights and benchmarked continuously for latency and error rate. Nodes whose weights drift are struck, and nodes that advertise low prices but fail to serve are demoted. For first-party supply, the verified lane sends the request to the model maker’s own endpoint.