OpenCode Zen vs one key for every model
OpenCode Zen sells its tested models at list, from $20. The same ids run here under list, from $10. Both are a few lines in opencode.json; here are both, with the prices side by side.
What OpenCode Zen is
OpenCode Zen is OpenCode's own paid gateway: a curated set of models the OpenCode team has tested and benchmarked for coding agents, sold pay as you go at the developer's list price. You add a $20 balance (plus a $1.23 card processing fee), it auto-reloads $20 when you drop under $5, and you select models as opencode/<model-id> after /connect. Models are hosted in the US and EU under zero-retention terms with listed exceptions. Read 2026-10-19 from opencode.ai; the docs now call it OpenCode Console.
A key from here is the other kind of provider: one base URL for 492 chat models and 116 image, video, speech and 3D models, priced under the developer's list, from $10 with no auto-reload unless you turn it on. Both are a few lines in opencode.json. The rest of this page puts the two side by side, then gives the setup.
How expensive is OpenCode Zen? Zen vs this key, per million tokens
| Model | Zen input | Here input | Zen output | Here output | Zen cached | Here cached |
|---|---|---|---|---|---|---|
| Claude Sonnet 5.5 | $2.00 | $1.20 | $10.00 | $3.00 | $0.20 | $0.075 |
| Claude Opus 5.5 | $4.00 | $2.80 | $20.00 | $10.00 | $0.20 | $0.15 |
| Claude Haiku 5.5 | $0.10 | $0.06 | $0.50 | $0.15 | $0.01 | $0.01 |
| GPT-6.1 Sol | $2.00 | $0.60 | $10.00 | $3.00 | $0.20 | $0.06 |
| Gemini 3.1 Pro Preview | $2.00 | $1.20 | $12.00 | $7.20 | $0.20 | $0.12 |
| DeepSeek V4 Pro 0813 | $1.74 | $0.792 | $3.48 | $1.188 | $0.145 | $0.0625 |
| Kimi K3 | $3.00 | $0.90 | $15.00 | $4.50 | $0.30 | $0.12 |
USD per million tokens. Zen: its Console pricing table at opencode.ai, read 2026-10-19; the tiers shown are the base context tiers (Zen bills GPT 6.1 Sol and Gemini 3.1 Pro at double past 272K and 200K tokens). Here: live from GET /v1/catalog. Zen's gemini-3.1-pro and deepseek-v4-pro are gemini-3.1-pro-preview and deepseek-v4-pro-0813 here.
Zen's rates are the developers' list prices, by design: OpenCode says it sells at cost and passes price drops along, with only card fees on top. An hour of agent work on Claude Sonnet 5.5, modelled as 3M input tokens with 80% cache reads and 150k output tokens, is $3.18 at Zen's rates and $1.35 here. The Claude Code pricing post works the same hour into days and months.
Is OpenCode Zen a good deal?
| OpenCode Zen | This key | |
|---|---|---|
| Price basis | developer's list, zero markup | under the developer's list, per model |
| To start | $20 + $1.23 card fee | $20 |
| Reload | auto $20 under $5 (can be changed or off) | manual, or auto top-up if you set it |
| Models | a tested coding list: Claude, GPT, Gemini, Grok, DeepSeek, Kimi, GLM, Qwen, MiniMax, free models | 492 chat models plus 116 image, video, speech and 3D models on the same key |
| Formats | per-vendor endpoints under opencode.ai/inference | OpenAI, Anthropic and Gemini formats on one base URL |
| Receipts | console billing | signed receipts and statements, verifiable at /statements/verify |
| Price lock | follows the developer | 30 days from each top-up |
| Model check | benchmarked by OpenCode | called once a day, public at /proof |
Zen column from opencode.ai/zen and its Console docs, read 2026-10-19.
Zen is a good deal if what you want is OpenCode's testing and nothing cheaper than list. If you want the same ids for less, or one key that also makes images and video, the block below is the alternative. The two can coexist: OpenCode lets you keep several providers and pick per session.
Where the settings are
opencode.json in the project root, or ~/.config/opencode/opencode.json for every project. OpenCode merges the two; the project file wins on keys that clash.
Keys saved with /connect live in ~/.local/share/opencode/auth.json.
The provider block
OpenCode only takes an OpenAI-compatible base URL for a custom provider, so use the @ai-sdk/openai-compatible package. Every id under models shows up in the /models picker. Any id on the Models page works, Claude included.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"uplinkswitch": {
"npm": "@ai-sdk/openai-compatible",
"name": "UplinkSwitch",
"options": {
"baseURL": "https://api.uplinkswitch.com/v1",
"apiKey": "{env:UPLINKSWITCH_API_KEY}",
"headers": {
"HTTP-Referer": "https://uplinkswitch.ai",
"X-Title": "OpenCode"
}
},
"models": {
"claude-sonnet-5-5": { "name": "Claude Sonnet 5.5" },
"claude-opus-5-5": { "name": "Claude Opus 5.5" },
"gpt-6.1-sol": { "name": "GPT-6.1 Sol" },
"gemini-3.1-pro-preview": { "name": "Gemini 3.1 Pro" },
"deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro" },
"kimi-k3": { "name": "Kimi K3" }
}
}
},
"model": "uplinkswitch/claude-sonnet-5-5",
"small_model": "uplinkswitch/claude-haiku-5-5"
}model and small_model take provider/model. Each model entry can also carry limit.context and limit.output (tokens in, tokens out) if you want OpenCode to budget context for it. options.headers goes out with every request; the gateway records X-Title as the client app against each request in its log, so the usage shows under OpenCode in the console.
The key
{env:UPLINKSWITCH_API_KEY} reads the variable at start. An unset variable becomes an empty string, so export it before you run OpenCode:
export UPLINKSWITCH_API_KEY="sk-uplink-live-..."
opencodeOr skip options.apiKey and store the key with /connect: scroll to Other, enter the provider id uplinkswitch, paste the key. The id must match the key you used under provider.
The V2 providers block, read 2026-11-27
OpenCode's provider docs now show a V2 shape: a providers map (plural) with package, env and settings.baseURL, and the published schema at opencode.ai/config.json still lists the older provider key used above, marked deprecated. We checked every key in this block for the two abliterated ids against that schema by hand, not in a running OpenCode, so treat it as the documented form rather than a tested one. The context limits are the catalog's windows; GLM 5.3 Abliterated publishes no maximum output, so its 32000 is our own setting.
{
"$schema": "https://opencode.ai/config.json",
"providers": {
"uplinkswitch": {
"name": "UplinkSwitch",
"env": ["UPLINKSWITCH_API_KEY"],
"package": "@opencode/ai/providers/openai-compatible",
"settings": { "baseURL": "https://api.uplinkswitch.com/v1" },
"models": {
"glm-5.3-abliterated": {
"name": "GLM 5.3 Abliterated",
"capabilities": { "tools": true },
"limit": { "context": 131072, "output": 32000 }
},
"deepseek-v4.1-flash-1017-abliterated": {
"name": "DeepSeek V4.1 Flash Abliterated",
"capabilities": { "tools": true },
"limit": { "context": 1000000, "output": 128000 }
}
}
}
},
"model": "uplinkswitch/deepseek-v4.1-flash-1017-abliterated"
}What we did measure is the route underneath. The same model ids sent as a growing /chat/completions conversation, the OpenAI-compatible format the package is named for, read the prompt back from the cache on every turn after the first: 97.9% of prompt tokens on GLM 5.3 Abliterated, 99.2% on DeepSeek V4.1 Flash Abliterated. Kilo Code's CLI, whose config takes the older block shape, ran against both ids the same day and edited files on both; the Kilo Code guide has that run.
Tool calling on both ids went through 840 test requests that day across every route that serves them. The cases (auto choice, two calls in one turn, strict nested schema, tool result turn, streaming, Anthropic format) passed on all routes but for one dropped connection; forced choice on GLM failed on some routes, and the gateway now sends that request again to another route. Nothing beyond those cases was tested.
| Model | Priced at | 20-turn session |
|---|---|---|
| GLM-5.3 Abliterated | this API | $0.7023 |
| DeepSeek V4.1 Flash 1017 Abliterated | this API | $0.1505 |
| Claude Sonnet 5.5 | developer list | $0.2028 |
| Claude Opus 5.5 | developer list | $0.4056 |
A 20-turn agent session at live prices, using the token counts of one Claude Code run on GLM 5.3 Abliterated (2026-11-27); the Claude rows are at Anthropic's list price.
The Zen block, for comparison
Zen needs no provider block: run /connect, choose the OpenCode pay-as-you-go provider, paste the key from the OpenCode console, and name models as opencode/<id>.
{
"$schema": "https://opencode.ai/config.json",
"model": "opencode/claude-sonnet-5-5",
"small_model": "opencode/claude-haiku-5-5"
}
// after /connect -> OpenCode (pay as you go) and the key from opencode.ai/authKeep both and switch with /models; OpenCode remembers the last pick per project.
Check it
Confirm the key before you open the TUI:
curl https://api.uplinkswitch.com/v1/models \
-H "Authorization: Bearer $UPLINKSWITCH_API_KEY" \
-H "HTTP-Referer: https://uplinkswitch.ai" \
-H "X-Title: OpenCode"Then run opencode and /models. UplinkSwitch and the ids you listed appear in the picker. opencode auth list shows the stored credential if you used /connect. The first request shows in our console within seconds, with its token counts and price.
Good to know
@ai-sdk/openai-compatiblecalls/v1/chat/completions. OpenCode reserves@ai-sdk/openaifor/v1/responses; use the compatible package here.- Only the ids you list are offered. Add a new one to
modelswhen the Models page gains it. small_modelhandles light work such as titles. Leave it out and OpenCode picks a cheaper model from the provider if it finds one, otherwise the main model. Zen does the same with Haiku, Nano or Flash, which is why those show in a Zen usage history.blacklistandwhiteliston the provider hide or keep ids in/models, by the same ids.- Cached input bills at the cache-read price on the model page by itself; there is no switch to set.
The same key in other agents
Claude Code takes two environment variables; Cline, Kilo Code and Zoo Code (the fork that replaced Roo Code) take the base URL and key in a settings panel; OpenClaw reads a provider block much like OpenCode's. One balance serves all of them, and a key per tool keeps the spend apart in the console.
Questions
Related
- Claude Code alternatives compared
- Claude Code setup
- Codex CLI setup
- pi coding agent setup
- omp setup
- OpenClaw setup
- SDK setup
- Claude Sonnet 5.5
- GPT-5.3-Codex
- Kimi K2.7 Code
- GLM 5.3
- Claude API pricing
- GPT API pricing
- Kimi API pricing
- GLM API pricing
- GLM 5.2 vs Kimi K3
- GLM 5.2 vs Claude Sonnet 5
- Kimi K3 vs Claude Fable 5