One command.

The installer checks your key, installs the harness if you do not have it, and points it at MagmaRouter. Nothing else on your machine is touched.

1. Get a key

Sign in with a six digit code, mint a key, give it a cap. It is shown once.

Get API key

2. Run the installer

Paste your key in place of rl-.... This installs Claude Code if it is missing and sets the variables for your user.

$env:MR_KEY='rl-...'; irm https://magmarouter.com/install.ps1 | iex

For Codex instead:

$env:MR_KEY='rl-...'; $env:MR_HARNESS='codex'; irm https://magmarouter.com/install.ps1 | iex

3. Run it

claude

That is the whole setup. Usage, keys and billing live in the dashboard.

What the installer will not do It installs no software you did not ask for, edits nothing outside its own marked block, and sends your key nowhere except this gateway. If you would rather not pipe a script into a shell, the same variables are listed below and setting them by hand is identical.

By hand, if you prefer

Claude Code, and anything using the Anthropic SDK:

export ANTHROPIC_BASE_URL=https://api.magmarouter.com
export ANTHROPIC_AUTH_TOKEN=rl-...
export ANTHROPIC_MODEL=qwen/qwen3-coder-30b-a3b-instruct
export ANTHROPIC_DEFAULT_HAIKU_MODEL=qwen/qwen3-30b-a3b-instruct-2507
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144

Codex, and anything using the OpenAI SDK:

export OPENAI_BASE_URL=https://api.magmarouter.com/v1
export OPENAI_API_KEY=rl-...

Every other tool is the same two ideas, a base URL and a key. The guides cover 22 of them, and the docs explain what the gateway does with the request once it arrives.