FM
FlowMarket
AI Agents Intermediate ⚡ 8 n8n Nodes

Use OpenRouter in n8n versions 1.78

What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot of different LLM models and providers...

🔌 Nodes & Integrations Used (4)

Chat Trigger Agent Memory Buffer Window Lm Chat Open Ai

📖 Implementation & Setup Guide

What it is:

In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot of different LLM models and providers and change models on the fly in an agentic workflow.

For prior n8n versions, there's a workaround to make OpenRouter accessible, by using the OpenAI node with a OpenRouter-specific BaseURL.

This trivial workflow demonstrates this for version before 1.78, so that you can use different LLM model dynamically with the available n8n nodes for OpenAI LLM and OpenAI credentials.

What you can do:

* Use any of the [OpenRouter models](https://openrouter.ai/models) * Have the model even dynamically configured or changing (by some external config, some rule, or some specific chat message)

Setup steps:

* Import the workflow * Ensure you have registered and account, purchased some credits and created and API key for [OpenRouter.ai](https://openrouter.ai) * Configure the "OpenRouter" credentials with your own credentials, using an _OpenAI type_ credential, but making sure in the credential's config form its "Base URL" is set to _https://openrouter.ai/api/v1_ so OpenRouter is used instead of OpenAI. * Open the "Settings" node and change the model value to any valid model id from the [OpenRouter models list](https://openrouter.ai/models) or even have the model property set dynamically

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Use OpenRouter in n8n versions _1.78.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related AI Agents Workflows

View All in AI Agents →