6.7K ·GitHub
What is this?
ClawRouter is an open-source LLM router built for autonomous agents: it picks the cheapest capable model from 78 models across 9 providers in under 1ms, entirely locally, and lets an agent pay per request with USDC (via the x402 protocol) instead of signing up for a human account.
Is this a hosted service or something that runs on my machine?
It is a local proxy/CLI that runs on your machine on port 8402 and exposes an OpenAI-compatible endpoint; the actual billing and model catalog live behind BlockRun's gateway, but routing decisions happen locally with no external calls.
How do I get it running with my coding agent?
For OpenClaw, use the one-shot install script which handles registration, model config, auth and wallet setup; for any other OpenAI-compatible client (continue.dev, Cursor, VS Code), npm-install the CLI, start the local proxy, and point the client's base URL at it with /v1/ at the end.
Do I need a crypto wallet or API key before trying it?
No — 6 open-weight models (including a 1M-context reasoner) run completely free with no wallet, signup, or key; a wallet (auto-generated) or a BlockRun API key is only needed to unlock the other 78 paid models.
What happens if I just npm install it without the setup step?
A bare 'npm install -g' only drops the package on disk — it does not register the plugin with OpenClaw, sync the model allowlist, or write the auth profile, so your bot's /models list will only show OpenClaw's defaults until you run 'clawrouter setup'.
Does routing send my requests to a third-party server first?
No — the model-selection step is entirely local with zero external API calls; only the actual chat request is sent out to whichever provider gets chosen.
What routing profiles can I switch between?
/model free uses only free NVIDIA models (100% savings), /model auto is the balanced default (84% savings), /model eco maximizes savings (98%), and /model premium always picks the best-quality model (0% savings).
Which coding agents and clients does it support?
It plugs into OpenClaw as a native plugin, and ships a macOS desktop app with one-click connections for OpenClaw, Codex, Hermes, DeepSeek Harness, and Pi. As a standalone proxy it also works with continue.dev, Cursor, VS Code, or any OpenAI-compatible client.
How does it decide which model to use?
Router Core V3.5 scores each request across 15 dimensions and does constraint-first ranking to pick the cheapest model that can actually handle it, inlined at build time and pinned to an exact commit.
Can I pay with a regular credit card instead of crypto?
Yes — sign up at user.blockrun.ai, add credit with a card, and mint an API key, then run 'clawrouter login' to switch ClawRouter from wallet-based x402 payments to card-funded account credit.
What are similar projects?
openclaw-zero-token, jev-router, OmniRoute, experiential, ThinkWatch-Lite, brigade, casbin-gateway, pxpipe
Which topics is it in?
x402, llm-router, cost-optimization, api-gateway, cryptocurrency, blockchain, openclaw, deepseek, gemini, proxy, anthropic, openai