Choose a model, create an API key and configure your client using the appropriate protocol. Start with a short request to check your connection.
Grab a key from the Keys page, run the command for your OS, paste the key when asked. The script installs Claude Code if it's missing using a checksum-verified distribution download, then configures OpusGate (~/.claude/settings.json, an existing file is backed up to .bak), and never sends your key anywhere except that local file.
irm https://opusgate.dev/install.ps1 | iex
curl -fsSL https://opusgate.dev/install.sh | bash
Then just run claude (on Windows — in a new terminal). Piping scripts from the internet? Right to be careful — read the source first: install.ps1 / install.sh.
Pick whichever fits your workflow. Both share the same config file at ~/.claude/settings.json, so you can mix and match later. This is the condensed version — the full Claude Code guide covers model-slot overrides and troubleshooting.
npm install -g @anthropic-ai/claude-code
claude in any folder. Config flows from settings.json below.settings.json below.settings.jsonBoth the CLI and the VS Code extension read this file. Create it (or merge into the existing one), paste your API key, and restart Claude Code.
~/.claude/settings.jsonWindows%USERPROFILE%\.claude\settings.json{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"ANTHROPIC_BASE_URL": "https://api.opusgate.dev",
"ANTHROPIC_AUTH_TOKEN": "sk-og-...",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5.5",
"DISABLE_TELEMETRY": "1",
"DISABLE_ERROR_REPORTING": "1"
}
}sk-og-... with your key from the Keys page. Use ANTHROPIC_AUTH_TOKEN (sent as a Bearer token) — that's the right field for a gateway like OpusGate. Note: ANTHROPIC_BASE_URL has no /v1 suffix — Claude Code adds the path itself. The ANTHROPIC_DEFAULT_*_MODEL overrides re-map the Opus / Sonnet / Haiku aliases in /model to OpusGate's model IDs. Already have a settings.json? Just merge the env block in.Cmd+, / Ctrl+,).Developer: Reload Window from the Command Palette).If you'd rather not touch a config file, set two environment variables before launching Claude Code.
export ANTHROPIC_BASE_URL="https://api.opusgate.dev" export ANTHROPIC_AUTH_TOKEN="sk-og-..." claude
$env:ANTHROPIC_BASE_URL="https://api.opusgate.dev" $env:ANTHROPIC_AUTH_TOKEN="sk-og-..." claude
~/.zshrc, ~/.bashrc, or your PowerShell profile.The model ID is what you put in your SDK call or config (e.g. model: "claude-opus-5-5"). Names look familiar but exact IDs may differ from upstream providers — copy from here to be safe.
USD pricing. Text input, output and cache tokens have separate rates. “Not reported” means the provider has not supplied that value. Compare up to three models; open a model for its full limits and setup.
OpusGate is wire-compatible with the Anthropic /v1/messages and OpenAI /v1/chat/completions APIs. Use the guide for your client and check the selected model’s capabilities. A configurable base URL alone does not guarantee support for every client feature.
Point the tool at https://api.opusgate.dev and use your sk-og-... key as the API key. For OpenAI-flavoured tools the base path is https://api.opusgate.dev/v1.
Calling the API directly from code? See endpoints & auth, error codes and rate limits. Billing questions — minimums, bonuses, refunds — live in billing & pricing.