Setup Guideline

One-command setup · Windows and macOS

OpenCode + Space Router

Windows setup supports local, domain and Microsoft Entra ID (Azure AD) accounts. If an earlier setup failed with a SID configuration error, rerun the one-command installer below. No Windows or editor upgrade is needed for this fix.

Install OpenCode, the open-source terminal coding agent, and connect it to Space Router with GPT, Claude, and optional Fable/Grok models in one command.

Gateway: https://space.stationine.com · Installer review:

Keep your API key private. Never share a real API key in screenshots, chat messages, repositories, project files, or public documents. If a key has been exposed, revoke or rotate it in Space Router and create a new one.

Quick install — one command

This installer installs or updates OpenCode V1 CLI 1.18.34 and merges Space Router settings after a private backup. Skipped keys, other providers, projects and history are preserved. Login and caches are kept. It stops when Desktop V2 or native V2 configuration is detected to avoid a downgrade. Windows has isolated verification; macOS still needs a real-device acceptance test.

Where to paste the command. The one-line installer below runs in a text window — PowerShell on Windows, Terminal on macOS. You do not need to know anything else about it. The installer asks for separate GPT, Claude, and optional Fable/Grok API keys. Paste each sk- key you purchased and press Enter; skip an unpurchased group with Enter. It reports the setup ready only after the supplied routes pass a live request.

Windows

irm https://stationine.com/setup-opencode.ps1 | iex

macOS

curl -fsSL https://stationine.com/setup-opencode.sh | bash

Which keys to paste

The installer asks for separate GPT, Claude, and optional Claude Fable 5 / Grok keys. Paste every group you purchased to show all of them in the picker, or press Enter to skip a group. Access and pricing differ by group, so one group's key cannot be substituted for another.

Create keys in the Space Router dashboard under Tokens, then Create, choosing the matching group.

Start OpenCode

Open a new terminal window, go to the folder of the project you want to work on, and type opencode. Inside OpenCode, type /models to switch among Space Router (GPT), Space Router (Claude), and—when purchased—Space Router (Claude Fable 5). The exact Fable selection is space-router-fable/claude-fable-5. The default is GPT when a GPT key was given, then Claude, then Fable, then Grok. An unrelated existing default model is preserved.

If the terminal says opencode is not recognized, close every terminal window and open a new one; Windows Terminal keeps the old PATH until all its windows are closed.

Model or route unavailable?Check the model ID, key group and balance. An HTTP 404, insufficient balance, unavailable model and a failed download are different failures. Diagnose the failing step before changing workspace or login state.

Where the settings live

Settings live in ~/.config/opencode/opencode.json, or an existing opencode.jsonc; XDG_CONFIG_HOME is honored. Only Space Router providers whose keys were supplied are updated. Other values are preserved and the original file gets a private backup. JSONC comments and formatting may change. Conflicting files or configuration override variables cause setup to stop so you can reconcile the effective configuration.

Desktop V2 custom-provider error

If saving a provider reports Custom Providers are unavailable on this server, see the matching upstream Desktop V2 issue. Adding /v1 or reinstalling the V1 CLI does not establish a Desktop fix. V2 uses valid providers / package / settings configuration; preserve it instead of replacing it with V1 provider / npm / options. Confirm your version and follow the official V2 provider instructions after backing up your file. Match the key group, protocol and model. Desktop V2 remains outside this installer's acceptance.

What is Space Router?

Space Router is an AI API relay operated by Station Nine. Its base URL is https://space.stationine.com. It accepts Anthropic Messages requests at POST /v1/messages, OpenAI Chat Completions requests at POST /v1/chat/completions, and OpenAI Responses requests at POST /v1/responses, and it provides OpenAI GPT and Anthropic Claude model families. See the full Space Router overview for service and account details.