Run Claude Code for less
Point Claude Code at OpenCheap with three environment variables and you choose the model per task, on one key with a spend limit. Claude models go to their cheapest provider: Claude Opus 5.5 costs its list price here right now. Claude Sonnet 5 is 73 % below list, Claude Opus 5 is 11 % below list, Claude Haiku 5.5 is 40 % below list. The bigger saving is the model: open coding models such as Kimi K3, Kimi K2.7 Code and GLM 5.3 cost a fraction of Claude Sonnet 5.5's price per token. Claude Code works with all of them, because OpenCheap answers Anthropic's Messages API for every model.
Set up Claude Code in a minute
In your shell profile, or under "env" in ~/.claude/settings.json. The base URL has no /v1: Claude Code adds /v1/messages itself.
export ANTHROPIC_BASE_URL=https://api.opencheap.si
export ANTHROPIC_API_KEY=<your OpenCheap key>
export ANTHROPIC_MODEL=claude-sonnet-5.5
# Optional: a cheaper model for background work and subagents
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-5.5
export CLAUDE_CODE_SUBAGENT_MODEL=kimi-k3{
"env": {
"ANTHROPIC_BASE_URL": "https://api.opencheap.si",
"ANTHROPIC_API_KEY": "<your OpenCheap key>",
"ANTHROPIC_MODEL": "kimi-k3"
}
}The console's setup page shows the same lines with your key filled in. Codex and Cursor are in the quickstart.
Claude models, live
Our price per million input and output tokens, as of 2026-11-15 02:18 UTC, and how it compares with each model's list price.
| Model | OpenCheap / 1M in · out | Versus list |
|---|---|---|
| Claude Opus 5.5 | $4.00 · $20.00 | list price |
| Claude Sonnet 5.5 | $2.00 · $10.00 | list price |
| Claude Sonnet 5 | $0.540 · $2.70 | 73 % below list |
| Claude Opus 5 | $5.00 · $22.00 | 11 % below list |
| Claude Haiku 5.5 | $0.060 · $0.300 | 40 % below list |
Cheaper models that run Claude Code
Coding models you can set as ANTHROPIC_MODEL or for subagents, cheapest first. The share compares the price per token with Claude Sonnet 5.5's on a 1 : 3 input : output blend; it says nothing about quality.
| Model | OpenCheap / 1M in · out | Share of Claude Sonnet 5.5's price |
|---|---|---|
| GLM 5.3 | $0.0011 · $0.036 | under 1 % |
| Gemini 3.5 Flash | $0.012 · $0.068 | under 1 % |
| Kimi K2.7 Code | $0.018 · $0.110 | 1 % |
| DeepSeek V4 Pro | $0.066 · $0.110 | 1 % |
| Qwen 3 Coder 480B | $0.120 · $0.380 | 4 % |
| MiniMax M3 | $0.110 · $0.420 | 4 % |
| Kimi K3 | $0.044 · $2.00 | 19 % |
Three ways to spend less
- 1Pay the cheapest provider for ClaudeEvery request goes to the cheapest healthy provider of the model, and every answer reports what it cost in usage.cost.
- 2Use a cheaper model where Claude is not neededKeep Claude for planning and hard edits, and set a cheaper model for background calls and subagents, or for whole sessions on routine work.
- 3Cap the keyA daily limit on the key Claude Code uses stops it at the amount you choose. See spend limits per key.
Claude Code also reads ANTHROPIC_DEFAULT_OPUS_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL, so the opus and sonnet aliases can point at any model you choose.
Questions, answered
Can I run Claude Code with a cheaper model?
Yes. Claude Code reads ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY and ANTHROPIC_MODEL. Point them at OpenCheap (https://api.opencheap.si, your key, and a model id) and Claude Code runs on that model: Claude, GPT, Gemini, or an open coding model such as Kimi K3, GLM or DeepSeek.
Is Claude Opus cheaper on OpenCheap?
Claude Opus 5.5 costs its list price here right now. Claude Sonnet 5 is 73 % below list, Claude Opus 5 is 11 % below list, Claude Haiku 5.5 is 40 % below list. Each request goes to the cheapest provider of the model, so when a provider prices it lower, you pay that.
Will Claude Code work with non-Claude models?
Yes. OpenCheap answers Anthropic's Messages API for every chat model, so Claude Code's requests, streaming and tool calls reach the model you set. How well a model handles Claude Code's tools and long sessions varies by model: try it on a real task before you switch a whole team.
Can I keep Claude for the hard parts and a cheap model for the rest?
Yes. Claude Code takes a model per role: ANTHROPIC_MODEL for the session, ANTHROPIC_DEFAULT_HAIKU_MODEL for the small background calls, CLAUDE_CODE_SUBAGENT_MODEL for subagents (Claude Code's docs as of November 14, 2026). Any OpenCheap model id works in each, and /model switches mid-session.
Is a Claude subscription cheaper than paying per token?
It can be. With a Claude Pro or Max plan, Claude Code's usage is part of the plan; through an API key you pay per token. Per token wins when you use cheaper models, use Claude Code unevenly, or need it inside agents and CI with a spend limit.
How do I stop Claude Code from spending too much?
Give the key it uses a daily limit that refuses requests once reached. See the spend limits guide; the limit covers every model the key calls.
More guides
OpenCheap is an LLM router that sends every request to the cheapest healthy provider of the model you name, fails over to the next one before the first byte, and bills you that provider's price.
One OpenCheap key calls models from Anthropic, Google, OpenAI, DeepSeek, Moonshot, Qwen and more through the OpenAI SDK you already use: change the base URL and the key.
An AI agent can pay OpenCheap for one completion in USDC on Base with x402: call with no key, read the 402 price, sign, and get the answer in the same request.
On OpenCheap every key can carry its own daily, weekly, monthly or lifetime limit that refuses requests once it is reached, so an agent left running overnight cannot spend more than you allow.