Compare LLM token costs across 350+ models with OpenRouter
Needs changesWhat this workflow does
This AI workflow has 17 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenRouter Chat Model. It also calls openrouter.ai over HTTP.
How it runs
Trigger: When a chat message arrives (plus 2 other triggers).
- Backend (Execute Sub-workflow): calls another n8n workflow
- Get Openrouter models (HTTP Request): calls openrouter.ai
- Get Openrouter models (HTTP Request): calls openrouter.ai
- Respond to Chat (Chat): uses Chat
- Split Out: splits a list into separate items
- Split Out: splits a list into separate items
- Code: runs custom JavaScript code
- Filter: keeps only the items that match a condition
- Form (n8n Form): shows the next form page
- LangChain Code: uses LangChain Code, with model: OpenRouter
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: openrouter.ai
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- LangChain Code (legacy) in LangChain Code: no direct replacement.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| LangChain Code (legacy) LangChain Code | No direct replacement |
Nodes used (12)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Code
n8n-nodes-base.code - LangChain Code
@n8n/n8n-nodes-langchain.code - Filter
n8n-nodes-base.filter - n8n Form
n8n-nodes-base.form - Split Out
n8n-nodes-base.splitOut - Chat
@n8n/n8n-nodes-langchain.chat - n8n Form Trigger
n8n-nodes-base.formTrigger - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - HTTP Request
n8n-nodes-base.httpRequest
From the author
This n8n template lets you run prompts against 350+ LLM models and see exactly what each request costs with real-time pricing from OpenRouter Use cases are many: Compare costs across different models, plan your AI budget, optimize prompts for cost efficiency,…