ClawRouter
The agent-native LLM router for OpenClaw. 41+ models, <1ms routing, USDC payments on Base & Solana via x402.
Install / Use
/learn @BlockRunAI/ClawRouterQuality Score
Category
Development & EngineeringSupported Platforms
README
<img src="https://img.shields.io/badge/🤖_Agent--Native-black?style=for-the-badge" alt="Agent native"> <img src="https://img.shields.io/badge/🔑_Zero_API_Keys-blue?style=for-the-badge" alt="No API keys"> <img src="https://img.shields.io/badge/⚡_Local_Routing-yellow?style=for-the-badge" alt="Local routing"> <img src="https://img.shields.io/badge/💰_x402_USDC-purple?style=for-the-badge" alt="x402 USDC"> <img src="https://img.shields.io/badge/🔓_Open_Source-green?style=for-the-badge" alt="Open source">
</div>ClawRouter is an open-source smart LLM router that reduces AI API costs by up to 92%. It analyzes each request across 15 dimensions and routes to the cheapest capable model in under 1ms, entirely locally. ClawRouter is the only LLM router built for autonomous AI agents — it uses wallet signatures for authentication (no API keys) and USDC micropayments via the x402 protocol (no credit cards). 55+ models from OpenAI, Anthropic, Google, xAI, DeepSeek, and more. MIT licensed.
Why ClawRouter exists
Every other LLM router was built for human developers — create an account, get an API key, pick a model from a dashboard, pay with a credit card.
Agents can't do any of that.
ClawRouter is built for the agent-first world:
- No accounts — a wallet is generated locally, no signup
- No API keys — your wallet signature IS authentication
- No model selection — 15-dimension scoring picks the right model automatically
- No credit cards — agents pay per-request with USDC via x402
- No trust required — runs locally, <1ms routing, zero external dependencies
This is the stack that lets agents operate autonomously: x402 + USDC + local routing.
How it compares
| | OpenRouter | LiteLLM | Martian | Portkey | ClawRouter | | ---------------- | ----------------- | ---------------- | ----------------- | ----------------- | ----------------------- | | Models | 200+ | 100+ | Smart routing | Gateway | 55+ | | Routing | Manual selection | Manual selection | Smart (closed) | Observability | Smart (open source) | | Auth | Account + API key | Your API keys | Account + API key | Account + API key | Wallet signature | | Payment | Credit card | BYO keys | Credit card | $49-499/mo | USDC per-request | | Runs locally | No | Yes | No | No | Yes | | Open source | No | Yes | No | Partial | Yes | | Agent-ready | No | No | No | No | Yes |
✓ Open source · ✓ Smart routing · ✓ Runs locally · ✓ Crypto native · ✓ Agent ready
We're the only one that checks all five boxes.
Quick Start
# 1. Install with smart routing enabled
curl -fsSL https://blockrun.ai/ClawRouter-update | bash
openclaw gateway restart
# 2. Fund your wallet with USDC on Base or Solana (address printed on install)
# $5 is enough for thousands of requests
Done. Smart routing (blockrun/auto) is now your default model.
Routing Profiles
Choose your routing strategy with /model <profile>:
| Profile | Strategy | Savings | Best For |
| ---------------- | ------------------ | ------- | ---------------- |
| /model auto | Balanced (default) | 74-100% | General use |
| /model eco | Cheapest possible | 95-100% | Maximum savings |
| /model premium | Best quality | 0% | Mission-critical |
Shortcuts: /model grok, /model br-sonnet, /model gpt5, /model o3
How It Works
100% local routing. <1ms latency. Zero external API calls.
Request → Weighted Scorer (15 dimensions) → Tier → Best Model → Response
| Tier | ECO Model | AUTO Model | PREMIUM Model | | --------- | ----------------------------------- | ------------------------------------- | ---------------------------- | | SIMPLE | nvidia/gpt-oss-120b (FREE) | gemini-2.5-flash ($0.30/$2.50) | kimi-k2.5 | | MEDIUM | gemini-3.1-flash-lite ($0.25/$1.50) | kimi-k2.5 ($0.60/$3.00) | gpt-5.3-codex ($1.75/$14.00) | | COMPLEX | gemini-3.1-flash-lite ($0.25/$1.50) | gemini-3.1-pro ($2/$12) | claude-opus-4.6 ($5/$25) | | REASONING | grok-4-1-fast ($0.20/$0.50) | grok-4-1-fast-reasoning ($0.20/$0.50) | claude-sonnet-4.6 ($3/$15) |
Blended average: $2.05/M vs $25/M for Claude Opus = 92% savings
Image Generation
Generate images directly from chat with /imagegen:
/imagegen a dog dancing on the beach
/imagegen --model dall-e-3 a futuristic city at sunset
/imagegen --model banana-pro --size 2048x2048 mountain landscape
| Model | Provider | Price | Max Size |
| ------------- | --------------------- | ----------- | --------- |
| nano-banana | Google Gemini Flash | $0.05/image | 1024x1024 |
| banana-pro | Google Gemini Pro | $0.10/image | 4096x4096 |
| dall-e-3 | OpenAI DALL-E 3 | $0.04/image | 1792x1024 |
| gpt-image | OpenAI GPT Image 1 | $0.02/image | 1536x1024 |
| flux | Black Forest Flux 1.1 | $0.04/image | 1024x1024 |
Image Editing (img2img)
Edit existing images with /img2img:
/img2img --image ~/photo.png change the background to a starry sky
/img2img --image ./cat.jpg --mask ./mask.png remove the background
| Option | Required | Description |
| ----------------- | -------- | ------------------------------------- |
| --image <path> | Yes | Local image file path (supports ~/) |
| --mask <path> | No | Mask image (white = area to edit) |
| --model <model> | No | Model to use (default: gpt-image-1) |
| --size <WxH> | No | Output size (default: 1024x1024) |
API endpoint: POST http://localhost:8402/v1/images/image2image — see full docs.
Models & Pricing
55+ models across 9 providers, one wallet. Starting at $0.0002/request.
💡 "Cost per request" = estimated cost for a typical chat message (~500 input + 500 output tokens).
Budget Models (under $0.001/request)
| Model | Input $/M | Output $/M | ~$/request | Context | Features | | ----------------------------- | --------: | ---------: | ---------: | ------- | --------------------------------- | | nvidia/gpt-oss-120b | FREE | FREE | $0 | 128K | | | nvidia/gpt-oss-20b | FREE | FREE | $0 | 128K | | | nvidia/nemotron-ultra-253b | FREE | FREE | $0 | 131K | reasoning | | nvidia/nemotron-3-super-120b | FREE | FREE | $0 | 131K | reasoning | | nvidia/nemotron-super-49b | FREE | FREE | $0 | 131K | reasoning | | nvidia/deepseek-v3.2 | FREE | FREE | $0 | 131K | reasoning | | nvidia/mistral-large-3-675b | FREE | FREE | $0 | 131K | reasoning | | nvidia/qwen3-coder-480b | FREE | FREE | $0 | 131K | | | nvidia/devstral-2-123b | FREE | FREE | $0 | 131K | | | nvidia/glm-4.7 | FREE | FREE | **
