Templates / Compare LLM token costs across 350+ models with OpenRouter

Compare LLM token costs across 350+ models with OpenRouter

Needs changes

by Philflow · 210 views · created 2025-12-24 · Engineering, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: LangChain Code (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What 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).

  1. Backend (Execute Sub-workflow): calls another n8n workflow
  2. Get Openrouter models (HTTP Request): calls openrouter.ai
  3. Get Openrouter models (HTTP Request): calls openrouter.ai
  4. Respond to Chat (Chat): uses Chat
  5. Split Out: splits a list into separate items
  6. Split Out: splits a list into separate items
  7. Code: runs custom JavaScript code
  8. Filter: keeps only the items that match a condition
  9. Form (n8n Form): shows the next form page
  10. LangChain Code: uses LangChain Code, with model: OpenRouter

…plus 3 more steps. See the full node list below.

Services it uses

OpenRouter Chat Model

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.0Replace with
LangChain Code (legacy)
LangChain Code
No direct replacement

Nodes used (12)

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,…

Excerpt from Philflow's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.