---
name: clawrouter
description: Smart LLM router — save 67% on inference costs. Routes every request to the cheapest capable model across 55+ models from OpenAI, Anthropic, Google, DeepSeek, xAI, NVIDIA, and more. 11 free NVIDIA 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 saves 67% on inference costs by routing each request to the cheapest model that can handle it. 55+ models across 9 providers (11 free NVIDIA 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://blockrun.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 Flash (~$0.60/M, 99% savings)
- **MEDIUM** (30%) — summaries, explanations, data extraction → DeepSeek Chat (~$0.42/M, 99% savings)
- **COMPLEX** (20%) — code generation, multi-step analysis → Claude Opus (best quality)
- **REASONING** (10%) — proofs, formal logic, multi-step math → o3 (~$8/M, 89% savings)

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

## Available models

55+ models including: `gpt-5.5`, `gpt-5.4`, `gpt-4o`, `o3`, `claude-opus-4.8`, `claude-opus-4.7`, `claude-sonnet-4.6`, `gemini-3.1-pro`, `gemini-3.5-flash`, `deepseek-v4-pro` ($0.435/$0.87 — strongest open-weight reasoner), `deepseek-chat`, `grok-4.3`, `grok-build-0.1`, `kimi-k2.6`, `glm-5.1`, and free NVIDIA-hosted models: `deepseek-v4-flash` (1M ctx, fast chat), `nemotron-3-nano-omni-30b-a3b-reasoning` (256K ctx, **vision** — text + images + video), `qwen3-next-80b-a3b-thinking`, `qwen3-coder-480b`, `glm-4.7`, `llama-4-maverick`, and `mistral-small-4-119b`.

## 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
