Router One

One OpenAI credential between n8n and every model

n8n is the workflow automation platform where AI steps meet real business processes — and every AI Agent or OpenAI node bills through whatever credential you plug in. n8n's OpenAI credential ships with a Base URL field that accepts any OpenAI-compatible endpoint: point it at Router One and one credential covers GPT, Claude, Gemini, and DeepSeek family models. n8n orchestrates the workflow; the gateway meters it — every step's model call lands in one ledger, and a per-key maxSpend cap keeps a scheduled workflow from silently overrunning its budget.

Configure n8n to use the Router One base URL

In n8n, open Credentials → Add credential → OpenAI (or create one from the credential dropdown on any OpenAI or AI Agent node) and override the Base URL field — it defaults to api.openai.com and accepts any OpenAI-compatible endpoint:

n8n-openai-credential
# n8n → Credentials → Add credential → OpenAI
API Key:   sk-your-router-one-key
Base URL:  https://api.router.one/v1
# Organization ID: leave blank
# In the node: select this credential, set Model to <model-id-from-/models>

Which model ID should n8n send?

Copy the exact model ID from the /models page — IDs are case-sensitive, and the page lists each model's context window, capabilities, and current per-token rates. Create a dedicated API key per tool with its own maxSpend cap, so one runaway tool can't affect other workloads.

Verify the n8n call in your request trace

After your first request, open Dashboard → Logs to see its full trace: model, tokens, cost, latency, and status code. From here every n8n call has a ledger and a trail instead of being a black box.

FAQ

Which n8n nodes pick up this credential?

Every node that authenticates with n8n's OpenAI credential type — the OpenAI node and the OpenAI Chat Model behind AI Agent and LLM Chain nodes. Set the Base URL once in the credential; every workflow that selects it routes through the gateway, with no per-node changes.

Which models can n8n use through the gateway?

Any chat-capable model in the catalog — GPT, Claude, Gemini, Grok, DeepSeek, GLM, and Kimi families. The /models page is the source of truth for model IDs and per-token rates.

Does this work from Mainland China?

Yes. The gateway is reachable from Mainland China without a VPN, and the configuration is identical to the global setup.

How do I debug a 401/403/429?

Open Dashboard → Logs first to see whether requests reached the gateway and with what status, then walk the error-codes reference to check env vars, key status, and limits.