Use MagmaRouter with Aider

Use MagmaRouter with Aider

Aider reaches an OpenAI-compatible endpoint through the OPENAI_API_BASE variable and an openai/ model prefix. Set both and Aider talks to MagmaRouter.

Base URL
https://api.magmarouter.com/v1
API key
Get one, starts sk-mr-
Example model
glm-5.3-xploded

Set the base URL and prefix the model

Config
# Windows (new shell required after setx)
setx OPENAI_API_BASE https://api.magmarouter.com/v1
setx OPENAI_API_KEY sk-mr-...

aider --model openai/glm-5.3-xploded

Or put it in .aider.conf.yml:

YAML
model: openai/glm-5.3-xploded
openai-api-base: https://api.magmarouter.com/v1
openai-api-key: sk-mr-...
The openai/ prefix is required Aider routes on the model prefix. Without openai/ it does not know to use OPENAI_API_BASE. Aider may warn "Unknown context window size"; add a .aider.model.metadata.json entry or pass --no-show-model-warnings.

Pick a model

Each page has the Aider setup with that model's id and limits filled in, and what a session costs.

Related guides