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.

$npm install -g lina-router
LINA mascot

// Architecture

How It Works

Your AI tool sends requests to lina-router. lina-router routes them to the best available provider — automatically.

Your AI Tool
lina-router · localhost:20128/v1
Best available provider tier

// 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.

FREE Forever8 providers
Kiro AIiFlowQwenOpenCode FreeOpenRouterNVIDIA NIMGeminiCloudflare AI
OAuth Subscription6 providers
Claude CodeOpenAI CodexGitHub CopilotCursor IDEKilo CodeAntigravity
Cheap APIs20+ providers
GLM ($0.6/1M)MiniMax ($0.2/1M)DeepSeekGroqTogether AIFireworksPerplexityMistralCoherexAI Grok

// 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.

Built-in Bonus

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.

INPUT

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.

47K tokens
+~28K tokens saved
Learn more →
OUTPUT

Caveman Mode

−65%

Inject a terse-style system prompt — LLM replies stay technical but compact. Five intensity levels.

verbose paragraph
+telegraphic reply
Learn more →

// Quick Start

Get Started in Two Commands

Install globally, connect providers, code with smart auto-fallback.

1

Install Globally

One command installs lina-router system-wide.

npm install -g lina-router
2

Connect Providers

Open the dashboard and add free providers — no signup needed for Kiro AI.

lina-router
3

Point & Code

Set your AI tool's base URL and start coding. RTK and auto-fallback activate immediately.

localhost:20128/v1

// 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.

@devnull_kaiSenior Engineer
"

Claude Code quota used to expire unused every month. Not anymore.

@priya_codesFull Stack Dev
"

Two commands and I was set. Endless coding sessions.

@tomasz_wBackend Dev
"

3-tier fallback is genius. Subscription → cheap → free, zero downtime.

@alex_buildsIndie Hacker
"

Switched from juggling 3 API keys. lina-router does it all for me.

@sarah_devStaff Engineer
"

GLM at $0.60/1M as backup? I'm paying almost nothing now.

@minh_le_devFreelancer
"

Cursor, Cline, Claude Desktop — point to localhost:20128 and done.

@rustam_devDevOps
"

Open source, no lock-in, runs locally. Exactly what I needed.

@chen_xi_devML Engineer
"

Finally no more rate-limit errors at 2am. lina-router auto-switches to a free tier.

@devnull_kaiSenior Engineer
"

Claude Code quota used to expire unused every month. Not anymore.

@priya_codesFull Stack Dev
"

Two commands and I was set. Endless coding sessions.

@tomasz_wBackend Dev
"

3-tier fallback is genius. Subscription → cheap → free, zero downtime.

@alex_buildsIndie Hacker
"

Switched from juggling 3 API keys. lina-router does it all for me.

@sarah_devStaff Engineer
"

GLM at $0.60/1M as backup? I'm paying almost nothing now.

@minh_le_devFreelancer
"

Cursor, Cline, Claude Desktop — point to localhost:20128 and done.

@rustam_devDevOps
"

Open source, no lock-in, runs locally. Exactly what I needed.

@chen_xi_devML Engineer
"

Free Gemini CLI + Claude Code = unlimited coding.

@marco_codesStartup Founder
"

The quota dashboard is incredibly satisfying to watch.

@anya_kFrontend Dev
"

My team had 3 AI subscriptions. lina-router pools them all.

@james_tTech Lead
"

iFlow as an emergency fallback means I literally never stop.

@nguyen_devSolo Dev
"

Install once, forget rate limits forever.

@fatima_bPlatform Eng
"

MiniMax M2.7 at $0.20/1M is insane. lina-router routes to it automatically.

@lars_eOSS Dev
"

RTK saved me more tokens last week than I expected. It just works.

@diana_mAI Engineer
"

No more babysitting quotas. lina-router handles everything.

@oliver_kFreelancer
"

Free Gemini CLI + Claude Code = unlimited coding.

@marco_codesStartup Founder
"

The quota dashboard is incredibly satisfying to watch.

@anya_kFrontend Dev
"

My team had 3 AI subscriptions. lina-router pools them all.

@james_tTech Lead
"

iFlow as an emergency fallback means I literally never stop.

@nguyen_devSolo Dev
"

Install once, forget rate limits forever.

@fatima_bPlatform Eng
"

MiniMax M2.7 at $0.20/1M is insane. lina-router routes to it automatically.

@lars_eOSS Dev
"

RTK saved me more tokens last week than I expected. It just works.

@diana_mAI Engineer
"

No more babysitting quotas. lina-router handles everything.

@oliver_kFreelancer

Works with every tool you use

One endpoint change. Universal compatibility.

Claude Code
Cursor
Cline
Copilot
Codex
OpenCode
Roo
Continue
Kilo Code
Antigravity
Droid
OpenClaw

// 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 guide

40+

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

↓ when exhausted

Tier 2 — Cheap APIs

  • GLM ($0.6/1M tokens)
  • MiniMax ($0.2/1M tokens)
  • DeepSeek

Kicks in when quota is exhausted

↓ when 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.