Cheapest AI API 2026:
Lowest Cost LLMs Ranked

Every major AI API ranked by cost per token. Updated July 2026 with the latest pricing from OpenAI, Anthropic, Google, Meta, and Mistral.

Cheapest AI APIs Ranked by Input Price (July 2026)

Prices are per million tokens (1M tokens ≈ 750,000 words). Sorted by input token cost, lowest first. Current models only — retired models (Claude 3.x, Gemini 1.5/2.0) have been removed.

#ModelProviderInput /1MOutput /1MBest For
1 Gemini 2.5 Flash-LiteGoogle$0.10$0.40 Ultra budget
2 GPT-4o mini (legacy)OpenAI$0.15$0.60 High volume
3 Gemini 3.1 Flash-LiteGoogle$0.25$1.50 Budget reasoning
4 Gemini 2.5 FlashGoogle$0.30$2.50 Long context
5 Gemini 3 FlashGoogle$0.50$3.00 Fast frontier
6 GPT-5.4 miniOpenAI$0.75$4.50 Agents, tools
7 Claude Haiku 4.5Anthropic$1.00$5.00 Quality budget
8 Gemini 2.5 ProGoogle$1.25$10.00 Reasoning
9 Gemini 3.1 ProGoogle$2.00$12.00 Premium multimodal
10 GPT-5.4OpenAI$2.50$15.00 Workhorse
Key insight: The price gap between the cheapest budget model and a premium flagship is 50× on input tokens ($0.10 vs $5.00). For high-volume applications, choosing the right budget model can cut your API bill by 95%.

Top 3 Cheapest AI APIs — Detailed Breakdown

🥇 #1: Gemini 2.5 Flash-Lite — $0.10/M input

Google's most affordable model in 2026. Flash-Lite is designed for simple, repetitive tasks at extreme scale. It handles classification, extraction, summarization, and basic Q&A well. Not suitable for complex multi-step reasoning or nuanced writing.

🥈 #2: GPT-4o mini (legacy) — $0.15/M input

OpenAI's legacy budget model still punches above its price and remains callable. It delivers strong performance on structured tasks, follows instructions reliably, and integrates with OpenAI's tools ecosystem. If you want the current-generation equivalent, GPT-5.4 mini ($0.75/$4.50) adds newer capability at a higher floor.

🥉 #3: Gemini 2.5 Flash — $0.30/M input

A step up from Flash-Lite with a massive 1M token context window — making it a strong budget choice for long-document processing. Summarizing a 200-page PDF costs only a few cents in input tokens.

How Much Can You Save by Switching Models?

Assume a customer support chatbot processing 1 million requests/month with 500 input + 200 output tokens each:

ModelInput CostOutput CostMonthly Totalvs GPT-4o (legacy)
Gemini 2.5 Flash-Lite$50$80$130-96%
GPT-4o mini (legacy)$75$120$195-94%
Claude Haiku 4.5$500$1,000$1,500-54%
GPT-4o (legacy)$1,250$2,000$3,250
Claude Sonnet 4.6$1,500$3,000$4,500+38%

Should You Use Open-Source Models (Llama, Mistral)?

Meta's Llama and Mistral's open-weight models can be significantly cheaper when self-hosted, but running your own infrastructure adds complexity and fixed costs — and hosted pricing varies by provider. AIModelCalc currently tracks the three first-party providers (OpenAI, Anthropic, Google) where published per-token pricing is stable; for open-weight models, check your hosting provider's current rate, since it's often competitive with the cheapest closed-source options above.

Self-hosting makes sense if you process more than 50M tokens/month and have engineering capacity. Below that threshold, hosted APIs are simpler and often cheaper when you factor in GPU costs and maintenance.

Tips for Minimizing AI API Costs

Use our free calculator to estimate exactly what your workload will cost across all major models.

Calculate My AI API Cost →