Connecting is two things: the base URL below, and a key you make. Any OpenAI-compatible tool takes both and starts talking to MagmaRouter. Nothing is installed.
https://api.magmarouter.com/v1
The base URL. An Anthropic-compatible endpoint lives at the same host on /v1/messages.
Open the dashboard, create a key and give it a cap. It is shown once, because the gateway keeps only a hash of it. Paste it in place of sk-mr-... below.
Most tools read these two environment variables. Set them and point the tool at MagmaRouter with no other change:
export OPENAI_BASE_URL=https://api.magmarouter.com/v1
export OPENAI_API_KEY=sk-mr-...
On Windows PowerShell: $env:OPENAI_BASE_URL='https://api.magmarouter.com/v1' and $env:OPENAI_API_KEY='sk-mr-...'.
GET https://api.magmarouter.com/v1/models for the catalogue, or copy one from the models page, and set it on the call. An unknown id is a 400 that names it.opencode reads its providers from ~/.config/opencode/opencode.json, and takes the key from the environment by name, so the file itself holds no secret:
{
"provider": {
"magmarouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "MagmaRouter",
"options": {
"baseURL": "https://api.magmarouter.com/v1",
"apiKey": "{env:MAGMAROUTER_API_KEY}"
},
"models": {
"glm-5.3-xploded": {
"name": "Qwen3 Coder 30B"
}
}
}
},
"model": "magmarouter/glm-5.3-xploded"
}
export MAGMAROUTER_API_KEY=sk-mr-...
The DeepSeek Harness has one provider, deepseek-official, and repointing it is a block in ~/.dsh/settings.yaml plus the key in the environment:
llm-deepseek:
baseURL: https://api.magmarouter.com/v1
apiKeyEnv: DEEPSEEK_API_KEY
models:
- id: glm-5.3-xploded
name: Qwen3 Coder 30B
contextWindow: 200000
agent-default-model:
provider: deepseek-official
model: glm-5.3-xploded
export DEEPSEEK_API_KEY=sk-mr-...
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.