Skip to content
Docs
Sign in

OpenClaw

OpenClaw includes OpenCode providers for pay-as-you-go and Go. It picks the right API for each paid or Go model and sends a session ID with every Go request. Free-tier chat models require OpenCode and return HTTP 403 from OpenClaw.

ProviderPlanModel prefix
opencodePay-as-you-goopencode/...
opencode-goGoopencode-go/...

The Go provider ships with OpenClaw. The pay-as-you-go provider is a plugin; install it if openclaw models list doesn’t show it.

Terminal
openclaw plugins install @openclaw/opencode-provider

Sign in from the browser instead of pasting a key. It needs OpenClaw 2026.11.7 or later.

Terminal
openclaw models auth login --provider opencode-go --method oauth

Open the link OpenClaw prints, confirm the code in Console, and pick a workspace with a Go subscription. OpenClaw keeps and refreshes the sign-in itself.

Each provider signs in separately. Sign in to opencode too for pay-as-you-go models.

Terminal
openclaw models auth login --provider opencode --method oauth

You can also choose OpenCode Go (browser sign-in) during openclaw onboard, with /login in chat, or from Settings › Models › Add account.

Both providers read the same key from OPENCODE_API_KEY. Create a personal API key and pass it to onboarding.

Terminal
openclaw onboard --opencode-go-api-key "$OPENCODE_API_KEY"

Or set it in ~/.openclaw/openclaw.json.

~/.openclaw/openclaw.json
{
  env: { vars: { OPENCODE_API_KEY: "oc_sk_..." } },
  agents: { defaults: { model: { primary: "opencode-go/kimi-k3" } } },
}

A key from a workspace without Go still lists Go’s models, but requests to them fail until the workspace subscribes.

Select a model as <provider>/<model-id>, using IDs from the Console or Go table. OpenClaw reads the model list from Console, so new models appear without an update.

Terminal
openclaw models list --provider opencode-go

Set the default model for your agents.

Terminal
openclaw config set agents.defaults.model.primary "opencode-go/kimi-k3"

Add the Console MCP server with OAuth, then sign in from the browser while the Gateway runs.

Terminal
openclaw mcp set opencode-console '{"url":"https://opencode.ai/console/mcp","transport":"streamable-http","auth":"oauth"}'
openclaw mcp login opencode-console