Cheapest way to route between AI models

The cheapest way to route between AI models is a local proxy that classifies each request by complexity and sends routine work to a cheap model automatically, with no fee added on top. RelayPlane is a free, MIT-licensed proxy that does this: install it, point your existing tool at it, and it routes simple requests to cheaper models by default while sending hard work to frontier models, across 6 native providers plus 300+ more through OpenRouter.

No SDK, no code change, no percentage fee. It runs on your machine, so nothing leaves it unless you turn on telemetry.

npm install -g @relayplane/proxy
relayplane start
export ANTHROPIC_BASE_URL=http://localhost:4100
# Routine requests now route to a cheaper model automatically.

Cost of routing, compared

What each tool charges to route your traffic, separate from what the model providers charge.

FeatureRelayPlaneLiteLLMOpenRouterPortkey
Cost to runFree, MIT, no feeFree (OSS) + paid enterprise tierFree to run, ~5.5% fee on paid model callsFree tier, paid plans for scale
Where routing happensLocal proxy on your machineProxy you deploy (server or container)Their cloud, you call one hosted APITheir cloud gateway
Routes by task complexity automaticallyYou configure routing rulesYou pick the model per callConfig-based routing rules
Providers reachable6 native + OpenRouter for 300+ more100+ providers300+ models, one API250+ models
Self-hosted, nothing leaves your machine
Per-request cost ledger included freeSpend logs in the proxy databaseDashboard on their cloudDashboard on their cloud

Sources: LiteLLM README, OpenRouter docs, Portkey pricing, RelayPlane source.

Frequently asked questions

What is the cheapest way to route between AI models?

The cheapest way is a local proxy that classifies each request by complexity and sends routine work to a cheap model while reserving expensive models for hard tasks, with no per-call fee on top. RelayPlane is a free, MIT-licensed proxy that does exactly this: install it once, point your existing tool at it, and it downgrades simple requests to cheaper models by default.

Does model routing cost anything to run?

RelayPlane costs nothing to run: no license fee, no percentage fee on API calls, MIT licensed. You still pay each provider for the tokens you use, but routing itself does not add a markup. OpenRouter, by contrast, adds a fee on top of paid model calls since your traffic goes through their cloud.

Do I need to change my code to route between models?

No. RelayPlane is a drop-in replacement for the Anthropic or OpenAI base URL. Set ANTHROPIC_BASE_URL or OPENAI_BASE_URL to point at the local proxy and your existing code keeps working, the proxy decides which model actually handles each request.

Is RelayPlane routing better than OpenRouter or LiteLLM?

It depends what you need. OpenRouter is a hosted marketplace with the widest catalog, no self-hosting, but a fee on paid calls. LiteLLM is a strong self-hosted gateway built for platform teams with many providers. RelayPlane is narrower and local-first: complexity-based routing, a per-request cost ledger, and hard spend caps out of the box, free, on one machine. Pick based on whether you want a hosted marketplace, a team gateway, or a local cost-and-control layer.

Route smarter for free

MIT licensed. No credit card, no fee on your API calls.

Get started