Picking an LLM API in late 2026 means comparing five price lists that all use different names, discounts and fine print. OpenAI has Astra, Sol, Terra and Luna; Anthropic has Fable, Opus, Sonnet and Haiku; Google has Argon, Flash and Flash-Lite; xAI has Grok 4.7 and friends; and DeepSeek charges half price outside peak hours. I read all five official pricing pages on November 5, 2026 and put them into one comparison, with the same example workload priced on every model.
- Cheapest overall: Claude Haiku 5.5 and GPT-6 Luna, both $0.10 input / $0.50 output per million tokens.
- Cheapest strong mid-tier: DeepSeek Flash ($0.30 / $1.20, half off-peak) and Gemini 3.8 Flash ($0.75 / $3.75, free tier available).
- Cheapest flagship: Grok 4.7 ($2 / $6) and Gemini 4 Argon ($2 / $10 until November 30, then $4 / $20).
- Best value at the top: Claude Opus 5.5 ($4 / $20) leads the Artificial Analysis Intelligence Index at less than half GPT-6 Astra’s price ($10 / $50).
- Biggest discounts: 50% batch on Claude, OpenAI and Gemini (20% on Grok); cache reads from 2% to 25% of input price.
Flagship Models Compared
Prices per million tokens (MTok), standard tier, short prompts.
| Model | Provider | Input | Cached input | Output | Context |
|---|---|---|---|---|---|
| Claude Fable 5.1 | Anthropic | $10 | $0.25 | $50 | 1M |
| GPT-6 Astra | OpenAI | $10 | $1.00 | $50 | About 1.05M |
| Claude Opus 5.5 | Anthropic | $4 | $0.20 | $20 | 1M |
| Gemini 4 Argon | $2 (then $4 from Dec 1) | $0.10 (then $0.20) | $10 (then $20) | See Google docs | |
| Grok 4.7 | xAI | $2 | $0.50 | $6 | 500K |
| DeepSeek V4-Pro | DeepSeek | $1.32 peak / $0.66 off-peak | $0.044 / $0.022 | $3.96 / $1.98 | 1M |
Mid-Tier Models Compared
| Model | Provider | Input | Cached input | Output |
|---|---|---|---|---|
| Claude Sonnet 5.5 | Anthropic | $2 | $0.10 | $10 |
| GPT-6.1 Sol | OpenAI | $2 | $0.10 | $10 |
| Gemini 3.1 Pro Preview | $2 ($4 over 200K) | $0.20 | $12 ($18 over 200K) | |
| Grok 4.3 | xAI | $1.25 | $0.20 | $2.50 |
| GPT-6.1 Terra | OpenAI | $1 | $0.05 | $5 |
| Grok Build 0.1 (coding) | xAI | $1 | $0.20 | $2 |
| Gemini 3.8 Flash | $0.75 (then $1.50 from Jan 1) | $0.075 | $3.75 (then $7.50) |
Budget Models Compared
| Model | Provider | Input | Cached input | Output |
|---|---|---|---|---|
| Claude Haiku 5.5 (prompt up to 100K) | Anthropic | $0.10 | $0.01 | $0.50 |
| GPT-6 Luna | OpenAI | $0.10 | $0.01 | $0.50 |
| Gemini 3.1 Flash-Lite | $0.25 | $0.025 | $1.50 | |
| Gemini 3.5 Flash-Lite | $0.30 | $0.03 | $2.50 | |
| DeepSeek Flash (V4.1-Flash-1017) | DeepSeek | $0.30 peak / $0.15 off-peak | $0.006 / $0.003 | $1.20 / $0.60 |
Watch the fine print: Haiku 5.5 jumps to $0.50 / $2.50 for the whole request when the prompt is over 100K tokens. For long-document work on a budget, DeepSeek Flash and Gemini Flash-Lite are steadier.
Same Workload, Every Model
To make the numbers concrete, I priced one realistic workload on every model: a support chatbot handling 30,000 conversations a month, each with about 3,000 input tokens and 400 output tokens. That is 90M input and 12M output tokens a month, with no caching or batch discounts, at list prices.
The spread is enormous: the same job costs $15 on the cheapest models and $1,500 on the most expensive, a 100x difference. Most apps do not need a flagship for every message, which is why routing (small model first, big model only when needed) is the single best way to save money.
Caching, Batch and Speed Tiers
| Provider | Cache read price | Batch discount | Faster tiers | Other notes |
|---|---|---|---|---|
| Anthropic (Claude) | 5% of input on Opus 5.5 and Sonnet 5.5, 2.5% on Fable 5.1, 10% on others; writes cost 1.25x or 2x | 50% | Fast mode on Opus 5.5: $8 / $40 | 1M context at standard price; US-only inference +10% |
| OpenAI | 5% to 10% of input | 50% (Batch and Flex) | Fast 2x, Ultrafast 6x (Astra, Sol) | Data residency +10% |
| Google (Gemini) | 5% to 10% of input, plus storage per hour on some models | 50% | Priority 1.8x | 3.1 Pro costs more over 200K tokens |
| xAI (Grok) | 15% to 25% of input | 20% | None listed | All tokens 2x once prompt reaches 200K |
| DeepSeek | 2% to 3% of input, automatic | None, but 50% off-peak hours | None | Concurrency limits instead of RPM |
Caching is where the real savings are. Any app with a long, fixed system prompt or reference document should be built so that prefix is identical on every call. On Claude Sonnet 5.5 my worked example dropped a document Q&A bill by about 85% (details in the Claude API pricing guide).
Context, Output and Free Tiers
| Provider | Max context (flagship) | Max output | Free API tier |
|---|---|---|---|
| Anthropic | 1M | 128K (300K via Batch) | Small free credit for new accounts |
| OpenAI | About 1.05M (Astra) | 128K (Astra) | Free usage tier in eligible countries ($100 monthly cap, lower rate limits; not free credit) |
| About 1M on Flash models | Up to 65K on 3.8 Flash | Yes: Flash, Flash-Lite, Gemma 4 (data may be used by Google) | |
| xAI | 500K (Grok 4.7), 1M (Grok 4.3) | Not stated | No |
| DeepSeek | 1M | 384K | No (prepaid balance) |
Price vs Quality
Price only matters next to what you get. On the Artificial Analysis Intelligence Index snapshot from October 17, 2026, the top scores were Claude Opus 5.5 at 58 (max effort), Claude Sonnet 5.5 at 56, and GPT-6 Astra, Gemini 4 Argon and Claude Fable 5.1 at 53, with GPT-6.1 Sol at 52 and Grok 4.7 at 46. In a separate Artificial Analysis head-to-head, DeepSeek V4-Pro 0813 scored 23 against Opus 5.5’s 58.
Putting price and score together:
- Claude Opus 5.5 is the strongest model on that index and costs less than half of GPT-6 Astra.
- Claude Sonnet 5.5 scores within two points of Opus at half the price, and is probably the best value at the top end.
- Gemini 4 Argon matches GPT-6 Astra’s score at a fifth of the price until December 1, and still at less than half after.
- Grok 4.7 trades a lower score for a very low $6 output price.
- DeepSeek is far behind on that index but extremely cheap and open weights.
Which API Should You Use?
| Job | My pick | Runner-up |
|---|---|---|
| Classification, routing, extraction, simple chat | Claude Haiku 5.5 or GPT-6 Luna | Gemini 3.1 Flash-Lite |
| Long documents on a budget | DeepSeek Flash (off-peak) | Gemini 3.8 Flash |
| Everyday production assistant | Claude Sonnet 5.5 | GPT-6.1 Sol |
| Hard reasoning, agentic coding | Claude Opus 5.5 | GPT-6 Astra or Gemini 4 Argon |
| Prototyping for free | Gemini API free tier | Local models with Ollama |
| Real-time X/Twitter data | Grok 4.7 with X search | None comparable |
| Privacy, no per-token bill | Local open models | DeepSeek weights self-hosted |
Second Workload: A Coding Agent With Caching
Chatbots are input-heavy. Coding agents are different: they re-send a big codebase context on every step, so caching matters even more. Here is a second estimate: 2,000 agent tasks a month, each with 50,000 input tokens (80% served from cache) and 5,000 output tokens. That is 20M fresh input, 80M cached input and 10M output.
| Model | Fresh input | Cached input | Output | Monthly total (approx.) |
|---|---|---|---|---|
| GPT-6 Astra | $200 | $80 | $500 | $780 |
| Claude Opus 5.5 | $80 | $16 | $200 | $296 |
| Claude Sonnet 5.5 | $40 | $8 | $100 | $148 |
| GPT-6.1 Sol | $40 | $8 | $100 | $148 |
| Grok 4.7 | $40 | $40 | $60 | $140 |
| DeepSeek V4.1 Flash (peak) | $6 | Under $1 | $12 | About $19 |
These are list-price estimates, not measured bills. Claude also charges 1.25x (5-minute) or 2x (1-hour) for cache writes, and reasoning models bill hidden thinking tokens as output, so real bills for agents usually land 20% to 50% above the output figure. Notice how Grok’s weaker cache discount (25% of input) closes most of its price advantage here, and how Opus 5.5 costs well under half of GPT-6 Astra for the same work.
Hidden Costs Most Comparisons Miss
- Reasoning tokens: thinking models bill their internal reasoning as output. Lower the effort or thinking level for simple tasks.
- Tool calls: web search costs $10 per 1,000 calls on OpenAI and Anthropic, $5 on xAI, and $14 per 1,000 grounded prompts on Gemini after 5,000 free. An agent that searches five times per question multiplies that fast.
- Long-context surcharges: Grok bills every token at 2x once a prompt reaches 200K, and Gemini 3.1 Pro costs more above 200K. Claude Opus 5.5 and Sonnet 5.5 keep standard rates up to 1M.
- Regional and residency uplifts: about 10% on OpenAI data residency endpoints, Claude US-only inference and xAI’s US regional endpoint.
- Scheduled price rises: Gemini 4 Argon goes from $2 / $10 to $4 / $20 on December 1, 2026, and Gemini 3.8 Flash from $0.75 / $3.75 to $1.50 / $7.50 on January 1, 2027.
- Free-tier data use: Gemini’s free tier may use your prompts to improve Google’s products. Never put customer data through a free key.
How to Switch Providers Without Rewriting Your App
Most providers now accept the OpenAI SDK format, so switching is often a two-line change:
| Provider | OpenAI-compatible base URL | Key variable |
|---|---|---|
| OpenAI | https://api.openai.com/v1 |
OPENAI_API_KEY |
| xAI (Grok) | https://api.x.ai/v1 |
XAI_API_KEY |
| DeepSeek | https://api.deepseek.com |
DEEPSEEK_API_KEY |
| Google Gemini | https://generativelanguage.googleapis.com/v1beta/openai/ |
GEMINI_API_KEY |
| Local (Ollama) | http://localhost:11434/v1 |
Any string |
Anthropic’s native Messages API has a different shape, so use its SDK or a router such as OpenRouter or LiteLLM if you want one interface for every model. Keep your prompts provider-neutral, log token usage per request, and run the same 50 real test prompts through each candidate model before you switch. The cheapest model that passes your own test set is the right one.
Frequently Asked Questions
What is the cheapest LLM API in 2026?
Claude Haiku 5.5 and GPT-6 Luna, both at $0.10 input and $0.50 output per million tokens. DeepSeek Flash off-peak ($0.15 / $0.60) is close and handles long prompts without a price step.
Which is cheaper, Claude or ChatGPT API?
At the top, Claude Opus 5.5 ($4 / $20) is cheaper than GPT-6 Astra ($10 / $50). In the middle, Claude Sonnet 5.5 and GPT-6.1 Sol cost the same ($2 / $10). At the bottom, Haiku 5.5 and GPT-6 Luna cost the same.
Which AI API has a free tier?
Google’s Gemini API has the most generous free tier. Anthropic gives new accounts a small free credit.
Why is output more expensive than input?
Generating tokens one at a time takes more compute than reading a prompt, so providers charge roughly 2x to 8x more for output, depending on the model.
Which AI API is best value for coding agents?
Claude Sonnet 5.5 and GPT-6.1 Sol cost the same at list price and both cache well. Opus 5.5 is the best quality per dollar at the top end. DeepSeek V4.1 Flash is far cheaper if its quality passes your tests.
Is it cheaper to run a model locally?
For steady, high volume and data you cannot send out, often yes, once you own the GPU. For spiky or low volume, APIs are cheaper. My best GPU for local LLMs guide covers the hardware side.
Will API prices go up or down?
Both. Google has announced increases for Gemini 4 Argon and Gemini 3.8 Flash, while new mid-tier models such as GPT-6.1 Terra launched at half the price of the tier above. Re-check every quarter.
Final Thoughts
There is no single cheapest API, only the cheapest one for each job. Use the smallest model that does the task, cache everything that repeats, batch what can wait, and keep an eye on the two Gemini price rises coming in December and January. For full details on each provider, see my guides to Claude, OpenAI, Gemini, Grok and DeepSeek pricing. And if you want zero per-token cost, my best Ollama models list shows what runs on your own GPU.




