Cheapest LLM API 2026: Real Pricing Comparison: GPT-4o, Claude, Gemini, DeepSeek, Doubao

API Pricing Comparison ~12 min read

20+ LLM APIs ranked by per-million-token rate. Normalized to USD with cache pricing, free tier, and China access all factored in.

TL;DR: ByteDance Doubao Lite is the absolute cheapest at $0.02/1M input. Gemini 2.0 Flash ($0.03/1M) is the best value for English work. DeepSeek V3 ($0.14/1M) is the cheapest frontier-quality model. For China-direct multi-model access without VPN, FreeModel and APIKEY.FUN aggregate Claude, GPT, Gemini, and DeepSeek at transparent pricing.

Why Price Matters More Than Ever in 2026

In 2024 the LLM API market was simple: OpenAI, Anthropic, Google, and a long tail of open-source providers. By 2026 the table has exploded — over 20 production LLM APIs are commercially available, ranging from $0.02 per million input tokens (ByteDance Doubao) to $75 per million output tokens (Claude Opus 4.7). For a startup processing 500 million tokens per month, the difference between the cheapest and most expensive tier of capable models can be $50,000/month.

This article normalizes the per-million-token rates of every major LLM API we track, applies the standard 3:1 input-to-output ratio used in real workloads, and adds the hidden costs (cache pricing, rate limits, minimum commitments). The result is a single ranking you can use to pick the cheapest API for your specific use case.

All prices are current as of June 2026 and verified against each provider's official pricing page. USD-equivalent prices for Chinese providers are calculated at $1 = ¥7 (the APIKEY.FUN reference rate, which roughly matches the mid-2026 rate on major exchanges).

Methodology: How We Compare Prices

We use three standardized metrics across all providers:

  1. Input price per 1M tokens — the rate you pay for prompt tokens sent to the model
  2. Output price per 1M tokens — the rate you pay for tokens the model generates
  3. Cache read price per 1M tokens — the discounted rate for repeated prompt prefixes (Anthropic prompt caching, OpenAI automatic caching, DeepSeek cache)

For Chinese providers quoted in ¥, we convert at $1 = ¥7. For per-second GPU billing (Replicate), we use the published per-token equivalent for a 70B-class model. Free tier value is reported separately, not netted into the per-token price.

We exclude providers that have no published per-token pricing (e.g., closed enterprise contracts only) and providers that are no longer accepting new signups. As of June 2026, the comparison covers 20 active providers.

The 2026 Cheapest LLM API Ranking (Per-1M-Token Rates)

The table below ranks the cheapest capable model on each provider, comparing the same workload (1M input + 333K output tokens = ~$100 spent at the median rate):

RankProviderCheapest Capable ModelInput $/1MOutput $/1MCache Read $/1M$100 ≈ Tokens
1ByteDance DoubaoDoubao Lite$0.02$0.02N/A5,000M
2Google AIGemini 2.0 Flash$0.03$0.06$0.0053,300M
3Mistral AIMistral Small 3$0.20$0.60$0.02500M
4DeepSeekDeepSeek V3 Chat$0.14$0.28$0.014714M
5CohereCommand R7B$0.15$0.60N/A500M
6OpenAIGPT-4.1 nano$0.10$0.40$0.03833M
7xAI GrokGrok-3 mini$0.30$0.50N/A333M
8Together AILlama 3.3 70B$0.88$0.88N/A170M
9Zhipu AIGLM-4-Flash$0.71$0.71N/A211M
10AnthropicClaude 3.5 Haiku$0.80$4.00$0.03125M
11Fireworks AILlama 3.1 8B$0.20$0.20$0.02500M
12AnyscaleLlama 3.3 70B$0.15$0.15N/A667M
13Moonshot Kimimoonshot-v1-8k$2.86$2.86$0.5735M
14APIKEY.FUNClaude Haiku 4.5$1.00$5.00$0.04100M
15Alibaba BailianQwen-Turbo$0.57$0.57N/A263M
16Baidu ErnieERNIE-Speed$1.71$1.71N/A88M
17Tencent Hunyuanhunyuan-Turbo$0.86$3.43N/A116M
18OpenRouter(varies, +5.5% fee)$0.05+$0.10+Varies2,000M+
19Stability AIStable LM 2 12B$4.00$4.00N/A25M
20ReplicateLlama 3 70B$0.16/sec$0.49/secN/A~140M

*Token counts assume a 3:1 input:output ratio (1M input + 333K output). Cache pricing applies only when prompts are repeated.

Cheapest by Use Case

Cheapest for Bulk Text Classification (100M+ tokens/day)

For high-volume classification, extraction, and embedding-style workloads where model intelligence is less important than throughput:

  • ByteDance Doubao Lite at $0.02/1M input is the absolute cheapest production API. Quality is lower than frontier models but adequate for classification, simple extraction, and Chinese-language tasks.
  • Gemini 2.0 Flash at $0.03/1M input is the best value for English workloads requiring higher quality. The 1M-token context window is a bonus for long-document processing.
  • GPT-4.1 nano at $0.10/1M is the cheapest OpenAI model and the best pick if you need OpenAI tool-calling, JSON mode, and reliability.

Cheapest for Code Generation (Frontier Quality Required)

Code generation needs frontier reasoning — cheap models produce too many compile errors. The cheapest options that maintain GPT-4-class quality:

  • DeepSeek V3 Chat at $0.14/1M input is the cheapest frontier-quality model in 2026. Performance on HumanEval, MBPP, and SWE-bench is within 5% of Claude Sonnet 4.5 and GPT-4.1 at one-tenth the price.
  • Mistral Small 3 at $0.20/1M is the cheapest European-hosted frontier-tier model. Strong on code, hosted in EU for GDPR compliance.
  • Qwen-Turbo via Alibaba Bailian at $0.57/1M is the cheapest Chinese-hosted model with code-generation quality comparable to GPT-4o mini.

Cheapest for Long Context (100K+ tokens)

Long-context workloads are dominated by input cost. The cheapest providers with 100K+ context windows:

  • Google Gemini 2.0 Flash — 1M token context, $0.03/1M input. Best price-per-context-token ratio in 2026.
  • Moonshot Kimi — 128K context, $2.86/1M input via the official API. Higher price but Kimi handles Chinese long-form better than any other model.
  • Anthropic Claude 3.5 Haiku — 200K context, $0.80/1M input, with prompt caching at $0.03/1M for repeated prefixes.

Cheapest with China-Direct Access (No VPN Required)

For users in mainland China, the cheapest options without a proxy:

  • ByteDance Doubao — Chinese-native, no proxy needed. Absolute lowest price ($0.02/1M).
  • Zhipu AI GLM-4-Flash — Chinese-native, $0.71/1M, 128K context, generous free tier.
  • Alibaba Bailian Qwen-Turbo — Chinese-native, $0.57/1M, integrates with Alibaba Cloud.
  • APIKEY.FUN — Multi-model aggregator with China-direct endpoints. ¥1 = $1 transparent pricing; access to Claude, GPT, Gemini, and DeepSeek without VPN.
  • FreeModel — DeepSeek official partner, China-direct, free signup credits.

Free Tier Comparison: Who Gives the Most Free Tokens

The 2026 free tier landscape is fragmented. Some providers give meaningful production-grade credits; others give token amounts that disappear in one afternoon:

ProviderFree TierReal ValueCard Required?
Google AIGenerous free tier, Gemini 2.0 Flash unlimited (rate-limited)Best free tier overallNo
OpenAI$5 credit (expires 3 months)~33M GPT-4.1 nano tokensNo
DeepSeek$2 credit (one-time)~14M V3 Chat tokensNo
Cohere1,000 req/month on trial keyLimited by request countNo
MistralRate-limited free tier~10M Small tokensNo
GrokFree tier, rate-limited~5M Grok-3 mini tokensNo
xAIFree credits via X accountVariableNo
Zhipu AIGLM-3-Turbo free, GLM-4-Flash limitedMost generous CN free tierNo
Alibaba BailianFree Qwen-Turbo quotaSubstantial for CN usersYes (Alibaba)
Baidu ErnieERNIE-Lite freeSubstantial for CN usersYes (Baidu)
Stability AI25 credits (≈3 SD 3.5 images)Token equivalent: smallNo
ReplicateFree credits on signupSmall, variesNo
APIKEY.FUNSignup bonus (¥10-50)~10-50M tokens via group pricingNo
FreeModelSignup bonus (model-specific)Competitive with APIKEY.FUNNo

Best free tier for production use: Google AI Gemini 2.0 Flash unlimited tier remains the gold standard. You can build a substantial side project on it before hitting rate limits.

Best free tier for Chinese users: Zhipu AI GLM-3-Turbo (truly free, no quota) and Alibaba Bailian Qwen-Turbo (free quota for Alibaba Cloud users).

Best free tier for Claude and GPT access in China: FreeModel and APIKEY.FUN both offer signup credits and direct access without VPN.

The $100 Stress Test: What 100 Bucks Buys You

To translate the per-token prices into something tangible, here is what $100 gets you at each provider cheapest capable model, assuming a 3:1 input:output mix:

  • $100 on Doubao Lite = ~5 billion tokens (enough to summarize 50,000 books)
  • $100 on Gemini 2.0 Flash = ~3.3 billion tokens
  • $100 on DeepSeek V3 = ~714 million tokens (frontier quality, plenty for most apps)
  • $100 on GPT-4.1 nano = ~833 million tokens
  • $100 on Claude 3.5 Haiku = ~125 million tokens
  • $100 on GPT-4o (not nano) = ~50 million tokens
  • $100 on Claude Sonnet 4.5 = ~30 million tokens
  • $100 on Claude Opus 4.7 = ~7 million tokens

The cheapest tier gets you 100x more tokens than the most expensive tier for the same dollar.

Speed Comparison: Throughput at the Cheapest Tier

Price is only half the story. For real-time applications (chatbots, code assistants, voice agents), tokens-per-second matters:

ProviderCheapest ModelMedian Output Speed
GrokGrok-3 mini280 tok/sec
Google AIGemini 2.0 Flash250 tok/sec
DeepSeekDeepSeek V3180 tok/sec
Fireworks AILlama 3.1 8B220 tok/sec
MistralMistral Small 3150 tok/sec
OpenAIGPT-4.1 nano130 tok/sec
Together AILlama 3.3 70B120 tok/sec
APIKEY.FUN(relays)100 tok/sec
Zhipu AIGLM-4-Flash100 tok/sec
Alibaba BailianQwen-Turbo90 tok/sec

For latency-sensitive apps, Grok-3 mini and Gemini 2.0 Flash are the cheapest fast options.

Code Examples: Calling the Cheapest APIs

DeepSeek V3 (Python)

import requests

response = requests.post(
    "https://api.deepseek.com/v1/chat/completions",
    headers={"Authorization": "Bearer YOUR_DEEPSEEK_API_KEY"},
    json={
        "model": "deepseek-chat",
        "messages": [{"role": "user", "content": "Explain quantum entanglement in 100 words"}],
        "max_tokens": 200,
    },
    timeout=30,
)
print(response.json()["choices"][0]["message"]["content"])

Gemini 2.0 Flash (curl)

curl -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=YOUR_GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "What is the speed of light?"}]}]
  }'

Doubao Lite (OpenAI-compatible endpoint)

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_DOUBAO_API_KEY",
    base_url="https://ark.cn-beijing.volces.com/api/v3",
)

response = client.chat.completions.create(
    model="doubao-lite-32k",
    messages=[{"role": "user", "content": "Translate to French: Hello, world!"}],
    max_tokens=100,
)
print(response.choices[0].message.content)

Conclusion: How to Pick the Cheapest LLM API for You

The cheapest LLM API in 2026 depends on four factors: required quality, geography, use case, and volume.

For US/EU startups processing under 100M tokens/month: Start with Google AI Gemini 2.0 Flash free tier, then graduate to paid as you scale. It is the best price-to-quality ratio for English workloads.

For code-heavy applications: Use DeepSeek V3 as the default. It is frontier-quality at one-tenth the price of Claude or GPT.

For China-based teams: Use ByteDance Doubao (cheapest, Chinese-native), Zhipu GLM-4-Flash (best Chinese-language quality at low price), or FreeModel / APIKEY.FUN (multi-model aggregator with China-direct access to Claude and GPT).

For long-context workloads (100K+ tokens): Use Gemini 2.0 Flash (1M context) or DeepSeek V3 (128K context, with aggressive cache pricing).

For multi-model production systems: Use an aggregator like OpenRouter, FreeModel, or APIKEY.FUN to swap models without changing integration code. The slight markup pays for itself in resilience.

The single most expensive mistake is using Claude Opus or GPT-4.1 for tasks that do not need it. A simple two-tier routing setup — cheap model for classification/extraction, frontier model for generation — typically cuts LLM cost by 70% with no measurable quality loss.

Related reviews: Check our deep dives into OpenAI, Anthropic, DeepSeek, Google AI, ByteDance Doubao, and FreeModel for full pricing details and code examples.

Advertisement