opusgate.
ModelsQuickstartPricing
Getting started
Overview
Setup guides
Claude CodeCodex CLICursorClineRoo CodeKilo CodeContinueOpenCode
API reference
Endpoints & authError codesRate limits
Account
API keysBilling & pricing
Reference
FAQTerms of ServicePrivacy Policy
opusgate.Opening your next page…
← PreviousOverviewNext →Codex CLI
opusgate.

AI models, one connection.
Build with your tools or start in chat.

Product

ModelsPricingWorkspacePayment methods

Get connected

Claude CodeCursorAPI referenceAll setup guides

Help

SupportFAQTermsPrivacy
© 2026 OpusGateModel and tool names belong to their respective owners.

Claude Code

Anthropic's official coding agent (CLI + VS Code extension). The one command below sets everything up; prefer to see each step — the full manual walkthrough follows, with troubleshooting at the end.

Optional Claude Code installer

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.

Windows (PowerShell)
PowerShell
irm https://opusgate.dev/install.ps1 | iex
macOS / Linux
Bash
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. Prefer manual setup? Follow the steps below.

Manual setup

Everything the installer does, by hand — install, then permanent config via settings.json, then run.

Required values — everything else is optional
ANTHROPIC_BASE_URL = https://api.opusgate.dev — no /v1 suffix, Claude Code adds the path itself.
ANTHROPIC_AUTH_TOKEN = your sk-og-... key from the Keys page.

1. Install Claude Code

Skip if claude --version already works.

macOS / Linux
Bash
curl -fsSL https://claude.ai/install.sh | bash
claude --version
Windows (PowerShell)
PowerShell
irm https://claude.ai/install.ps1 | iex

After the installer finishes, fully close and reopen PowerShell, then check claude --version. Prefer npm? npm install -g @anthropic-ai/claude-code works on all platforms.

claude.ai returns 403 in your region?
Installer availability depends on your network and the distributor. The optional installer above uses a distribution download with checksum verification. If it fails, consult the distributor’s installation instructions; no installation method is guaranteed to work in every region.

2. Recommended: permanent setup via settings.json

Claude Code reads ~/.claude/settings.json on every start — configure once and forget. Both the CLI and the VS Code extension use the same file.

macOS / Linux~/.claude/settings.jsonWindows%USERPROFILE%\.claude\settings.json
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"
  }
}

Already have a settings.json? Merge the env block into it instead of replacing the file.

3. What this config does

Connection
JSON
"ANTHROPIC_BASE_URL": "https://api.opusgate.dev",
"ANTHROPIC_AUTH_TOKEN": "sk-og-..."

Routes every request to OpusGate instead of the official Anthropic endpoint. Use ANTHROPIC_AUTH_TOKEN (sent as a Bearer token), not ANTHROPIC_API_KEY — the token variant is the correct field for a gateway and also stops Claude Code from asking you to log in to Anthropic.

Model slot overrides
JSON
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5.5"

Claude Code's /model menu has three fixed slots — Opus, Sonnet, Haiku. These variables re-map each slot to an OpusGate model ID. Use an available Claude model from the catalog and check its supported features. The example IDs above were checked against the catalog on 17 October 2026.

Privacy switches (optional)

DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING stop Claude Code's usage analytics and crash reports to Anthropic. They do not affect functionality — keep or drop as you like.

4. Non-interactive install (CI, scripts)

The one-command installer from the top of this page can also run unattended — pass the key inline instead of typing it at the prompt:

PowerShell
$env:OPUSGATE_KEY = "sk-og-..."; irm https://opusgate.dev/install.ps1 | iex
Bash
curl -fsSL https://opusgate.dev/install.sh | OPUSGATE_KEY="sk-og-..." bash

5. Run

Bash
claude

That's it — the config is picked up automatically. To verify the connection, ask it anything; the first reply confirms billing against your OpusGate balance (check Transactions). Switch models any time with /model.

6. One-off run without settings.json

For a quick test only — the variables live until you close the terminal.

macOS / Linux
Bash
export ANTHROPIC_BASE_URL="https://api.opusgate.dev"
export ANTHROPIC_AUTH_TOKEN="sk-og-..."
claude
Windows (PowerShell)
PowerShell
$env:ANTHROPIC_BASE_URL = "https://api.opusgate.dev"
$env:ANTHROPIC_AUTH_TOKEN = "sk-og-..."
claude

7. VS Code extension: one extra step

  1. Install the extension: open in VS Code or via the Marketplace.
  2. Make sure ~/.claude/settings.json from step 2 exists — the extension reads the same file.
  3. In VS Code settings (Ctrl/Cmd + ,) enable Claude Code: Disable Login Prompt so it stops offering an Anthropic sign-in.
  4. Reload the window (Developer: Reload Window).

8. Troubleshooting

Windows: claude is not recognized

Close PowerShell completely and open a new window — PATH updates don't reach already-open terminals. Still failing? Run where.exe claude: if nothing is found, re-run the install script from step 1.

Claude Code asks me to log in to Anthropic

That means it doesn't see your token. Check that the key is set as ANTHROPIC_AUTH_TOKEN (not ANTHROPIC_API_KEY) and that settings.json is valid JSON — a trailing comma silently breaks the whole file. If you previously logged in with an Anthropic account, run /logout once.

401 invalid_api_key

The key was mistyped, revoked, or has whitespace around it. Keys are shown once at creation — if in doubt, issue a new one. All error responses are listed on the error codes page.

402 / requests suddenly failing after working fine

Almost always an empty balance. Top up and retry — no restart needed.