---
name: clawrouter
description: Smart LLM router — 84% cheaper than pinning one flagship for every request (98% on `eco`). Routes every request to the cheapest capable model across 78 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, MiniMax, Moonshot, Tencent, Xiaomi, and more. 6 free open-weight models included. Pay-per-call with USDC via x402 micropayments.
homepage: https://blockrun.ai/clawrouter.md
metadata: { "openclaw": { "emoji": "🦀", "requires": { "config": ["models.providers.blockrun"] } } }
---

# ClawRouter

Smart LLM router that is 84% cheaper than pinning one flagship for every request — 98% on `eco` — by routing each request to the cheapest model that can handle it. 78 models across 12 providers (6 free open-weight models), all through one wallet. Payment is per-call in USDC on Base or Solana via x402 — no API keys, no subscriptions.

## Install (OpenClaw plugin)

The recommended path. Works on any box with [OpenClaw](https://openclaw.ai) installed:

```bash
openclaw plugins install @blockrun/clawrouter
openclaw gateway restart
```

Then pick a routing mode:

```bash
# Smart auto-routing (picks the cheapest capable model per request)
openclaw models set blockrun/auto

# Or pin a specific model
openclaw models set openai/gpt-4o
```

## Install / Reinstall (one-liner)

Wallet-preserving reinstall that backs up keys, clears caches, reinstalls from npm, and verifies health:

```bash
# macOS / Linux
curl -fsSL https://blockrun.ai/clawrouter-install.sh | bash

# Windows (PowerShell)
iwr -useb https://blockrun.ai/clawrouter-install.ps1 | iex
```

Both scripts pull the latest version from npm (`@blockrun/clawrouter`) — no GitHub access required.

## Standalone (no OpenClaw)

Run as a local proxy without the OpenClaw CLI:

```bash
npx @blockrun/clawrouter@latest
```

The proxy listens on `http://127.0.0.1:3100` by default. Point any OpenAI-compatible client at it.

## How routing works

ClawRouter classifies every request into one of four tiers:

- **SIMPLE** (40% of traffic) — factual lookups, greetings, translations → Gemini 2.5 Flash ($0.30/M in · $2.50/M out)
- **MEDIUM** (30%) — summaries, explanations, data extraction → DeepSeek Chat ($0.14/M in · $0.28/M out)
- **COMPLEX** (20%) — code generation, multi-step analysis → Claude Opus (best quality)
- **REASONING** (10%) — proofs, formal logic, multi-step math → o3 ($2/M in · $8/M out)

Rules handle ~80% of requests in <1ms. Ambiguous queries hit an LLM classifier (~$0.00003 per classification).

## Available models

78 models including: `gpt-5.6-sol`, `gpt-5.6-sol-pro`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-5.5`, `gpt-5.4`, `gpt-4o`, `o3`, `claude-fable-5`, `claude-opus-5`, `claude-opus-4.8`, `claude-opus-4.7`, `claude-sonnet-5`, `claude-sonnet-4.6`, `gemini-3.1-pro`, `gemini-3.8-flash` (newest Flash — $0.75/$3.75), `gemini-3.6-flash`, `gemini-3.5-flash`, `deepseek-v4-pro` ($1.32/$3.96 — strongest open-weight reasoner), `deepseek-chat` ($0.14/$0.28), `deepseek-v4-flash-vision-exp` (image input), `grok-4.5`, `grok-4.3`, `grok-build-0.1`, `kimi-k3`, `glm-5.3`, `glm-5.3-flash` (native multimodal, 1M ctx — $0.15/$0.50), `glm-5.2`, `glm-5.1`, `minimax-m3`, `hy3` (Tencent — 262K ctx), `mimo-v2.5` (Xiaomi — natively multimodal, 1M ctx), `mimo-v2.5-pro`, `qwen3.8-flash` (1M ctx, image input — $0.15/$0.47), and 6 free open-weight models: `nemotron-3-ultra-550b` (550B/55B MoE, 1M ctx — the largest free model), `nemotron-3.5-lightning` (thinking-mode reasoning, 1M ctx), `nemotron-3-nano-30b` (fastest — ~121 tok/s), `nemotron-3-nano-omni-30b-a3b-reasoning` (256K ctx, **vision** — text + images + video + audio), `llama-3.2-11b-vision` (Meta Llama, image input), `north-mini-code` (Cohere, coding, sub-second), and `laguna-xs-2.1` (Poolside, coding — ~161 tok/s).

## Payment

USDC on Base (EVM) or Solana via x402. Wallet key lives on your box — only used to sign x402 payment headers.

```bash
openclaw wallet show       # see address + balance
openclaw wallet fund        # top-up instructions
```

## Troubleshooting

```bash
# Gateway not serving requests
openclaw gateway restart

# See what version is installed + what's latest
npx -y @blockrun/clawrouter@latest --version

# Diagnostic dump (logs, config, health)
openclaw doctor
```

If `openclaw plugins install` fails: run the one-liner reinstall above — it wipes the stale plugin dir, cleans `openclaw.json` entries, and reinstalls from the npm registry.

## Example output

```
[ClawRouter] google/gemini-2.5-flash (SIMPLE, rules, confidence=0.92)
             Cost: $0.0025 | Baseline: $0.308 | Saved: 99.2%
```

## Links

- [blockrun.ai](https://blockrun.ai) — main site, docs, dashboard
- `npm install -g @blockrun/clawrouter` — npm package
