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.
Sign in with a six digit code, mint a key, give it a cap. It is shown once.
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
Writes one marked block into your shell profile. Re-running replaces that block rather than stacking duplicates.
curl -fsSL https://magmarouter.com/install.sh | sh -s -- rl-...
For Codex instead:
curl -fsSL https://magmarouter.com/install.sh | sh -s -- rl-... codex
claude
That is the whole setup. Usage, keys and billing live in the dashboard.
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.