cheapaimodelSearch
All posts

Cheapest LLM APIs: Compare Token Prices and Workload Costs

By Nicho

GLM-5.3-Flash has the lowest calculated token cost in the five-model CheapAIModel comparison below. That makes it a sensible candidate for a cost-conscious evaluation, not an automatic winner for every application.

The useful question is what your workload costs after accounting for input, output, caching and unsuccessful attempts. A low input rate matters less when your application generates long answers. A low cache-read rate only helps when requests actually hit the cache.

This guide uses published prices checked on 26 October 2026 and explicit token assumptions. These are calculations, not measured performance benchmarks or promises about your bill. The comparison covers the five models listed on CheapAIModel at that check, not every API on the market.

Start with the three token prices

The table uses CheapAIModel's displayed USD prices per million tokens. “Input” means uncached input; cache reads are counted separately. Prices are reproduced to the displayed precision so you can recalculate the examples. Check the live pricing page before making a purchase or changing production traffic.

Model Uncached input / 1M Output / 1M Cache read / 1M
GLM-5.3-Flash $0.104676 $0.348919 $0.020935
Grok 4.7 $0.198958 $0.596874 $0.049740
DeepSeek-V4.1-Flash $0.209351 $0.837404 $0.004187
GLM-5.3 $0.976972 $3.070483 $0.181438
Kimi K3 $2.093511 $10.467555 $0.209351

Do not treat a gateway's rate as the model developer's universal price. The same named model can have different billing terms depending on where and how you access it.

Estimate a workload before choosing a model

For a request with no cache hits, the calculation is:

Token cost = input tokens / 1,000,000 × input rate + output tokens / 1,000,000 × output rate.

The two scenarios below deliberately hold token counts constant. They show the effect of prices alone. They do not imply identical tokenization, answer length or quality across models.

Model Support-style usage: 15M input + 4M output Document summaries: 200M input + 20M output
GLM-5.3-Flash $2.97 $27.91
Grok 4.7 $5.37 $51.73
DeepSeek-V4.1-Flash $6.49 $58.62
GLM-5.3 $26.94 $256.80
Kimi K3 $73.27 $628.05

These are input/output subtotals, rounded after calculation. They exclude taxes and any separately billed caching, tools, storage or other services. They also exclude tokens from retries beyond the stated totals.

For example, the GLM-5.3-Flash support scenario is 15 × $0.104676 + 4 × $0.348919 = $2.965816. Nothing in that arithmetic establishes how many customer conversations it can resolve. To budget a real service, measure tokens per conversation and the proportion that meet your acceptance criteria.

Caching can change the order

For cached requests, split input into cache misses and cache hits. Do not bill the same cached input twice:

Token subtotal = uncached input × input rate + cached input × cache-read rate + output × output rate, with all token counts expressed in millions.

Consider 225M total input tokens and 22.5M output tokens. An assumed 80% cache-hit share means 45M uncached input and 180M cached input. Applying the listed rates gives a token subtotal of $29.02 for DeepSeek-V4.1-Flash and $31.34 for Grok 4.7.

That reverses their order in the uncached examples. The 80% figure is a scenario input, not an observed or guaranteed hit rate. Before budgeting around it, inspect actual usage records and check which prefixes are eligible, how long they remain cached and whether writes or storage incur separate charges.

Provider-specific rules matter here. Kimi's billing documentation describes separate cache-write charges for K3 models. That does not establish how a third-party gateway bills them. Confirm the gateway's own treatment rather than importing a direct-provider assumption into a gateway estimate.

Compare the same pricing conditions

A discount is only meaningful against a stated baseline. Three checks can prevent a misleading comparison:

  1. Time of use. DeepSeek's direct API lists both peak and off-peak rates. Its Flash off-peak rates are $0.15 for uncached input, $0.003 for cached input and $0.60 for output per million tokens. Those rates are below the CheapAIModel Flash rates shown above. Check the official schedule if your workload can run at flexible times.
  2. Request size and services. Grok 4.7's official page flags different pricing above 200K context and links separately billed tools. A base-rate comparison should not silently represent every request size or tool-enabled workflow.
  3. Product type. Z.ai's API price list and Kimi's billing guide describe specific API charges. Compare an API workload against API terms, not an unrelated chat membership or coding subscription.

Choose by accepted results, then optimize spend

Create a small evaluation set from tasks your application must handle. Define success before running it: a valid classification, a grounded answer, a passing test or another observable result. Use the same task set across candidates and record configuration differences.

For each candidate, track total spend, successful tasks, retries, latency and human corrections. A useful business metric is total evaluation spend divided by accepted results. Include failed attempts in the numerator. Otherwise a model that often needs retries can appear cheaper than it is.

Start with the lowest-priced model that might meet your requirements. Move to another candidate when the measured failure or correction cost justifies it. A higher price does not prove higher quality, and this price comparison does not rank coding ability, reliability or response speed.

Once quality is acceptable, reduce unnecessary context, cap answers where appropriate and test cache-friendly prompt structure. Change one variable at a time so you can tell whether savings came from the model, the prompt or reduced output.

A practical next step

Use the model catalog to shortlist supported candidates, then check their current rates and your required capabilities. For model-specific billing details, continue with the DeepSeek pricing guide or Kimi API guide.

When you are ready to test, follow the developer documentation, run a small representative workload and compare the resulting usage with your estimate before increasing traffic.

All posts