> ## Documentation Index
> Fetch the complete documentation index at: https://openclawdoc.org/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

> OpenCode Zen の厳選モデルを OpenClaw で使う設定ガイドです。beta 提供の位置づけ、API キーの使い方、provider 設定の流れを確認できます。

OpenCode Zen は、OpenCode チームがコーディング エージェント向けに推奨する**厳選モデル一覧**です。
API キーと `opencode` provider を使う、任意のホスト型モデル アクセス経路として利用できます。
Zen は現在 beta です。

## CLI セットアップ

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw onboard --auth-choice opencode-zen
# または non-interactive
openclaw onboard --opencode-zen-api-key "$OPENCODE_API_KEY"
```

## 設定例

```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  env: { OPENCODE_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "opencode/claude-opus-4-6" } } },
}
```

## 注意事項

* `OPENCODE_ZEN_API_KEY` も利用できます。
* Zen にサインインし、請求情報を登録したうえで API キーを取得してください。
* OpenCode Zen はリクエスト単位で課金されます。詳細は OpenCode のダッシュボードを確認してください。
