Skip to product information

n8n Claude LLM Router: Route Tasks to Cheapest Capable Models

n8n Claude LLM Router: Route Tasks to Cheapest Capable Models

 (200+Reviews)
Regular price £66.99
Regular price £66.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Claude LLM Router: Route Tasks to Cheapest Capable Models

n8n Claude LLM Router: Route Tasks to Cheapest Capable Models

Regular price £66.99
Regular price £66.99 Sale price
SAVE Sold out

Route Claude tasks to the cheapest capable model—then escalate only when quality demands it

This n8n workflow is an n8n Claude LLM Router that receives an LLM task via webhook (or manual run), classifies what kind of response it needs, and automatically routes to the lowest-cost Anthropic Claude model that can handle it. If enabled, it can also judge response quality and escalate to higher tiers—returning the final answer with a full routing and cost breakdown.

What this workflow does

  • Receives and validates input on /webhook/llm-router, normalizing fields like task, context, budget, and minimum quality requirements. Requests with an empty task are rejected with a 400 validation error.
  • Classifies task needs using Anthropic Claude (Haiku) to estimate complexity, risk, and requirements such as code, long context, or web search. If classification fails, it falls back to a built-in heuristic.
  • Selects the cheapest capable model from a configurable Anthropic Claude model catalog, enforcing tier, context window, web search capability, and optional max-cost constraints. It builds an escalation chain accordingly.
  • Executes with the selected model and records tokens, estimated cost, and execution errors.
  • Optionally judges quality with Claude (Haiku); if the score is below your threshold, it escalates to the next model with reviewer feedback.
  • Returns a JSON response containing the final answer, routing trace, and cost breakdown—plus savings versus a premium baseline model (when available).

Use cases

  • Reduce LLM spend in SaaS by routing each request to the most cost-efficient Claude model that meets requirements.
  • Ensure reliability for high-stakes prompts by enabling quality scoring and automatic escalation.
  • Use webhook-driven LLM routing for internal tools, customer support, or ops workflows.

Technical details

  • Built with n8n nodes including: webhook, if, set, code, switch, and sticky note.
  • Uses Anthropic Claude (Haiku) for both classification and optional quality scoring.
  • Implements routing, escalation chains, token/cost estimation, and structured JSON responses.
View full details