Foxwire Logo
OpenCode × Foxwire.ai

OpenCode を動かす: Foxwire.ai

オープンソースのターミナル用エージェント。Foxwire のキー 1 つで、Claude、DeepSeek、Kimi、Qwen を 1 つの設定ファイルにまとめられます。モデルの切り替えは /models。

3 ステップで設定
プロバイダーごとのアカウント不要 従量課金・残高はひとつ 約 3 分
opencode.json — 設定はこれだけ(キーはご自身のものに)
json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "sozdai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Foxwire.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、Qwen を 1 つの設定で。プロバイダーごとのアカウントは不要です。

標準の OpenAI 形式

OpenCode の openai 互換アダプターが当社の API を直接指します。ストリーミングにも対応。

トークン単位の支払い

残高はひとつ、サブスクなし。/models でいつでも安いモデルに切り替え���れます。

直接アクセス

プラットフォームへのプログラムからの直接アクセス。アカウントも残高もひとつ。

各社に個別契約する場合と Foxwire の比較

各社に直接Foxwire 経由
アカウントとキープロバイダーごとに別々のアカウントとキーアカウントもキーもひとつ
支払いサービスごとに海外カードが必要Pay per token, one balance
モデルキーごとに 1 社に固定Claude + DeepSeek + Kimi + Qwen をひとつの設定に
モデルの切り替え設定を編集し、キーも用意し直す/models と打つだけ

3 ステップで設定

  1. 1

    Foxwire の API キーを作成

    登録してキーを作成します。キー全体(sk-corr- で始まる)をコピーしてください。手順 3 で貼り付けます。

  2. 2

    OpenCode をインストール

    どちらの方法でも構いません:

    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

    設定を置いて実行

    ファイルを手で作る必要はありません。下の 1 行目(自分のキー)を書き換え、ブロック全体をターミナルに貼り付けると設定が作られます。

    変えるのは 1 か所だけです。1 行目の sk-corr-... を手順 1 のキーに置き換えます(引用符はそのまま)。その後ブロック全体を貼り付けて Enter。
    bash
    SOZDAI_KEY="sk-corr-..."
    if [ "$SOZDAI_KEY" = "sk-corr-..." ]; then echo "STOP: replace sk-corr-... with your real key first"; else
    mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
    {
      "provider": {
        "sozdai": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "Foxwire.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
    echo "opencode.json created"; fi

    起動したら /models と入力して Foxwire のモデルを選びます:

    bash
    opencode
    キーをファイルに置きたくない場合は "apiKey": "{env:SOZDAI_API_KEY}" とし、その環境変数を export してください。

OpenCode に向くモデル

価格は入力 100 万トークンあたり。すべて同じ設定で動き、/models で切り替えられます。

モデル ID向いている用途コンテキスト入力 / 100 万
claude-sonnet-5主力のコーディングモデル1M$5.65
qwen3-coder-next低価格なコーディング特化262K$0.28
deepseek-v4-flash低価格の万能型1M$0.40
kimi-k2.6エージェント作業・ツール利用262K$1.35
claude-haiku-4-5高速・軽量200K$1.88

現行の OpenCode(Go 版を含む)でも同様に動作します。料金表の全体.

よくある質問

OpenAI や Anthropic のアカウントは必要ですか?

不要です。Foxwire のアカウントと API キーだけで全モデルを使えます。リクエストの処理も課金も Foxwire が行います。

How does billing work?

はい。残高をチャージしてトークン単位で支払います。サブスクはありません。

One key for all models — really?

Yes — Claude, DeepSeek, Kimi, Qwen and GPT all run through one Foxwire key, billed to one balance.

どのモデルを選べばいいですか?

まずは主力に Claude Sonnet 5 を。同じ使い方をぐっと安くしたくなったら Qwen3 Coder Next か DeepSeek V4 Flash に切り替えます。

Claude Code とどう違いますか?

OpenCode はオープンソースでモデル非依存、どのプロバイダーもひとつの設定にまとめられます。Claude Code は Anthropic の CLI で Claude プロトコル専用です。どちらも同じ Foxwire のキーで動きます。

/models に無料モデルが出るのはなぜ?

Those come from OpenCode's own Zen service — rotating promo models with rate limits and queues. Your Foxwire models are listed under the “Foxwire AI” provider: stable, no queues, and including Claude/GPT which the free tier doesn't have.

zsh: command not found: opencode と出たら?

インストーラーは opencode を ~/.opencode/bin に置き、~/.zshrc を更新します。開いたままのターミナルはその��の状態です。新しいターミナルを開くか source ~/.zshrc を実行してください。それでも見つからない場合は export PATH="$HOME/.opencode/bin:$PATH" を実行します。

401 や model not found が出たら?

401 の場合:opencode.json を開き、apiKey の行がプレースホルダーではなく実際のキー(sk-corr- で始まる)になっているか確認します。model not found の場合:上の表にあるモデル ID をそのまま使ってください(例:claude-sonnet-5)。

Claude Code もお使いですか?同じキーがそのまま使えます: Claude Code の設定 / Codex

3 分でコーディング開始

キーを作り、設定を置いて OpenCode を起動します。支払いは使った分だけです。