Calculator

The Cheapest AI APIs in 2026, Ranked

Llama 3.1 8B is the cheapest model we track at $0.020 in / $0.040 out per million tokens. Here are the 10 lowest-priced, ranked by blended price (three parts input to one part output), so you can find the best value for your workload.

Prices checked 13 Nov 2026

Budget AI API ranking

Prices per million tokens in US dollars, cheapest first. Azure repeats of OpenAI's models are left out.

AI API prices per million tokens, in US dollars
ModelTierInputOutputBlendedContextChangeDetails
1.Llama 3.1 8BMetaBudget$0.020$0.040$0.025128KUnchanged
Details for Llama 3.1 8B
Provider
Meta
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Budget
Blended
$0.025
Context
128K
Change
Unchanged

Llama 3.1 8B on hosted providers ($0.02/$0.04 on DeepInfra) — 128K context, the cheapest rate tracked. Supersedes the original Llama 3 8B (8K).

2.Llama 4 ScoutMetaBudget$0.10$0.30$0.1510MUnchanged
Details for Llama 4 Scout
Provider
Meta
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Budget
Blended
$0.15
Context
10M
Change
Unchanged

10M native context window, but DeepInfra, whose rate is shown, serves 320K. Hosts vary in both price and served context.

3.Llama 3.3 70BMetaMid-tier$0.10$0.32$0.16128KUnchanged
Details for Llama 3.3 70B
Provider
Meta
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Mid-tier
Blended
$0.16
Context
128K
Change
Unchanged

Commodity host rates $0.10/$0.32 (DeepInfra). Varies widely by host.

4.Gemini 2.5 Flash-LiteGoogleBudget$0.10$0.40$0.181MUnchanged
Details for Gemini 2.5 Flash-Lite
Provider
Google
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Budget
Blended
$0.18
Context
1M
Change
Unchanged

Lightweight 2.5 variant and the cheapest first-party rate tracked, but closed to new users. Native multimodal input. Cached input $0.01. Since Sep 18, 2026 Google limits the 2.5 models to developers who have used them before. Google deprecated 2.5 Pro and 2.5 Flash on Nov 2, 2026, but says 2.5 Flash-Lite is not deprecated and remains available through the API until further notice. New projects should start on 3.5 Flash-Lite or 3.8 Flash.

5.Claude Haiku 5.5AnthropicBudget$0.10$0.50$0.201MUnchanged
Details for Claude Haiku 5.5
Provider
Anthropic
Released
7 Oct 2026
Replaces
Claude Haiku 4.5
Replaced by
—
Max output
128K tokens
Tier
Budget
Blended
$0.20
Context
1M
Change
Unchanged

Budget flagship (Oct 7, 2026), replacing Haiku 4.5 at a tenth of its price. Rates shown are for prompts up to 100K tokens: a prompt over 100K bills the whole request at $0.50/$2.50, and cache reads and writes count toward the threshold. Cached read $0.01 (0.1x input), 5m cache write $0.125, 1h cache write $0.20, all 5x above 100K. Batch $0.05/$0.25 ($0.25/$1.25 above 100K). Ties GPT-6 Luna's $0.10/$0.50 on short prompts. Newer tokenizer counts the same text as ~30% more tokens than Haiku 4.5. 128K max output (300K on the Batch API, beta). Adaptive thinking, default effort medium.

6.GPT-6 LunaOpenAIBudget$0.10$0.50$0.201.05MUnchanged
Details for GPT-6 Luna
Provider
OpenAI
Released
22 Sep 2026
Replaces
GPT-5.4 Nano
Replaced by
—
Max output
128K tokens
Tier
Budget
Blended
$0.20
Context
1.05M
Change
Unchanged

Budget tier (Sep 22, 2026) and OpenAI's cheapest current-generation model, half the price of GPT-5.6 Luna on input. OpenAI's named replacement for GPT-5.4 Nano. Cached input $0.01, cache write $0.125. $0.20/$0.75 above 272K. 128K max output. Claude Haiku 5.5 (Oct 7) matches $0.10/$0.50, but only on prompts up to 100K tokens.

7.Muse EmberMetaBudget$0.10$0.50$0.201MNew
Details for Muse Ember
Provider
Meta
Released
10 Nov 2026
Replaces
—
Replaced by
—
Max output
—
Tier
Budget
Blended
$0.20
Context
1M
Change
New

Meta's efficient execution model on the Meta Model API, built for high-volume sub-agent tasks, tool calls and routing. Listed here since Nov 10, 2026; Meta's pages give no launch date. Rates shown are for requests up to 200K input tokens: a request over 200K, cached tokens included, bills the whole request at $0.30/$1.50. Cached input $0.004 ($0.012 above 200K). Max output 524,288 tokens. Standard mode only: no Contributor tier and no batch discount.

8.Mistral Small 4Mistral AIMid-tier$0.15$0.60$0.26256KUnchanged
Details for Mistral Small 4
Provider
Mistral AI
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Mid-tier
Blended
$0.26
Context
256K
Change
Unchanged

Latest small generation (v26.03). 256K context.

9.Llama 4 MaverickMetaMid-tier$0.27$0.85$0.421MUnchanged
Details for Llama 4 Maverick
Provider
Meta
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Mid-tier
Blended
$0.42
Context
1M
Change
Unchanged

Rate shown is Novita's, with the full 1M context: DeepInfra, our usual reference host, retired Maverick on Oct 1, 2026. Varies by host.

10.CodestralMistral AIMid-tier$0.30$0.90$0.45128KUnchanged
Details for Codestral
Provider
Mistral AI
Released
—
Replaces
—
Replaced by
—
Max output
—
Tier
Mid-tier
Blended
$0.45
Context
128K
Change
Unchanged

Specialized for code generation (codestral-2508). Price cut in May 2026. 128K context. Mistral's only dedicated coding model since Devstral 2 retired on Jul 31, 2026.

Blended = 3 parts input to 1 part output, a typical chat mix. Change = blended price, ▲ rise · ▼ cut since the October 2026 check; Mixed = input and output moved in opposite directions.Data CC BY 4.0

For a new project, GPT-6 Luna (OpenAI) and Claude Haiku 5.5 (Anthropic) are each their maker's cheapest current model, both at $0.10 / $0.50. They tie only on short prompts: above 100K tokens Haiku 5.5 bills the whole request at a higher rate, with cache reads and writes counting toward the limit, while Luna keeps its rate to 272K tokens.

Gemini 2.5 Flash-Lite ($0.10 / $0.40) matches that input price, but Google now limits it to developers who have used it before and points new projects at its 3.x models. The Meta Llama prices, such as Llama 3.1 8B at $0.020 / $0.040 and Llama 4 Scout at $0.10 / $0.30, are third-party hosting rates and vary by host, so check your host before relying on them.

With batch processing the lowest first-party rates fall further: GPT-6 Luna drops to $0.050 / $0.25 per million tokens and Gemini 2.5 Flash-Lite to $0.050 / $0.20.

Llama 3.1 8B, Llama 4 Scout, Llama 3.3 70B, Muse Ember, Llama 4 Maverick have no batch discount.

DeepSeek V4.1 Flash is listed at its peak rate, $0.30 / $1.20, and ranks #13 on this blended measure, just outside the top 10. DeepSeek bills half that off-peak, which covers every hour except two weekday windows in UTC; its provider page has the hours.

Best budget model by use case

Chatbots and customer support

GPT-6 Luna costs $0.10 / $0.50. That is less than GPT-5.6 Luna ($0.20 / $1.20) on both input and output, with the same 1.05M context window.

Classification, extraction and routing

High-volume, simple requests suit the cheapest models. Claude Haiku 5.5 costs the same $0.10 / $0.50 as GPT-6 Luna while prompts stay under 100K tokens.

Document processing

A long context window matters here. Gemini 2.5 Flash-Lite has 1M at $0.10 input, if you already have access. For new projects GPT-6 Luna offers 1.05M at $0.10 input and keeps that rate on longer prompts than Haiku 5.5 does.

Code generation

DeepSeek V4.1 Flash is a low-cost coding option at $0.30 / $1.20 at its peak rate, with cheaper cache hits. Check recent coding benchmarks for your language before committing a workload to it.

Multilingual work

Mistral Small 4 costs $0.15 / $0.60 with a 256K context window.

More capability on a budget

Gemini 3.8 Flash costs $0.75 / $3.75 on introductory pricing that runs through 31 December 2026. From 1 January 2027 it moves to its list price of $1.50/$7.50, so plan for that date.

Open-source flexibility

Llama 4 Scout is priced at $0.10 / $0.30 on the host we track, and its open weights let you self-host if you would rather run it yourself.

How much can you save by switching?

Moving a suitable workload from a premium model to a budget one can cut an API bill sharply. Example: a team processing 100M input tokens a month on GPT-5.4 spends $250.00 on input alone. The same volume on GPT-6 Luna costs $10.00, a reduction of 96%.

Not every workload suits a budget model. Use the calculator to compare scenarios and find the right mix of premium and budget models for your stack.

Cheapest AI API FAQ

What is the absolute cheapest AI API right now?

By input cost, Meta Llama 3.1 8B at ~$0.02/MTok input and ~$0.04/MTok output is the cheapest, with Llama 4 Scout next at $0.10 — though both are offered through third-party hosts, so pricing varies by provider. The cheapest we track from a major first-party API is Google Gemini 2.5 Flash-Lite at $0.10/MTok input and $0.40/MTok output ($0.05/$0.20 with batch processing), but since 18 September 2026 Google has limited it to developers who have used it before. For a new project, the cheapest current-generation first-party options we track are tied: OpenAI's GPT-6 Luna ($0.10/$0.50, or $0.05/$0.25 with batch processing) and Anthropic's Claude Haiku 5.5 ($0.10/$0.50, or $0.05/$0.25 with batch), with Meta's Muse Ember ($0.10/$0.50) at the same list price. Haiku 5.5's rate covers prompts up to 100,000 tokens only, rising to $0.50/$2.50 above that, while Luna keeps its rate up to 272K tokens and then rises to $0.20/$0.75, so Luna is the cheaper of the two for long prompts. Muse Ember keeps its rate up to 200K input tokens and then bills $0.30/$1.50.

Is the cheapest AI API also the worst quality?

Not necessarily. Gemini 2.5 Flash-Lite and GPT-6 Luna perform well on most standard tasks. Quality differences mainly show up in complex reasoning, creative writing, and nuanced analysis.

Can I mix budget and premium models?

Absolutely. Many teams use a routing strategy — budget models for simple queries and premium models for complex ones. This can cut costs by 60-80% while maintaining quality where it matters.

Do budget models support batch processing?

Many do. GPT-6 Luna, Claude Haiku 5.5, Gemini 2.5 Flash-Lite, GPT-5.6 Luna, and Mistral Small 4 all offer 50% batch discounts. Hosted Meta Llama models don't, but their list prices are already among the lowest we track, and DeepSeek has no batch API but bills off-peak hours at half price.

How do I switch from a premium to a budget model?

Check our migration guides for step-by-step instructions on switching between providers. Most API formats are similar and require minimal code changes.

Are there hidden costs with budget AI APIs?

Watch for output token costs (often 3-4x input costs), rate limits on free tiers, and potential quality trade-offs on complex tasks. Our comparison table shows all costs transparently.