The cheapest Claude model is Claude Haiku 5.5, at $0.10 per million input tokens and $0.50 per million output tokens for prompts up to 100,000 tokens. That is one twentieth of Claude Sonnet 5.5 and one fortieth of Claude Opus 5.5. On the Codex side, the cheapest OpenAI model is GPT-6 Luna, at the same $0.10 and $0.50.
But the cheapest model per token is not always the cheapest model per task. A cheap model that needs three attempts, or a long Claude Code session that pushes Haiku past its 100,000-token price step, can cost more than a stronger model that gets it right first time. Below are the current prices for every Claude and Codex model, what the same coding task actually cost on each in our own test, and how to route work to the cheapest model that can do it.
What is the cheapest Claude model?
Claude Haiku 5.5 is the cheapest current Claude model by a wide margin. Here is the full current lineup, cheapest first, at Anthropic's standard API prices (checked November 2026). Anthropic's models overview describes what each one is built for.
| Model | API model ID | Input ($/M tokens) | Output ($/M tokens) | Cache read ($/M tokens) | Best for |
|---|---|---|---|---|---|
| Claude Haiku 5.5 (prompts up to 100K tokens) | claude-haiku-5-5 | $0.10 | $0.50 | $0.01 | Small edits, tests, boilerplate, subagents |
| Claude Haiku 5.5 (prompts over 100K tokens) | claude-haiku-5-5 | $0.50 | $2.50 | $0.05 | Long sessions that still need to be cheap |
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $2 | $10 | $0.10 | Everyday implementation and bug fixes |
| Claude Opus 5.5 | claude-opus-5-5 | $4 | $20 | $0.20 | Claude Code's default; long agentic runs, hard debugging |
| Claude Fable 5.2 | claude-fable-5-2 | $8 | $40 | $0.20 | The hardest long-horizon work |
Three details change the real bill more than the headline price:
- Haiku 5.5 has a price step at 100,000 tokens. Anthropic's long-context pricing rules price each request on its own prompt length, cache reads included, so a long Claude Code session that resends a big context crosses it quickly. Above the step Haiku costs 5x more, though it is still a quarter of Sonnet 5.5.
- Cache reads are where agent costs live. Coding agents resend the same files and history on every turn. With prompt caching, Sonnet 5.5 and Opus 5.5 charge only 5% of the input price for a cache hit, so a cached Sonnet session can cost far less than its list price suggests.
- Newer models use more tokens for the same text. Anthropic says Claude 4.7 and later models use a tokenizer that produces about 30% more tokens. Comparing Haiku 5.5 against an older model on price per token alone understates its cost by roughly that much.
If you are on a Claude subscription rather than the API, the per-token price matters less than your usage limits. Switching Claude Code to a cheaper model makes those limits go further, and you can set a Claude Code budget for each developer so nobody burns through them. Running Claude through Amazon Bedrock instead? Billing works differently there; see our Claude Code on Amazon Bedrock pricing guide.
What is the cheapest Codex model?
The cheapest model you can run in Codex is GPT-6 Luna, at $0.10 per million input tokens and $0.50 per million output tokens, the same list price as Claude Haiku 5.5. Here are current OpenAI API prices, cheapest first (checked November 2026). OpenAI's Codex model selection guide explains which models Codex offers.
| Model | API model ID | Input ($/M tokens) | Output ($/M tokens) | Cached input ($/M tokens) | Best for |
|---|---|---|---|---|---|
| GPT-6 Luna | gpt-6-luna | $0.10 | $0.50 | $0.01 | Small, well-defined edits and subagents |
| GPT-6.1 Terra | gpt-6.1-terra | $1 | $5 | $0.05 | Middle ground between Luna and Sol |
| GPT-6.2 Sol | gpt-6.2-sol | $2 | $10 | $0.10 | Everyday coding; Sonnet 5.5's price peer |
| GPT-6.2 Astra | gpt-6.2-astra | $8 | $40 | $0.40 | The hardest tasks; Fable 5.2's price peer |
At list price, the two vendors now line up almost tier for tier: Luna against Haiku 5.5, Sol against Sonnet 5.5, Astra against Fable 5.2. So the cheaper vendor for your team is decided less by the rate card and more by how many tokens each model spends finishing your actual tasks. That is what the test below measures; our Claude Code vs Codex cost comparison covers the plan-level differences.
If you use Codex through a ChatGPT plan rather than the API, picking Luna or Terra for routine work stretches your plan's usage the same way. Our breakdown of Codex vs ChatGPT billing shows which route costs a team less, and if you pay per token, OpenAI API spend limits explains the difference between alerts and hard caps.
How Opviera routes work to the cheapest capable model
Knowing the cheap model works is the easy part. Switching to it usually means new keys, new config and a different API for each vendor, so most teams leave everything on one expensive default.
Full disclosure: Opviera is built by my team at Virstack, so I'm biased. Opviera is a control layer for Claude Code and Codex. You point both tools at the gateway once with a single key, then:
- Switch models across Anthropic, OpenAI and open-weight providers from a dashboard, with no local reconfiguration. Here's how it works.
- Route automatically with smart model routing, so routine requests drop to a cheaper model without anyone choosing.
- See the real cost of every run per model, per person and per project. The test table above came straight from that dashboard, and you can track Claude Code usage per developer the same way.
- Set hard-stop budgets so spend can't run away, including budgets for coding agents by developer or team.
- Cut resent context with opt-in prompt compression, up to 92% on heavy agent workloads.
Opviera started as an internal tool that cut our own AI bill by 70%; here's how we cut 70% of our AI costs. To estimate what your team could save, try the AI savings calculator.
Frequently asked questions
What is the cheapest Claude model?
Claude Haiku 5.5, at $0.10 per million input tokens and $0.50 per million output tokens for prompts up to 100,000 tokens. Above 100,000 tokens it costs $0.50 and $2.50, still a quarter of Claude Sonnet 5.5.
What is the cheapest model for Claude Code?
Among Claude models, Haiku 5.5. Claude Code defaults to Opus 5.5, which costs 40 times as much per input token, so switching routine tasks to Haiku 5.5 or Sonnet 5.5 is the single biggest saving. Through a gateway like Opviera you can also run OpenAI and open-weight models in Claude Code.
What is the cheapest Codex model?
GPT-6 Luna, at $0.10 per million input tokens and $0.50 per million output tokens. GPT-6.1 Terra, at $1 and $5, is the next step up.
Is Claude Haiku 5.5 good enough for coding?
For small, well-scoped tasks, usually yes. In our test it [result from your rerun]. For multi-file changes or unfamiliar code, Sonnet 5.5 is the safer default at 20 times the token price.
Can I mix Claude and OpenAI models in one setup?
Yes. With Opviera you connect Claude Code and Codex once with a single key and switch between Anthropic, OpenAI and open-weight models from a dashboard, with the cost of every run tracked.
Written by CK, Co-Founder & CPO.
Pick the cheapest capable model, every time
Connect Claude Code and Codex once, switch models across providers from a dashboard, and see the real cost of each run, with hard-stop budgets so the spend can't run away.
Keep reading
AI Spend Policy Template for Engineering Teams
Copy this AI spend policy template for engineering teams. It includes a budget approval matrix, spending limits, and a worked example of a $200 budget exception.
Read article → GuideWhat Is the Opviera AI Savings Calculator?
Learn how the Opviera AI Savings Calculator estimates potential API cost savings or extra working time on AI subscriptions using your team’s workload.
Read article → GuideOpenAI API Spend Limits: Alerts vs Hard Caps
OpenAI budget alerts only notify you, while hard limits stop requests. Learn how each works, how they differ from rate limits, and how to set a cap that protects your budget without breaking production.
Read article →