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.
| Feature | RelayPlane | LiteLLM | OpenRouter | Portkey |
|---|---|---|---|---|
| Cost to run | Free, MIT, no fee | Free (OSS) + paid enterprise tier | Free to run, ~5.5% fee on paid model calls | Free tier, paid plans for scale |
| Where routing happens | Local proxy on your machine | Proxy you deploy (server or container) | Their cloud, you call one hosted API | Their cloud gateway |
| Routes by task complexity automatically | You configure routing rules | You pick the model per call | Config-based routing rules | |
| Providers reachable | 6 native + OpenRouter for 300+ more | 100+ providers | 300+ models, one API | 250+ models |
| Self-hosted, nothing leaves your machine | ||||
| Per-request cost ledger included free | Spend logs in the proxy database | Dashboard on their cloud | Dashboard 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