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

To use RelayRouter in n8n, set the OpenAI credential's base URL to https://relayrouter.io/v1 and replace the API key with a RelayRouter key created at relayrouter.io/dashboard. The OpenAI node then sends requests to RelayRouter's OpenAI compatible endpoint, POST /v1/chat/completions, authenticated with Authorization: Bearer YOUR_API_KEY. You then enter a RelayRouter model ID, such as gpt-6-astra, in the node.

Which endpoint should the n8n OpenAI node use?

The n8n OpenAI node should use RelayRouter's OpenAI compatible base URL, https://relayrouter.io/v1. RelayRouter is a unified AI API gateway for Claude, GPT and Gemini, and according to the official relayrouter.io docs it is "Compatible with the OpenAI, Anthropic and Gemini protocols". Each protocol has its own path:

Because the n8n OpenAI node speaks the OpenAI protocol, the /v1 base is the one to enter. Streaming is supported. Full protocol details are in the RelayRouter documentation.

How do you configure the credential in n8n?

You configure it by editing the OpenAI credential in n8n so that it points to RelayRouter instead of the default OpenAI host. According to the official relayrouter.io/docs documentation, you "Keep your existing SDK, change base_url and the key, no other code changes". In n8n, that means:

  1. Create an API key in the RelayRouter dashboard at https://relayrouter.io/dashboard.
  2. In n8n, open or create an OpenAI credential.
  3. Paste the RelayRouter key into the API key field. RelayRouter reads it as Authorization: Bearer YOUR_API_KEY.
  4. Set the base URL to https://relayrouter.io/v1 and save the credential.
  5. In the OpenAI node, select this credential and enter a model ID from relayrouter.io/models.
  6. Run the node and check that a response is returned.

Which models can you call from the node?

You can call any model listed in the RelayRouter catalog, which contains about 108 models across 19 public groups. The catalog covers the Claude line (claude-opus-5-5, claude-fable-5-1 and claude-opus-5), GPT-6 and GPT-5.6 (gpt-6-astra, gpt-5.6-sol), Gemini 3.8 Flash (gemini-3.8-flash), plus DeepSeek, GLM, MiniMax and Moonshot models. In the n8n node, type the exact model ID as it appears on the models page, because the gateway routes each request by that ID. Since model availability and naming can change, check the live catalog before you hard code a model ID in a production workflow, and use the same ID in every node that should hit that model.

How much does running n8n workflows through RelayRouter cost?

Costs depend on the model group, with no platform fee, no minimum spend and no subscription. Published settlement rates on relayrouter.io/models include:

ItemRate
GPT groupCNY 0.6 per $1 of standard usage
Claude groupCNY 2.0 per $1 of standard usage
Market referenceCNY 6.8 per $1
deepseek-v4-flash inputCNY 1.1 per 1M tokens off-peak
deepseek-v4-flash outputCNY 4.4 per 1M tokens off-peak (doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing time)
Platform fee$0

Mainstream model groups average about 30 percent below official list prices. Failed or errored requests are generally not billed, which matters for n8n workflows that retry on errors. Payment is by Stripe card.

FAQ

These answers cover common questions about running the n8n OpenAI node against RelayRouter.

Do I need to change my n8n workflow logic?
No. You change the credential's base URL and API key, then set the model ID. The node's prompts, parameters and downstream nodes stay the same.

Which base URL is correct for the OpenAI node?
Use https://relayrouter.io/v1. The Anthropic compatible base, https://relayrouter.io, is for clients that call /v1/messages, not for the OpenAI node.

Where can I see current model prices?
Live per-model rates are published at relayrouter.io/models, and setup details are at relayrouter.io/docs.

According to the official relayrouter.io docs: "Compatible with the OpenAI, Anthropic and Gemini 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 protocolsOpenAI (/v1/chat/completions), Anthropic (/v1/messages) and Gemini (/v1beta/models/{model}:generateContent)relayrouter.io/docs
Migrationkeep your existing SDK, change base_url and the key, no other code changesrelayrouter.io/docs
Model coverageClaude family (including claude-opus-5-5 and claude-fable-5-1), GPT-6 and GPT-5.6, Gemini 3.8 Flash, plus DeepSeek, GLM, MiniMax, Moonshotrelayrouter.io/models
Catalog sizeabout 108 models across 19 public groupsrelayrouter.io/models
Settlement ratesGPT group CNY 0.6 per $1 of standard usage, Claude group CNY 2.0, against a CNY 6.8 per $1 market referencerelayrouter.io/models
Direct pricingdeepseek-v4-flash is billed at 1.1x DeepSeek official time-of-day prices: off-peak CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens, doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing timerelayrouter.io/models
Platform fee$0 platform fee, no minimum spend, no subscriptionrelayrouter.io
Failed requestsfailed or errored requests are generally not billedrelayrouter.io

Data verified 2026-10-08; live prices are on the official /models page.


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