Claude Code · Facts verified 2026-10-13

Can I use OpenCode Zen with Claude Code?

Not with a documented setup: OpenCode's Zen docs, now titled OpenCode Console, give no Claude Code configuration, though Zen serves Claude models on an Anthropic Messages endpoint under opencode.ai/inference that answered our test requests on October 13, 2026. OpenCode Go lists Claude Code as a validated client, but Go carries open-weight models only.

terminalundocumented
# Not documented by OpenCode. The endpoint answered our test requests
# in Anthropic's format on Oct 13, 2026; we did not run a session.
export ANTHROPIC_BASE_URL=https://opencode.ai/inference/anthropic
export ANTHROPIC_AUTH_TOKEN=YOUR_OPENCODE_KEY
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL=claude-sonnet-5-5
claude

Shell exports last for one terminal; put the same values in the env block of ~/.claude/settings.json to keep them. Run /status in Claude Code to check the base URL.

What OpenCode documents

Zen (OpenCode Console)OpenCode Go
Claude Code setupNoneListed as a validated client, no config given
Messages endpointDocumented for Claude and Qwen modelsDocumented for its Messages-format models
Claude modelsYes, pay-as-you-goNo
Required headersYour keyYour key, a client user agent and a session ID; Go recognizes Claude Code's own
Our test, October 13Anthropic-format errors, Bearer and x-api-key both readAsked for a session ID, then answered in Anthropic format

From OpenCode's Console models, inference API and Go docs, October 13, 2026. Our tests used no key or a fake key; we did not run a Claude Code session.

What a request would cost

Claude Code sessions are mostly cached reads, so Zen's cache price matters more than its headline rates. On Opus 5.5, Zen matches Anthropic's list price.

Cost per 100 requests, US dollars
Claude on Zen
Claude Opus 5.5$10.66
Claude Sonnet 5.5$6.49
Open-weight on Zen
GLM 5.3$5.72
DeepSeek V4.1 Flash$0.67
Coding-agent requests on our gateway, September 13 to October 12, 2026, averaging 133K input and 698 output tokens, 87% of input from cache, priced at Zen's listed rates. Zen lists Claude Sonnet 5.5 cached reads at $0.20 per million, twice Anthropic's $0.10, which is why Sonnet costs more here than at list price. The card fee (4.6% + $0.31 per top-up) comes on top.

OpenCode Zen and Go pricing in full

If you try it anyway

  • Use the Zen model IDs from opencode.ai/zen/v1/models, such as claude-sonnet-5-5, in ANTHROPIC_MODEL; Claude Code's default names may not match.
  • Set a workspace or user budget in the Console first. At the budget, new requests fail with HTTP 429 and running ones finish; at a zero balance, paid requests fail with HTTP 402.
  • OpenCode's terms limit use to your own internal use, not on behalf of a third party, so agencies should check before running client work through it.
  • Expect it to change without notice: an undocumented path is not a supported integration.

Documented ways to run other models in Claude Code

The catch

Zen is built and priced for OpenCode. If OpenCode is your agent, use Zen there, where it is documented; if Claude Code is your agent, a gateway that documents Claude Code will cost you fewer surprises.

Where Standard Compute fits

Standard Compute documents Claude Code on /v1/messages and keeps Claude Code's own model names, routing routine steps to efficient models inside a plan from $19 that stops at its budget. The same key works in OpenCode through models.dev. Inside OpenCode, with pay-as-you-go at cost, Zen remains a good choice.

FAQ

Does OpenCode Zen support the Anthropic Messages API?

Yes, for Claude and Qwen models: OpenCode's docs list /inference/anthropic/v1/messages and say Claude and Qwen models use the Messages API. It documents no Claude Code setup on top of it.

Can I use OpenCode Go in Claude Code?

OpenCode's Go docs list Claude Code as a validated client and say Go recognizes its native session header. Go includes open-weight models only, so Claude Code would run on those, not on Claude.

Is OpenCode Zen cheaper than the Anthropic API for Claude Code?

Not for Claude Sonnet 5.5: Zen's input and output prices match Anthropic's, but its cached-read price is $0.20 per million against Anthropic's $0.10, plus a card fee on top-ups. Opus 5.5 matches list price.

What is OpenCode Console?

The new name in OpenCode's docs for Zen, its pay-as-you-go model service; opencode.ai/docs/zen now redirects to the Console docs. The marketing page at opencode.ai/zen still uses the Zen name.

Related guides