BitRouterBitRouter.
Get API Key
Enjoy 25% off for all open-source models, zero markup

Optimize your agent for cost and performance — with every run.

An open-source LLM router that sends routine calls to open models and pays frontier prices only for the calls that earn them. Zero harness changes.

$curl -fsSL https://bitrouter.ai/install.sh | sh
claude-code — bitrouter
fable·opus·deepseek
no model lock-inswap any model, open or frontier, per call
no harness lock-inClaude Code, Cursor, Codex — or your own
no router lock-inApache-2.0 · fork the binary, self-host

Where agent runs lose cost and performance.

Four leaks in every long, autonomous run — each one fixed by a mechanism below.

A blip at file 140 shouldn't kill the run.

Your agent is 140 files into a long run when a provider rate-limits it, and the run dies. You pay for those 140 files again on the retry — every long agent loop breaks the same way, one blip back to zero.

  • Overnight jobs that finish
  • No babysitting rate limits
  • The agent never sees the failure
agent · run_8x2k

Why agents run on BitRouter.

Four mechanisms, one for each leak above. One job: optimize every agent run for cost and performance.

01 Reliability

A dead run is a run you pay twice for.

Reroutes across providers mid-run, transparently — so a rate-limit at file 140 never makes you re-pay for 139 files of work.

Powered byIntent-aware routingMulti-provider failover
router · run_8x2k
02 Observability

Billed per run. Now visible per run.

Every agent, every model, every hop — with cost and latency attributed to the run, not smeared across a monthly invoice.

Powered byPer-run cost attributionFull call-chain traces
trace · run_8x2k9hf3
03 Security

Cheap and fast means nothing if it leaks — or runs away.

One policy at the router — injection and output filtering, private by default, and per-agent spend and loop caps that stop a runaway before it drains the key.

Powered byPrivacy-first by defaultSpend & loop limitsInjection + output filters
policy · router
04 Efficiency

Pay open-source prices for the calls that don't need frontier.

Matches each call to the cheapest model that can do it — open models for the routine 90%, frontier reserved for the hard calls.

Powered byModel-per-task routingPrice-aware model selection
router · cost model

Questions before you ship.

Common questions about pricing, routing, and data handling. If yours isn't here, check the docs or talk to us — we usually reply within a day.

An AI model router is a unified API layer that sits between your AI agent and the upstream LLM providers. Instead of hardcoding a single provider into your application, you point every model call at the router and it intelligently selects the best available model based on cost, latency, capability, and provider health. BitRouter goes further than a simple proxy: it handles failover, per-run observability, prompt-injection guardrails, and task-complexity-based model matching — all without any changes to your agent code.
OpenRouter is a closed-source hosted gateway — no self-host option, no agent-native primitives, no permissionless registry. BitRouter is Apache 2.0: fork the binary and run it anywhere, or use the hosted edge if you don't want to operate it. The provider registry is fully open — anyone can publish a provider via pull request with no review queue or approval process. The result is no lock-in at any layer — swap models, switch agent harnesses, or self-host the router itself — plus router-level guardrails, per-run cost attribution, MCP/ACP/Skills gateway support, and intent-aware routing that OpenRouter does not offer.
LiteLLM is an open-source Python library you embed inside your application code. BitRouter is a standalone binary that runs as a sidecar or hosted edge — you drop it in front of any runtime (Claude Code, Cursor, Codex, your own agent) without modifying each service. It comes with auth, billing, observability, guardrails, and an MCP/ACP/Skills gateway built in. You configure policy once at the router rather than repeating safety and routing logic in every service that calls an LLM.
BitRouter's cost advantage comes from open models: the open provider registry carries Qwen 3.7, DeepSeek V4 Pro, Kimi K2.6, GLM 5.1, MiniMax M3, StepFun 3.7, and Mimo V2.5 Pro, and routes the routine majority of an agent's calls to them at a fraction of frontier prices — any provider hosting a model can publish a listing and receive traffic immediately. Frontier models stay one alias away for the calls that need them: Claude Fable 5 / Claude Opus 4.8 (Anthropic), GPT-5 and o3 (OpenAI), Gemini 3.1 Pro and 3.5 Flash (Google), Grok 4.3 (xAI). The model list updates automatically as providers publish new entries; no binary upgrade or alias change is needed on your end.
Pull the Apache 2.0 binary from github.com/bitrouter/bitrouter — it is a single binary with no daemon, no GUI, and no infrastructure dependencies beyond a network connection. It drops into any container, CI step, or bare VM. Self-hosted BitRouter gives you the same routing engine, guardrails, MCP/ACP/Skills gateway, and observability as the hosted edge, without the platform fee. Your traffic never leaves your infrastructure.
Yes — BitRouter works with any agent harness that supports a configurable base URL or API key. Claude Code, GitHub Copilot, Codex, Opencode, KiloCode, Pi Agent, Hermes, and Openclaw all connect with a two-variable override (ANTHROPIC_BASE_URL or OPENAI_BASE_URL) and zero code changes — routing, failover, cost tracking, and guardrails apply automatically from that point forward. The same pattern works for any harness not yet in the list. Step-by-step setup for each integration is in the cookbook at /docs/cookbook/integration.

Start routing in under a minute.

One API key, every model. No monthly fees, no lock-in. Self-host or use the hosted edge.

$curl -fsSL https://bitrouter.ai/install.sh | sh
All systems operational·2% on usage · no platform fee < $10/mo·Apache-2.0