Foxwire Logo
OpenCode × Sozdai AI

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.

3-step setup
No per-provider accounts Pay-as-you-go, one balance ~3 minutes
opencode.json — the whole setup (swap in your key)
json
{
  "$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" }
      }
    }
  }
}
One key, every model

Claude, DeepSeek, Kimi and Qwen in a single config — no per-provider accounts.

Standard OpenAI format

OpenCode's openai-compatible adapter points straight at our API. Streaming included.

Pay per token

One balance, no subscriptions. Switch to cheaper models any time with /models.

Direct access

Programmatic access to the platform — one account, one balance.

Separate providers vs Sozdai

Direct to each providerVia Sozdai
Accounts & keysSeparate account + key per providerOne account, one key
PaymentForeign cards for each serviceRussian cards, rubles, one balance
ModelsLocked to one vendor per keyClaude + DeepSeek + Kimi + Qwen in one config
Switching modelsEdit config, new keys/models — two keystrokes

Set up in 3 steps

  1. 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. 2

    Install OpenCode

    Either way works:

    bash
    curl -fsSL https://opencode.ai/install | bash
    After installing, open a NEW terminal window (or run: source ~/.zshrc) — otherwise you may see “command not found”.
  3. 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.
    bash
    SOZDAI_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": {}
          }
        }
      }
    }
    EOF

    Then start it, and type /models inside to pick a Sozdai model:

    bash
    opencode
    Prefer 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 idBest forContextInput / 1M
claude-sonnet-5Main coding model1M480 ₽
qwen3-coder-nextCheap coding specialist262K24 ₽
deepseek-v4-flashBudget all-rounder1M34 ₽
kimi-k2.6Agent tasks, tools262K115 ₽
claude-haiku-4-5Fast & light200K160 ₽

Works the same in current OpenCode builds (incl. the Go build). Full price list.

FAQ

Do I need OpenAI or Anthropic accounts?

No. One Sozdai account and API key covers every model — requests are served and billed by Sozdai.

Can I pay with a Russian card?

Yes — top up your balance and pay per token, no subscription.

Does this work from Russia?

Yes — Sozdai provides direct programmatic access; no foreign accounts required.

Which model should I pick?

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.

How is this different from Claude Code?

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.

Why do I see free models in /models?

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.

zsh: command not found: opencode — what now?

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"

I get 401 / model not found — what now?

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.