---
title: Chat OpenRouter
description: Route to hundreds of models across providers through OpenRouter.
---

Give an AI node access to hundreds of models from many providers (Anthropic, OpenAI, Google, Meta, Mistral and more) with one OpenRouter API key.

Pick a saved connection in the **Authentication** field, or create one from there.

## What it does

Chat OpenRouter is a model you plug into the **Model** slot of an AI node, such as the [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/) or [Basic LLM Chain](/nodes/builtin/ai/aiagents/basicllmchainnode/). It does not run on its own and has no output. When the AI node runs, it sends its messages to OpenRouter, which passes them to the model you chose and returns the reply. You pay OpenRouter, from one balance, whatever the model.

* **Temperature** is 0 when you leave it empty, so answers are focused and repeatable.
* Replies are capped at **Max Tokens** (4096 by default). This also stops OpenRouter from reserving credit for a model's whole output window, which can fail on a small balance.
* A failed request is retried up to **Max Retries** times (2 by default). A request that gets no answer within 60 seconds fails.

## When to use it

* You want to try or compare models from several providers without an account at each.
* You want one bill and one key for all your AI nodes.
* You want free or very cheap models that OpenRouter lists.

## Inputs and settings

**Model** is OpenRouter's model slug, in the form `provider/model`, for example `anthropic/claude-3.5-sonnet`. Copy it from the model's page on OpenRouter.

## Outputs

This node has no output port. It plugs into a slot on another node instead of passing items along.

* **Model** slot of [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/), [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/), [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/), [Basic LLM Chain](/nodes/builtin/ai/aiagents/basicllmchainnode/), [Indexer](/nodes/builtin/ai/aiagents/indexernode/), [Text Classifier](/nodes/builtin/ai/aiagents/textclassifiernode/), [Sentiment Analysis](/nodes/builtin/ai/aiagents/sentimentanalysisnode/), [Summarization](/nodes/builtin/ai/aiagents/summarizationchainnode/), [Information Extractor](/nodes/builtin/ai/aiagents/informationextractornode/), [Guardrails](/nodes/builtin/ai/aiagents/guardrails/), [Auto-fixing Output Parser](/nodes/builtin/ai/aidependencies/outputparser/autofixingoutputparser/)

The AI node you connect it to produces the output. Chat OpenRouter only decides which model answers.

## Dependencies and credentials

* **Authentication** (connection): required. See [Connect OpenRouter](/app/connections/openrouter/).

In **Authentication**, use a Bearer Token credential that holds your OpenRouter API key. Create the key at [openrouter.ai/keys](https://openrouter.ai/keys). See [Create a credential](/app/connections/create/).

## Example workflow

1. A [Context Menu](/nodes/builtin/trigger/contextmenu/) trigger on selected text.
2. [Sentiment Analysis](/nodes/builtin/ai/aiagents/sentimentanalysisnode/) with **Text** `{{ $input.selectionText }}`.
3. Chat OpenRouter in its **Model** slot, **Model** `anthropic/claude-3.5-sonnet`.
4. [Browser Notification](/nodes/extension/browsernotification/) with **Message** `{{ $input.sentiment }}`.

## Common issues

* **"Model parameter is required and cannot be empty".** Fill in **Model**.
* **A 402 error.** Your OpenRouter balance is too low for the request. Add credit, or lower **Max Tokens**.
* **A "not a valid model ID" error.** The slug is wrong. Copy it exactly from OpenRouter, including the `provider/` part.
* **A 401 error.** The key is wrong or deleted. Create a new key and update the credential.

## Related nodes

* [Chat Anthropic](/nodes/builtin/ai/aidependencies/llm/anthropic/), [Chat OpenAI](/nodes/builtin/ai/aidependencies/llm/openai/): go to one provider directly.
* [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/): an agent that can use tools and memory.
* [Sentiment Analysis](/nodes/builtin/ai/aiagents/sentimentanalysisnode/): tell if a text is positive, negative or neutral.