From zero to your first call in 60 seconds.
OpusGate is a drop-in replacement for the Anthropic and OpenAI APIs at a fraction of the price. Point any compatible tool at https://api.opusgate.dev and you're done.
Grab a key from the Keys page, run the command for your OS, paste the key when asked — done. The script installs Claude Code if it's missing (checksum-verified download of the official binary that works even where claude.ai is geo-blocked), connects it to 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.
Set up Claude Code
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.Drop-in settings.json
Both 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-4.8",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4.6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.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.- Open VS Code settings (
Cmd+,/Ctrl+,). - Search for Claude Code: Disable Login Prompt and check it. This stops the extension from trying to sign in with an Anthropic account.
- Reload the window (
Developer: Reload Windowfrom the Command Palette).
Or just export env vars
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.Available models & pricing
The model ID is what you put in your SDK call or config (e.g. model: "claude-opus-4.7"). Names look familiar but exact IDs may differ from upstream providers — copy from here to be safe.
Using a different tool?
OpusGate is wire-compatible with the Anthropic /v1/messages and OpenAI /v1/chat/completions APIs. Anything that lets you change the base URL will work — Cursor, Cline, Roo Code, Continue, Kilo Code, OpenCode, Aider, and so on.
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.