RunOpenCode throughtheprivate router.
One key connects OpenCode to 200+ models behind a single OpenAI-compatible endpoint. Prompts, diffs, and keys pass through in memory and are never stored.

Why AnonRouter
Your agent reads everything. The router remembers nothing.
A coding agent ships files, diffs, and shell output with every request. AnonRouter forwards it all in memory and settles billing from usage metadata alone.
One key, every model
A single key reaches 200+ chat models across providers. Add routes to opencode.json and switch between them with /models, no extra accounts.
Nothing stored
Prompts, diffs, responses, and keys are never written to disk. There is no request history to leak, resell, or train on.
Labeled privacy
Every route is labeled with the guarantee it actually provides: Anonymous, Private, TEE, or E2EE. E2EE adds client-side encryption to TEE isolation.
Setup
Connected in four steps
OpenCode already speaks the OpenAI API, so there is nothing to patch and no plugin to install. Point it at the router, hand it a key, and every catalog model is a /models away.
STEP 01
Install OpenCode
OpenCode is an open-source coding agent that runs in your terminal and works with any OpenAI-compatible provider. One command installs it.
# One-line install
curl -fsSL "https://opencode.ai/install" | bash
# Or with a package manager
npm install -g opencode-ai
brew install opencodeSTEP 02
Create a compatibility key
Create an inference key in the dashboard and enable OpenAI-compatible access on it. The key is prefixed ar_ and shown once, so copy it right away. Then run /connect inside OpenCode, scroll to Other, and enter anonrouter as the provider id.
/connect
┌ Select provider
│ ● Other
└
┌ Provider id
│ anonrouter
└
┌ API key
│ ar_****************
└
STEP 03
Add the provider
Drop this into opencode.json in your project root, or into ~/.config/opencode/opencode.json to use the router everywhere. Any model id from the catalog works as an entry. Prefer environment variables over /connect? Set "apiKey": "{env:ANONROUTER_API_KEY}" under options instead.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anonrouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "AnonRouter",
"options": {
"baseURL": "https://api.anonrouter.ai/v1"
},
"models": {
"anthropic/claude-opus-4.8": {
"name": "Claude Opus 4.8",
"limit": { "context": 200000, "output": 64000 }
},
"anthropic/claude-sonnet-5": {
"name": "Claude Sonnet 5"
},
"moonshotai/kimi-k2.5": {
"name": "Kimi K2.5"
},
"qwen/qwen-3-coder-480b-turbo": {
"name": "Qwen 3 Coder 480B"
}
}
}
}
}STEP 04
Pick a model and build
Start opencode, run /models, and select a route. Switch models mid-session whenever the task changes. Every request is billed at the provider rate and metered from usage metadata alone.
/models
┌ Select model
│ ● Claude Opus 4.8 anonrouter
│ ○ Claude Sonnet 5 anonrouter
│ ○ Kimi K2.5 anonrouter
│ ○ Qwen 3 Coder 480B anonrouter
└ enter to select
OpenCode authenticates with a static key, so requests ride the compatibility broker: the key is verified, a single-use ticket is minted in memory, and the request is forwarded with metadata-only logging. Building your own client? The ticket flow offers full unlinkability. Read the docs
Frequently asked questions
Usage metadata only: model, token counts, status, latency, and cost. Prompts, diffs, and responses pass through in memory and are never written to disk.
Claude Opus 4.8 and Claude Sonnet 5 are the strongest all-rounders for agentic coding. Kimi K2.5, GLM 5.2, and Qwen 3 Coder 480B are capable open-weight alternatives at a fraction of the price. Add several to your config and switch per task with /models.
Your code is not our business.