Save 20–40% tokens. Code with Lina.
LINA is your guide to setting up lina-router — the smart local proxy that routes your AI coding tools to 40+ providers and slashes token costs automatically.

// Architecture
How It Works
Your AI tool sends requests to lina-router. lina-router routes them to the best available provider — automatically.
+ 36 more tools
lina-router
localhost:20128/v1
Tier 1 — Subscription
Claude Max · Copilot · Codex CLI
Tier 2 — Cheap APIs
GLM · MiniMax · DeepSeek
Tier 3 — Free
Kiro AI · OpenCode · Vertex
// Why lina-router
Built to save you money
Stop burning tokens on tool outputs. Stop switching providers manually. lina-router handles everything in the background.
RTK Token Saver
RTK (Result Token Kompressor) auto-compresses tool outputs (git diff, grep, ls) before they hit the model. Save 20–40% tokens on every request — automatically.
Learn more →Auto-Fallback Routing
When your subscription quota runs out, lina-router silently falls back to cheap APIs, then free models. Zero downtime, zero intervention.
Multi-Account Round-Robin
Got multiple accounts? lina-router rotates between them automatically to distribute load and avoid rate limits.
Universal Compatibility
One endpoint. Works with every major AI coding tool. Change your endpoint once, never touch it again.
// Provider Network
60+ AI Providers
OAuth, API key or browser cookie. Featured below — full list inside the app.
// Compatibility
CLI / IDE Integrations
Point any tool to localhost:20128. Per-tool setup guides included.
Claude Code
Anthropic CLI
OpenAI Codex
Codex CLI
Cursor
AI code editor
Cline
VSCode extension
Kilo Code
Kilo AI
Roo
Roo AI
Continue
Open source
Factory Droid
Factory AI
Hermes Agent
Self-improving
OpenClaw
Open Claw
MITM Bridge — IDE Subscription Intercept
Intercept Antigravity / GitHub Copilot / Kiro IDE traffic — use your IDE subscriptions to call any backend through lina-router. Mind each tool's terms of service.
// Under the Hood
Advanced Features
Combos, Translator, RTK, Caveman, Multi-account, Cloud sync, Tunnel, Proxy pools, MITM bridge.
Smart Combos
Chain providers into one virtual provider with sticky round-robin and automatic fallback.
Real-time Quota
Live token tracking, reset countdown, cost estimation per provider.
Format Translator
Convert between OpenAI / Anthropic / Gemini formats — any tool with any provider.
Multi-Account
Multiple accounts per provider, round-robin load balancing, automatic failover.
Cloud Sync + Tunnel
Cloudflare edge tunnel — use your router from anywhere, 300+ global locations.
Proxy Pools
Vercel relay, outbound proxy, rotate IPs for region-restricted providers.
MITM Bridge
Intercept Antigravity / Copilot / Kiro IDE traffic — use IDE subscriptions with any backend.
OpenAI-Compatible
One endpoint speaks chat, embeddings, TTS, STT, image, video, search and fetch.
Visual Dashboard
Manage providers, keys, combos and usage from a clean local UI at localhost:20128.
And while we're at it, save 20–65% tokens for free
RTK and Caveman Mode ship with lina-router. They quietly compress what goes in and trim what comes out — same answers, fewer tokens.
RTK Token Saver
−20–40%Auto-compress tool_result content (git diff, grep, ls, find, tree…) before it reaches the LLM. Lossless, safe, default ON.
Caveman Mode
−65%Inject a terse-style system prompt — LLM replies stay technical but compact. Five intensity levels.
// Quick Start
Get Started in Two Commands
Install globally, connect providers, code with smart auto-fallback.
Install Globally
One command installs lina-router system-wide.
Connect Providers
Open the dashboard and add free providers — no signup needed for Kiro AI.
Point & Code
Set your AI tool's base URL and start coding. RTK and auto-fallback activate immediately.
// Community
What Developers Say
Real developers. Real workflows. Zero rate limits.
Finally no more rate-limit errors at 2am. lina-router auto-switches to a free tier.
Claude Code quota used to expire unused every month. Not anymore.
Two commands and I was set. Endless coding sessions.
3-tier fallback is genius. Subscription → cheap → free, zero downtime.
Switched from juggling 3 API keys. lina-router does it all for me.
GLM at $0.60/1M as backup? I'm paying almost nothing now.
Cursor, Cline, Claude Desktop — point to localhost:20128 and done.
Open source, no lock-in, runs locally. Exactly what I needed.
Finally no more rate-limit errors at 2am. lina-router auto-switches to a free tier.
Claude Code quota used to expire unused every month. Not anymore.
Two commands and I was set. Endless coding sessions.
3-tier fallback is genius. Subscription → cheap → free, zero downtime.
Switched from juggling 3 API keys. lina-router does it all for me.
GLM at $0.60/1M as backup? I'm paying almost nothing now.
Cursor, Cline, Claude Desktop — point to localhost:20128 and done.
Open source, no lock-in, runs locally. Exactly what I needed.
Free Gemini CLI + Claude Code = unlimited coding.
The quota dashboard is incredibly satisfying to watch.
My team had 3 AI subscriptions. lina-router pools them all.
iFlow as an emergency fallback means I literally never stop.
Install once, forget rate limits forever.
MiniMax M2.7 at $0.20/1M is insane. lina-router routes to it automatically.
RTK saved me more tokens last week than I expected. It just works.
No more babysitting quotas. lina-router handles everything.
Free Gemini CLI + Claude Code = unlimited coding.
The quota dashboard is incredibly satisfying to watch.
My team had 3 AI subscriptions. lina-router pools them all.
iFlow as an emergency fallback means I literally never stop.
Install once, forget rate limits forever.
MiniMax M2.7 at $0.20/1M is insane. lina-router routes to it automatically.
RTK saved me more tokens last week than I expected. It just works.
No more babysitting quotas. lina-router handles everything.
Works with every tool you use
One endpoint change. Universal compatibility.
// Powered by Claude
Fully compatible
with Claude's API.
lina-router speaks Claude's native API format — so every RTK compression and provider fallback works with zero translation. No wrappers, no re-encoding, no surprises.
Claude Code Setup guide40+
Supported providers
20–40%
Token savings
60s
Setup time
Free
Always a free tier
// Fallback Strategy
Never stop coding
lina-router chains providers in tiers. When one runs out, the next one activates automatically.
Tier 1 — Subscription
- Claude Code (Max/Pro)
- GitHub Copilot
- Codex CLI
Uses your existing subscription quota first
Tier 2 — Cheap APIs
- GLM ($0.6/1M tokens)
- MiniMax ($0.2/1M tokens)
- DeepSeek
Kicks in when quota is exhausted
Tier 3 — Free
- Kiro AI (unlimited)
- OpenCode Free (no auth)
- Vertex AI ($300 credits)
Final fallback — always available
Ready to stop wasting tokens?
Install lina-router in 60 seconds and let LINA walk you through the rest.