Run OpenCode on Sozdai AI
The open-source terminal agent, powered by one Sozdai key: Claude, DeepSeek, Kimi and Qwen in a single config file. Switch models with /models.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"sozdai": {
"npm": "@ai-sdk/openai-compatible",
"name": "Sozdai AI",
"options": {
"baseURL": "https://api.foxwire.ai/v1",
"apiKey": "sk-corr-..."
},
"models": {
"claude-sonnet-5": { "name": "Claude Sonnet 5" },
"claude-haiku-4-5": { "name": "Claude Haiku 4.5" },
"deepseek-v4-flash": { "name": "DeepSeek V4 Flash" },
"kimi-k2.6": { "name": "Kimi K2.6" },
"qwen3-coder-next": { "name": "Qwen3 Coder Next" }
}
}
}
}Claude, DeepSeek, Kimi and Qwen in a single config — no per-provider accounts.
OpenCode's openai-compatible adapter points straight at our API. Streaming included.
One balance, no subscriptions. Switch to cheaper models any time with /models.
Programmatic access to the platform — one account, one balance.
Separate providers vs Sozdai
| Direct to each provider | Via Sozdai | |
|---|---|---|
| Accounts & keys | Separate account + key per provider | One account, one key |
| Payment | Foreign cards for each service | Russian cards, rubles, one balance |
| Models | Locked to one vendor per key | Claude + DeepSeek + Kimi + Qwen in one config |
| Switching models | Edit config, new keys | /models — two keystrokes |
Set up in 3 steps
- 1
Create a Sozdai API key
Sign up and create a key. Copy the whole key (starts with sk-corr-) — you will paste it in step 3.
- 2
Install OpenCode
Either way works:
bashcurl -fsSL https://opencode.ai/install | bashAfter installing, open a NEW terminal window (or run: source ~/.zshrc) — otherwise you may see “command not found”. - 3
Drop the config and run
No manual file creation: edit the first line below (your key), then paste the whole block into the terminal — it creates the config for you.
You only edit ONE thing: in the first line, replace sk-corr-... with your key from step 1 (keep the quotes). Then paste the whole block and press Enter.bashSOZDAI_KEY="sk-corr-..." mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF { "provider": { "sozdai": { "npm": "@ai-sdk/openai-compatible", "name": "Sozdai AI", "options": { "baseURL": "https://api.foxwire.ai/v1", "apiKey": "$SOZDAI_KEY" }, "models": { "claude-sonnet-5": {}, "claude-haiku-4-5": {}, "deepseek-v4-flash": {}, "kimi-k2.6": {}, "qwen3-coder-next": {} } } } } EOFThen start it, and type /models inside to pick a Sozdai model:
bashopencodePrefer not to keep the key in a file? Use "apiKey": "{env:SOZDAI_API_KEY}" and export that variable instead.
Best models for OpenCode
Prices per 1M input tokens. All work in the same config — switch with /models.
| Model id | Best for | Context | Input / 1M |
|---|---|---|---|
| claude-sonnet-5 | Main coding model | 1M | 480 ₽ |
| qwen3-coder-next | Cheap coding specialist | 262K | 24 ₽ |
| deepseek-v4-flash | Budget all-rounder | 1M | 34 ₽ |
| kimi-k2.6 | Agent tasks, tools | 262K | 115 ₽ |
| claude-haiku-4-5 | Fast & light | 200K | 160 ₽ |
Works the same in current OpenCode builds (incl. the Go build). Full price list.
FAQ
No. One Sozdai account and API key covers every model — requests are served and billed by Sozdai.
Yes — top up your balance and pay per token, no subscription.
Yes — Sozdai provides direct programmatic access; no foreign accounts required.
Start with Claude Sonnet 5 as the main model; switch to Qwen3 Coder Next or DeepSeek V4 Flash when you want the same workflow much cheaper.
OpenCode is open source and model-agnostic — any provider in one config. Claude Code is Anthropic's CLI locked to the Claude protocol. Both run on the same Sozdai key.
Those come from OpenCode's own Zen service — rotating promo models with rate limits and queues. Your Sozdai models are listed under the “Sozdai AI” provider: stable, no queues, and including Claude/GPT which the free tier doesn't have.
The installer puts opencode in ~/.opencode/bin and updates ~/.zshrc — your open terminal predates that. Open a new terminal, or run: source ~/.zshrc. Still missing? Run: export PATH="$HOME/.opencode/bin:$PATH"
401: open opencode.json and check the apiKey line contains your real key (starts with sk-corr-), not the placeholder. Model not found: use exact model ids from the table above (e.g. claude-sonnet-5).
Also using Claude Code? Same key works: Claude Code setup
Start coding in 3 minutes
Create a key, drop the config, run OpenCode. Pay only for what you use.
