Package Information
Available Nodes
Documentation generating…
Documentation
n8n-nodes-openrouter-advanced
An n8n community node for the OpenRouter API.
n8n ships an OpenRouter chat model node, but it only exposes nine settings. This package
covers the inference side of the API properly: chat, responses, Anthropic-style messages,
image generation, video generation, text-to-speech, transcription, embeddings and reranking —
plus the OpenRouter-specific controls that make it worth using in the first place, like
provider routing, plugins, reasoning effort and hard price ceilings.
Two nodes
OpenRouter — a regular action node. Drag it into a workflow to call any of the endpoints below.
OpenRouter Chat Model (Advanced) — an AI sub-node. Connect it to an AI Agent, Basic LLM
Chain, or any other node that takes a language model. It does everything the built-in
OpenRouter Chat Model does, plus provider routing, plugins, reasoning control and model fallbacks.
Both use the existing OpenRouter credential that ships with n8n, so there is no new
credential to set up and nothing to re-enter.
What it covers
| Resource | Operations |
|---|---|
| Chat | Complete |
| Response | Create |
| Message | Create (Anthropic format) |
| Image | Generate, List Models |
| Video | Generate, Generate and Wait, Get Status, Download, List Models |
| Audio | Text to Speech, Transcribe |
| Embedding | Create, List Models |
| Rerank | Rerank |
| Model | List, Get, List Endpoints, List Providers |
Provider routing
Decide which upstream provider serves each request: order, allow-list, ignore-list, sort by
price / throughput / latency / accuracy, quantization filter, zero data retention, data
collection policy, latency and throughput preferences, and max price ceilings per prompt
token, completion token, image or whole request. The request fails rather than exceeding them.
Plugins
All ten are supported, each with its own settings: Web Search, Web Fetch, File Parser,
Moderation, Response Healing, Context Compression, Auto Router, Pareto Router and Fusion.
Reasoning
Effort from minimal through max, plus how much of the reasoning trace to return.
Everything else
Model fallback chains, structured output (JSON object, JSON schema, grammar, Python), tool
calling, prompt caching, the full sampling parameter set, session IDs, tracing metadata and
leaderboard attribution headers.
Installing
The package is built and symlinked into n8n's custom-node folder:
cd "/run/media/nothingness/New Volume/Custom N8n Nodes/n8n-nodes-openrouter-advanced"
npm install && npm run build
ln -sfn "$PWD" ~/.n8n/custom/node_modules/n8n-nodes-openrouter-advanced
Restart n8n afterwards so it picks the nodes up.
Note: the package lives on the external drive. If the drive is not mounted, n8n will
start without these nodes and any workflow using them will fail to load.
Development
npm run build # compile TypeScript and copy icons
npm run dev # recompile on change
npm run lint # n8n community-node lint rules
npm run lintfix # autofix what it can
Dependency pinning
@langchain/core, @langchain/openai, @n8n/ai-utilities and n8n-workflow are pinned to
the exact versions n8n 2.31.5 ships. Node resolves modules from this package's ownnode_modules rather than n8n's, so matching the versions keeps the sub-node behaving
identically to the built-in one. If you upgrade n8n, re-check these against the new install:
node -p "require('n8n-workflow/package.json').version"
Notes
- Streaming is off on the action node. n8n returns a complete item per execution, so there
is nothing to stream into. The sub-node streams normally through LangChain. - Video generation is asynchronous. Generate submits the job and returns a job ID.
Generate and Wait submits, polls, and downloads the finished file, with a configurable
poll interval and timeout. If it times out, the job ID is included in the error so you can
pick it up later with Get Status. - Binary data: generated images, speech and video are written to a binary field you name.
Transcription and image/video references read from binary fields on the incoming item. - Enterprise and account-management endpoints (Workspaces, SCIM, Guardrails, Observability,
BYOK, API Keys, Credits, Activity, Analytics, Files, Presets) are deliberately out of scope.
They can be added as extra resources later without restructuring anything.
Licence
MIT