Use MagmaRouter in n8n

Use MagmaRouter in n8n

n8n's OpenAI credential has a Base URL field. Point it at MagmaRouter. One node setting matters: the OpenAI Chat Model node defaults to the Responses API, which MagmaRouter does not serve.

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

The OpenAI credential

Create an OpenAI credential and set:

  • API Key: your sk-mr-... key
  • Base URL: https://api.magmarouter.com/v1 (the field defaults to https://api.openai.com/v1)

n8n sends the key as an Authorization: Bearer header and tests the credential against /models, which MagmaRouter answers.

Turn off Use Responses API

The setting to check The OpenAI Chat Model node (version 1.3 and up) defaults "Use Responses API" to on. MagmaRouter serves /v1/responses, but turn it off for the plainest path through Chat Completions. Built-in tools that depend on the Responses API will not be available, which is expected.

With the credential and that toggle set, the OpenAI Chat Model node feeds the AI Agent node as normal. Pick a tool-capable model if the agent uses tools.

Related guides