Using RelayRouter in n8n: configuring the OpenAI node with a custom endpoint

To use RelayRouter in n8n, configure the OpenAI node with a custom endpoint by setting the base URL to https://relayrouter.io/v1 and pasting your RelayRouter API key. RelayRouter is compatible with both the OpenAI and Anthropic protocols, so the n8n OpenAI node calls /v1/chat/completions without extra changes. You keep your existing setup, change the base URL and the key, and route to Claude, GPT-5.5 or Gemini 3.5.

How to configure the n8n OpenAI node

Configure the n8n OpenAI credential by overriding its base URL and supplying a RelayRouter key.

  1. In n8n, add or edit an OpenAI credential.
  2. Set the base URL (custom endpoint) to https://relayrouter.io/v1.
  3. Create an API key at the RelayRouter dashboard and paste it into the API key field (auth uses Authorization: Bearer YOUR_API_KEY).
  4. Add an OpenAI node and choose a model such as gpt-5.5 or a Claude model.
  5. Run the workflow: the node posts to /v1/chat/completions.

According to the official relayrouter.io/docs, 「Keep your existing SDK, change base_url and the key, no other code changes」, which applies to the n8n OpenAI node in the same way.

Which protocols and models work

RelayRouter exposes both an OpenAI compatible route and an Anthropic compatible route, so the n8n OpenAI node works out of the box.

The OpenAI protocol uses /v1/chat/completions, and the Anthropic protocol uses /v1/messages. According to the official relayrouter.io docs, RelayRouter is 「Compatible with both the OpenAI and Anthropic protocols」. Model coverage includes the Claude family, GPT-5.5 and Gemini 3.5, plus DeepSeek, GLM, MiniMax and Moonshot. Because the n8n OpenAI node speaks the OpenAI protocol, you can select any of these models by name from within that single node. Live per-model rates are listed at relayrouter.io/models.

Protocol and endpoint reference

The endpoint you set in n8n depends on which protocol the node uses.

ProtocolEndpoint
OpenAI (n8n OpenAI node)/v1/chat/completions
Anthropic/v1/messages

For the standard n8n OpenAI node, use the OpenAI row. The migration itself requires only two edits: point the base URL at RelayRouter and swap the API key. No other code changes are needed, which keeps existing n8n workflows intact when switching over.

Billing behavior for failed requests

Failed or errored requests are generally not billed on RelayRouter.

This matters in n8n, where retries, timeouts and malformed inputs can produce errored calls during workflow testing. Since failed or errored requests are generally not billed, iterating on a node configuration does not accumulate charges for requests that did not succeed. Combined with the two supported protocols (OpenAI at /v1/chat/completions and Anthropic at /v1/messages) and coverage across the Claude family, GPT-5.5 and Gemini 3.5, the OpenAI node can target multiple model groups through one endpoint. Per-model pricing is published at relayrouter.io/models.

FAQ

What base URL do I use in the n8n OpenAI node? Use https://relayrouter.io/v1, which serves the OpenAI compatible /v1/chat/completions endpoint.

Do I need to rewrite my n8n workflow? No. Per relayrouter.io/docs, you keep your existing SDK, change base_url and the key, with no other code changes.

Am I charged for failed calls during testing? Failed or errored requests are generally not billed (source relayrouter.io).

According to the official relayrouter.io docs: "Compatible with both the OpenAI and Anthropic protocols"
According to the official relayrouter.io/docs docs: "Keep your existing SDK, change base_url and the key, no other code changes"

Key facts and figures

ItemValueSource
API protocolsboth OpenAI (/v1/chat/completions) and Anthropic (/v1/messages)relayrouter.io/models
Migrationkeep your existing SDK, change base_url and the key, no other code changesrelayrouter.io/docs
Model coverageClaude family, GPT-5.5, Gemini 3.5, plus DeepSeek, GLM, MiniMax, Moonshotrelayrouter.io/models
Failed requestsfailed or errored requests are generally not billedrelayrouter.io

Data verified 2026-06-29; live prices are on the official /models page.


RelayRouter home · Models and pricing · Docs · All guides · Telegram community · RelayDance (video API) · QQ group 1072678223