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.
| Model | Tier | Input | Output | Blended | Context | Change | Details |
|---|---|---|---|---|---|---|---|
| 1.Llama 3.1 8BMeta | Budget | $0.020 | $0.040 | $0.025 | 128K | Unchanged | Details for Llama 3.1 8B |
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 ScoutMeta | Budget | $0.10 | $0.30 | $0.15 | 10M | Unchanged | Details for Llama 4 Scout |
10M native context window, but DeepInfra, whose rate is shown, serves 320K. Hosts vary in both price and served context. | |||||||
| 3.Llama 3.3 70BMeta | Mid-tier | $0.10 | $0.32 | $0.16 | 128K | Unchanged | Details for Llama 3.3 70B |
Commodity host rates $0.10/$0.32 (DeepInfra). Varies widely by host. | |||||||
| 4.Gemini 2.5 Flash-LiteGoogle | Budget | $0.10 | $0.40 | $0.18 | 1M | Unchanged | Details for Gemini 2.5 Flash-Lite |
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.5Anthropic | Budget | $0.10 | $0.50 | $0.20 | 1M | Unchanged | Details for Claude Haiku 5.5 |
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 LunaOpenAI | Budget | $0.10 | $0.50 | $0.20 | 1.05M | Unchanged | Details for GPT-6 Luna |
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 EmberMeta | Budget | $0.10 | $0.50 | $0.20 | 1M | New | Details for Muse Ember |
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 AI | Mid-tier | $0.15 | $0.60 | $0.26 | 256K | Unchanged | Details for Mistral Small 4 |
Latest small generation (v26.03). 256K context. | |||||||
| 9.Llama 4 MaverickMeta | Mid-tier | $0.27 | $0.85 | $0.42 | 1M | Unchanged | Details for Llama 4 Maverick |
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 AI | Mid-tier | $0.30 | $0.90 | $0.45 | 128K | Unchanged | Details for Codestral |
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. | |||||||
No models match those filters
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.
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.