[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74774":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":15,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":16,"starSnapshotCount":16,"syncStatus":42,"lastSyncTime":43,"discoverSource":44},74774,"ClawRouter","BlockRunAI\u002FClawRouter","BlockRunAI","The agent-native LLM router for OpenClaw. 41+ models, \u003C1ms routing, USDC payments on Base & Solana via x402.","",null,"TypeScript",6555,602,70,23,0,52,39.34,"MIT License",false,"main",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"ai","ai-agents","anthropic","cost-optimization","deepseek","gemini","llm","llm-router","micropayments","openai","openclaw","smart-routing","stablecoin-payment","stablecoin-payments","usdc","x402","2026-06-12 02:03:28","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"assets\u002Fbanner.png\" alt=\"ClawRouter Banner\" width=\"600\">\n\n\u003Ch1>The LLM router built for autonomous agents\u003C\u002Fh1>\n\n\u003Cp>Agents can't sign up for accounts. Agents can't enter credit cards.\u003Cbr>\nAgents can only sign transactions.\u003Cbr>\u003Cbr>\n\u003Cstrong>ClawRouter is the only LLM router that lets agents operate independently.\u003C\u002Fstrong>\u003Cbr>\u003Cbr>\n\u003Cem>10 models free, no crypto required. No signup. No API key. No credit card.\u003C\u002Fem>\u003C\u002Fp>\n\n\u003Cbr>\n\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🆓_10_Free_Models-success?style=for-the-badge\" alt=\"10 free models\">&nbsp;\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤖_Agent--Native-black?style=for-the-badge\" alt=\"Agent native\">&nbsp;\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🔑_Zero_API_Keys-blue?style=for-the-badge\" alt=\"No API keys\">&nbsp;\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F⚡_Local_Routing-yellow?style=for-the-badge\" alt=\"Local routing\">&nbsp;\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F💰_x402_USDC-purple?style=for-the-badge\" alt=\"x402 USDC\">&nbsp;\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🔓_Open_Source-green?style=for-the-badge\" alt=\"Open source\">\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@blockrun\u002Fclawrouter.svg?style=flat-square&color=cb3837)](https:\u002F\u002Fnpmjs.com\u002Fpackage\u002F@blockrun\u002Fclawrouter)\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002F@blockrun\u002Fclawrouter.svg?style=flat-square&color=blue)](https:\u002F\u002Fnpmjs.com\u002Fpackage\u002F@blockrun\u002Fclawrouter)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FBlockRunAI\u002FClawRouter?style=flat-square&label=GitHub%20stars)](https:\u002F\u002Fgithub.com\u002FBlockRunAI\u002FClawRouter)\n[![CI](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002FBlockRunAI\u002FClawRouter\u002Fci.yml?branch=main&style=flat-square&label=CI)](https:\u002F\u002Fgithub.com\u002FBlockRunAI\u002FClawRouter\u002Factions)\n[![TypeScript](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-5.7-3178c6?style=flat-square&logo=typescript&logoColor=white)](https:\u002F\u002Ftypescriptlang.org)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green?style=flat-square)](LICENSE)\n\n[![USDC Hackathon Winner](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🏆_USDC_Hackathon-Agentic_Commerce_Winner-gold?style=flat-square)](https:\u002F\u002Fx.com\u002FUSDC\u002Fstatus\u002F2021625822294216977)\n[![x402 Protocol](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fx402-Micropayments-purple?style=flat-square)](https:\u002F\u002Fx402.org)\n[![Base Network](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBase-USDC-0052FF?style=flat-square&logo=coinbase&logoColor=white)](https:\u002F\u002Fbase.org)\n[![Solana](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSolana-USDC-9945FF?style=flat-square&logo=solana&logoColor=white)](https:\u002F\u002Fsolana.com)\n[![OpenClaw Plugin](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FOpenClaw-Plugin-orange?style=flat-square)](https:\u002F\u002Fopenclaw.ai)\n[![Telegram](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Community-26A5E4?style=flat-square&logo=telegram)](https:\u002F\u002Ft.me\u002FblockrunAI)\n\n\u003C\u002Fdiv>\n\n> **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.\n\n---\n\n## Why ClawRouter exists\n\nEvery 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.\n\n**Agents can't do any of that.**\n\nClawRouter is built for the agent-first world:\n\n- **Starts at $0** — 10 NVIDIA models are free forever (incl. 1M-context DeepSeek V4 + a vision-capable Nemotron Omni)\n- **No accounts** — a wallet is generated locally, no signup\n- **No API keys** — your wallet signature IS authentication\n- **No model selection** — 15-dimension scoring picks the right model automatically\n- **No credit cards** — agents pay per-request with USDC via [x402](https:\u002F\u002Fx402.org)\n- **No trust required** — runs locally, \u003C1ms routing, zero external dependencies\n\nThis is the stack that lets agents operate autonomously: **x402 + USDC + local routing**.\n\n---\n\n## How it compares\n\n|                  | OpenRouter        | LiteLLM          | Martian           | Portkey           | **ClawRouter**          |\n| ---------------- | ----------------- | ---------------- | ----------------- | ----------------- | ----------------------- |\n| **Models**       | 200+              | 100+             | Smart routing     | Gateway           | **55+**                 |\n| **Free tier**    | Rate-limited      | BYO keys         | No                | No                | **8 models, no signup** |\n| **Routing**      | Manual selection  | Manual selection | Smart (closed)    | Observability     | **Smart (open source)** |\n| **Auth**         | Account + API key | Your API keys    | Account + API key | Account + API key | **Wallet signature**    |\n| **Payment**      | Credit card       | BYO keys         | Credit card       | $49-499\u002Fmo        | **USDC per-request**    |\n| **Runs locally** | No                | Yes              | No                | No                | **Yes**                 |\n| **Open source**  | No                | Yes              | No                | Partial           | **Yes**                 |\n| **Agent-ready**  | No                | No               | No                | No                | **Yes**                 |\n\n✓ Open source · ✓ Smart routing · ✓ Runs locally · ✓ Crypto native · ✓ Agent ready\n\n**We're the only one that checks all five boxes.**\n\n---\n\n## Quick Start\n\n> **No wallet? 10 models work free out of the box.** Install, run, and pin `nvidia\u002Fgpt-oss-120b` (or any of the 10) — no crypto, no signup, no balance required. Add USDC later when you want paid models.\n\n### Option A — OpenClaw Agent\n\n[OpenClaw](https:\u002F\u002Fopenclaw.ai) is an AI coding agent. If you're using it, ClawRouter installs as a plugin. **Two paths:**\n\n**A1. Recommended — one-shot install script:**\n\n```bash\ncurl -fsSL https:\u002F\u002Fblockrun.ai\u002FClawRouter-update | bash\nopenclaw gateway restart\n```\n\nThis handles everything: registration, models config, auth profile, wallet setup. Smart routing (`blockrun\u002Fauto`) is now your default model.\n\n**A2. If you prefer pure npm:**\n\n```bash\nnpm install -g @blockrun\u002Fclawrouter\nclawrouter setup            # finishes OpenClaw integration — REQUIRED\nopenclaw gateway restart\n```\n\n> ⚠️ **Skipping `clawrouter setup` will leave you broken.** Bare `npm install -g` only puts the package on disk; it does NOT register the plugin with OpenClaw, sync the models allowlist, or write the auth profile. Symptom: `\u002Fmodels` in your bot shows only ~7 entries (OpenClaw's hardcoded defaults) instead of the full ~38 BlockRun models. Run `clawrouter setup` to repair, or use path A1 to begin with.\n\n### Option B — Standalone (continue.dev, Cursor, VS Code, any OpenAI-compatible client)\n\n> **Using Claude Code?** Check out [BRCC](https:\u002F\u002Fblockrun.ai\u002Fbrcc.md) — it's purpose-built for Claude Code with the same smart routing and x402 payments.\n>\n> **Using NousResearch Hermes?** See [ClawRouter-Hermes](https:\u002F\u002Fgithub.com\u002FBlockRunAI\u002FClawRouter-Hermes) — a Python plugin that wires Hermes into the ClawRouter proxy. Same wallet, same 55+ models, same x402 USDC settlement on Base & Solana.\n\nNo OpenClaw required. ClawRouter runs as a local proxy on port 8402.\n\n**1. Start the proxy**\n\n```bash\nnpx @blockrun\u002Fclawrouter\n```\n\n**2. Fund your wallet** — optional, skip for free tier\nYour wallet address is printed on first run. For paid models, send a few USDC on Base or Solana — $5 covers thousands of requests. To stay at $0, pin any of the 10 free models (e.g. `nvidia\u002Fgpt-oss-120b`) or use `\u002Fmodel free` inside OpenClaw.\n\n**3. Point your client at `http:\u002F\u002Flocalhost:8402`**\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>continue.dev\u003C\u002Fstrong> — \u003Ccode>~\u002F.continue\u002Fconfig.yaml\u003C\u002Fcode>\u003C\u002Fsummary>\n\n> **Important:** `apiBase` must end with `\u002Fv1\u002F` (including the trailing slash). Without it, continue.dev constructs the URL as `\u002Fchat\u002Fcompletions` instead of `\u002Fv1\u002Fchat\u002Fcompletions`, and the proxy returns 404.\n\n```yaml\nmodels:\n  - name: ClawRouter Auto\n    provider: openai\n    model: blockrun\u002Fauto\n    apiBase: http:\u002F\u002Flocalhost:8402\u002Fv1\u002F\n    apiKey: x402\n    roles:\n      - chat\n      - edit\n      - apply\n```\n\nTo pin a specific model, replace `blockrun\u002Fauto` with any model from [blockrun.ai\u002Fmodels](https:\u002F\u002Fblockrun.ai\u002Fmodels), e.g. `anthropic\u002Fclaude-opus-4.6`, `xai\u002Fgrok-4-0709`.\n\nBoth `provider: openai` and `provider: clawrouter` work — just make sure `apiBase` ends with `\u002Fv1\u002F`.\n\n\u003Cdetails>\n\u003Csummary>Legacy JSON format (\u003Ccode>~\u002F.continue\u002Fconfig.json\u003C\u002Fcode>)\u003C\u002Fsummary>\n\n```json\n{\n  \"models\": [\n    {\n      \"title\": \"ClawRouter Auto\",\n      \"provider\": \"openai\",\n      \"model\": \"blockrun\u002Fauto\",\n      \"apiBase\": \"http:\u002F\u002Flocalhost:8402\u002Fv1\u002F\",\n      \"apiKey\": \"x402\"\n    }\n  ]\n}\n```\n\n\u003C\u002Fdetails>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Cursor\u003C\u002Fstrong> — Settings → Models → OpenAI-compatible\u003C\u002Fsummary>\n\nSet base URL to `http:\u002F\u002Flocalhost:8402`, API key to `x402`, model to `blockrun\u002Fauto`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Any OpenAI SDK\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n```python\nfrom openai import OpenAI\nclient = OpenAI(base_url=\"http:\u002F\u002Flocalhost:8402\", api_key=\"x402\")\nresponse = client.chat.completions.create(model=\"blockrun\u002Fauto\", messages=[...])\n```\n\n\u003C\u002Fdetails>\n\n---\n\n## Routing Profiles\n\nChoose your routing strategy with `\u002Fmodel \u003Cprofile>`:\n\n| Profile          | Strategy           | Savings  | Best For             |\n| ---------------- | ------------------ | -------- | -------------------- |\n| `\u002Fmodel free`    | Free NVIDIA models | **100%** | $0 balance, learning |\n| `\u002Fmodel auto`    | Balanced (default) | 74-100%  | General use          |\n| `\u002Fmodel eco`     | Cheapest possible  | 95-100%  | Maximum savings      |\n| `\u002Fmodel premium` | Best quality       | 0%       | Mission-critical     |\n\n**Shortcuts:** `\u002Fmodel grok`, `\u002Fmodel br-sonnet`, `\u002Fmodel gpt5`, `\u002Fmodel o3`\n\n---\n\n## How It Works\n\n**100% local routing. \u003C1ms latency. Zero external API calls.**\n\n```\nRequest → Weighted Scorer (15 dimensions) → Tier → Best Model → Response\n```\n\n| Tier      | ECO Model                           | AUTO Model                            | PREMIUM Model                |\n| --------- | ----------------------------------- | ------------------------------------- | ---------------------------- |\n| SIMPLE    | nvidia\u002Fgpt-oss-120b (**FREE**)      | gemini-2.5-flash ($0.30\u002F$2.50)        | kimi-k2.6                    |\n| MEDIUM    | gemini-3.1-flash-lite ($0.25\u002F$1.50) | kimi-k2.5 ($0.60\u002F$3.00)               | gpt-5.3-codex ($1.75\u002F$14.00) |\n| COMPLEX   | gemini-3.1-flash-lite ($0.25\u002F$1.50) | gemini-3.1-pro ($2\u002F$12)               | claude-opus-4.6 ($5\u002F$25)     |\n| REASONING | grok-4-1-fast ($0.20\u002F$0.50)         | grok-4-1-fast-reasoning ($0.20\u002F$0.50) | claude-sonnet-4.6 ($3\u002F$15)   |\n\n**Blended average: $2.05\u002FM** vs $25\u002FM for Claude Opus = **92% savings**\n\n---\n\n## Image Generation\n\nGenerate images directly from chat with `\u002Fcr-imagegen`:\n\n```\n\u002Fcr-imagegen a dog dancing on the beach\n\u002Fcr-imagegen --model dall-e-3 a futuristic city at sunset\n\u002Fcr-imagegen --model banana-pro --size 2048x2048 mountain landscape\n```\n\n> The slash command is `\u002Fcr-imagegen` to avoid colliding with Telegram channel commands. Typing `\u002Fimagegen` in chat still works for backward compatibility.\n\n| Model                        | Provider              | Price        | Max Size  |\n| ---------------------------- | --------------------- | ------------ | --------- |\n| `nano-banana`                | Google Gemini Flash   | $0.05\u002Fimage  | 1024x1024 |\n| `banana-pro`                 | Google Gemini Pro     | $0.10\u002Fimage  | 4096x4096 |\n| `dall-e-3`                   | OpenAI DALL-E 3       | $0.04\u002Fimage  | 1792x1024 |\n| `gpt-image`                  | OpenAI GPT Image 1    | $0.02\u002Fimage  | 1536x1024 |\n| `flux`                       | Black Forest Flux 1.1 | $0.04\u002Fimage  | 1024x1024 |\n| `xai\u002Fgrok-imagine-image`     | xAI Grok Imagine      | $0.02\u002Fimage  | 1024x1024 |\n| `xai\u002Fgrok-imagine-image-pro` | xAI Grok Imagine Pro  | $0.07\u002Fimage  | 1024x1024 |\n| `zai\u002Fcogview-4`              | Zhipu CogView-4       | $0.015\u002Fimage | 1440x1440 |\n\n## Video Generation\n\nGenerate short AI videos directly from chat with `\u002Fvideogen`:\n\n```\n\u002Fvideogen a red apple slowly spinning\n\u002Fvideogen --model seedance-2-fast --duration=5 a cat waving\n\u002Fvideogen --model grok-video a neon city at night\n```\n\nOr drive it over HTTP — ClawRouter proxies the BlockRun gateway, handles x402 payment, and downloads the returned MP4 to local disk, rewriting `url` to `http:\u002F\u002Flocalhost:8402\u002Fvideos\u002F\u003Cfile>.mp4` so the asset survives past the upstream's temporary bucket.\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fvideos\u002Fgenerations \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"model\":\"bytedance\u002Fseedance-2.0-fast\",\"prompt\":\"a red apple slowly spinning\",\"duration_seconds\":5}'\n```\n\n| Model                         | Provider           | Price     | Duration              |\n| ----------------------------- | ------------------ | --------- | --------------------- |\n| `bytedance\u002Fseedance-1.5-pro`  | ByteDance Seedance | $0.03\u002Fsec | 5s default, up to 10s |\n| `bytedance\u002Fseedance-2.0-fast` | ByteDance Seedance | $0.15\u002Fsec | 5s default, up to 10s |\n| `bytedance\u002Fseedance-2.0`      | ByteDance Seedance | $0.30\u002Fsec | 5s default, up to 10s |\n| `xai\u002Fgrok-imagine-video`      | xAI Grok Imagine   | $0.05\u002Fsec | 8s default            |\n\nCalls block for 30–120s while the upstream polls the job. Text-to-video and image-to-video (`image_url` parameter) are both supported. Seedance 2.0 Fast typically returns in 60–80s; 2.0 Pro trades latency for quality.\n\n## Image Editing (img2img)\n\nEdit existing images with `\u002Fimg2img`:\n\n```\n\u002Fimg2img --image ~\u002Fphoto.png change the background to a starry sky\n\u002Fimg2img --image .\u002Fcat.jpg --mask .\u002Fmask.png remove the background\n```\n\n| Option            | Required | Description                           |\n| ----------------- | -------- | ------------------------------------- |\n| `--image \u003Cpath>`  | Yes      | Local image file path (supports `~\u002F`) |\n| `--mask \u003Cpath>`   | No       | Mask image (white = area to edit)     |\n| `--model \u003Cmodel>` | No       | Model to use (default: `gpt-image-1`) |\n| `--size \u003CWxH>`    | No       | Output size (default: `1024x1024`)    |\n\n**API endpoint:** `POST http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fimages\u002Fimage2image` — see [full docs](docs\u002Fimage-generation.md#post-v1imagesimage2image).\n\n## Phone & Voice Calls\n\nVerify phone numbers and place AI-powered outbound voice calls directly from chat. Phone intelligence runs on Twilio; voice calls use Bland.ai. Payment is automatic via x402 from the wallet.\n\n```\n\u002Fcr-call +14155552671 \"Hi, this is calling to confirm tomorrow's 3pm meeting\"\n\u002Fcr-call +14155552671 \"Order a large pepperoni for delivery\" --voice josh --max-duration 10\n```\n\nCalls are **fire-and-forget**: the request returns a `call_id` and `poll_url` immediately. The call itself runs in the cloud for up to 30 minutes. Poll `GET \u002Fv1\u002Fvoice\u002Fcall\u002F{call_id}` (or `clawrouter share`\u002Ftranscripts dashboard) to retrieve the transcript and recording when status is `completed`.\n\n| Operation                         | Provider | Price                        |\n| --------------------------------- | -------- | ---------------------------- |\n| Phone lookup (carrier, line type) | Twilio   | $0.01                        |\n| Fraud check (SIM-swap, fwd)       | Twilio   | $0.05                        |\n| Buy phone number (30-day lease)   | Twilio   | $5.00                        |\n| Renew lease (+30 days)            | Twilio   | $5.00                        |\n| List wallet's owned numbers       | Twilio   | $0.001                       |\n| Release a number                  | Twilio   | free                         |\n| **AI voice call (≤30 min)**       | Bland.ai | **$0.54 flat per call**      |\n| Poll call status \u002F transcript     | Bland.ai | free                         |\n\n**CLI for wallet-owned numbers:**\n\n```bash\nclawrouter phone numbers list                              # See active numbers + expiry\nclawrouter phone numbers buy US --area-code 415            # Provision a SF number\nclawrouter phone numbers renew +14155551234                # Extend 30 days\nclawrouter phone numbers release +14155551234              # Release\nclawrouter phone lookup +14155552671                       # Carrier + line type\nclawrouter phone fraud +14155552671                        # SIM-swap + fwd signals\n```\n\n**HTTP API:**\n\n```bash\n# Place a call\ncurl -X POST http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fvoice\u002Fcall \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"to\":\"+14155552671\",\"task\":\"Confirm the 3pm Thursday meeting.\",\"max_duration\":5}'\n# → { \"call_id\": \"call_abc123\", \"poll_url\": \"\u002Fv1\u002Fvoice\u002Fcall\u002Fcall_abc123\", \"status\": \"queued\" }\n\n# Poll for transcript\ncurl http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fvoice\u002Fcall\u002Fcall_abc123\n```\n\nLLM agents discover all eight operations as `blockrun_phone_*` \u002F `blockrun_voice_*` tools (see `\u002Fpartners`).\n\n> ⚠️ `blockrun_voice_call` and `\u002Fcr-call` place a **real** outbound phone call. Server enforces an emergency-number blocklist; choose `--from` from wallet-owned numbers via `phone numbers list`.\n\n---\n\n## Crypto Data (Surf)\n\nSurf is BlockRun's unified crypto data API — **84 endpoints across 13 domains**: CEX\u002FDEX markets, on-chain SQL over 80+ ClickHouse tables (Ethereum, Base, Arbitrum, BSC, TRON, HyperEVM, Tempo), 100M+ labeled wallets, prediction markets (Polymarket + Kalshi), social\u002FCT mindshare, news, project\u002FDeFi metrics, token analytics, unified search, VC fund intelligence. The killer feature is ad-hoc `POST \u002Fsurf\u002Fonchain\u002Fsql` — agents query the warehouse directly without running an indexer.\n\nClawRouter ships Surf as a **skill, not as typed wrappers**. The proxy whitelists `\u002Fv1\u002Fsurf\u002F*` so any call through the local proxy is paid x402 from the same wallet; the agent reads `skills\u002Fsurf\u002FSKILL.md` for the endpoint catalog and crafts the HTTP call. No `blockrun_surf_*` tool definitions to maintain; a new Surf endpoint requires zero ClawRouter release.\n\n| Tier | Cost      | Examples                                                      |\n| ---- | --------: | ------------------------------------------------------------- |\n| 1    | **$0.001**| prices, rankings, lists, news                                 |\n| 2    | **$0.005**| orderbooks, candles, search, wallet details, social mindshare |\n| 3    | **$0.020**| on-chain SQL \u002F query \u002F schema, chat completions               |\n\n**Usage (HTTP):**\n\n```bash\n# Aggregated BTC spot price (Tier 1, $0.001)\ncurl 'http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fsurf\u002Fmarket\u002Fprice?symbol=BTC'\n\n# Bulk wallet labels over 100M+ labeled wallets (Tier 2, $0.005)\ncurl 'http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fsurf\u002Fwallet\u002Flabels\u002Fbatch?addresses=0xabc,0xdef,0x123'\n\n# Ad-hoc on-chain SQL (Tier 3, $0.020)\ncurl -X POST 'http:\u002F\u002Flocalhost:8402\u002Fv1\u002Fsurf\u002Fonchain\u002Fsql' \\\n  -H 'content-type: application\u002Fjson' \\\n  -d '{\"sql\":\"SELECT count() FROM ethereum.transactions WHERE block_timestamp >= now() - INTERVAL 1 HOUR\"}'\n```\n\nNo Surf account, no API key — settles directly to Surf's Base treasury in USDC via the same wallet as LLM calls. Full endpoint reference: [`skills\u002Fsurf\u002FSKILL.md`](skills\u002Fsurf\u002FSKILL.md). Upstream marketplace: \u003Chttps:\u002F\u002Fblockrun.ai\u002Fmarketplace\u002Fsurf>.\n\n---\n\n## Models & Pricing\n\n55+ models across 9 providers, one wallet. **Starting at $0.0002\u002Frequest.**\n\n> **💡 \"Cost per request\"** = estimated cost for a typical chat message (~500 input + 500 output tokens).\n\n### Budget Models (under $0.001\u002Frequest)\n\n| Model                                         | Input $\u002FM | Output $\u002FM | ~$\u002Frequest | Context | Features                                     |\n| --------------------------------------------- | --------: | ---------: | ---------: | ------- | -------------------------------------------- |\n| nvidia\u002Fgpt-oss-120b                           |  **FREE** |   **FREE** |     **$0** | 128K    | default free model                           |\n| nvidia\u002Fgpt-oss-20b                            |  **FREE** |   **FREE** |     **$0** | 128K    | smaller, faster                              |\n| nvidia\u002Fmistral-small-4-119b                   |  **FREE** |   **FREE** |     **$0** | 131K    | fastest free chat (114 tok\u002Fs)                |\n| nvidia\u002Fdeepseek-v4-pro                        |  **FREE** |   **FREE** |     **$0** | 1M      | reasoning, MMLU-Pro 87.5                     |\n| nvidia\u002Fdeepseek-v4-flash                      |  **FREE** |   **FREE** |     **$0** | 1M      | reasoning, ~5x faster than v4-pro            |\n| nvidia\u002Fqwen3-next-80b-a3b-thinking            |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                                    |\n| nvidia\u002Fqwen3-coder-480b                       |  **FREE** |   **FREE** |     **$0** | 131K    | coding                                       |\n| nvidia\u002Fglm-4.7                                |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                                    |\n| nvidia\u002Fllama-4-maverick                       |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                                    |\n| nvidia\u002Fnemotron-3-nano-omni-30b-a3b-reasoning |  **FREE** |   **FREE** |     **$0** | 256K    | reasoning, **vision** (text+img+video+audio) |\n| openai\u002Fgpt-5-nano                             |     $0.05 |      $0.40 |    $0.0002 | 128K    | tools                                        |\n| openai\u002Fgpt-4.1-nano                           |     $0.10 |      $0.40 |    $0.0003 | 128K    | tools                                        |\n| google\u002Fgemini-2.5-flash-lite                  |     $0.10 |      $0.40 |    $0.0003 | 1M      | tools                                        |\n| openai\u002Fgpt-4o-mini                            |     $0.15 |      $0.60 |    $0.0004 | 128K    | tools                                        |\n| xai\u002Fgrok-4-fast                               |     $0.20 |      $0.50 |    $0.0004 | 131K    | tools                                        |\n| xai\u002Fgrok-4-fast-reasoning                     |     $0.20 |      $0.50 |    $0.0004 | 131K    | reasoning, tools                             |\n| xai\u002Fgrok-4-1-fast                             |     $0.20 |      $0.50 |    $0.0004 | 131K    | tools                                        |\n| xai\u002Fgrok-4-1-fast-reasoning                   |     $0.20 |      $0.50 |    $0.0004 | 131K    | reasoning, tools                             |\n| xai\u002Fgrok-4-0709                               |     $0.20 |      $1.50 |    $0.0009 | 131K    | reasoning, tools                             |\n| openai\u002Fgpt-5-mini                             |     $0.25 |      $2.00 |    $0.0011 | 200K    | tools                                        |\n| deepseek\u002Fdeepseek-chat                        |     $0.28 |      $0.42 |    $0.0004 | 128K    | tools                                        |\n| deepseek\u002Fdeepseek-reasoner                    |     $0.28 |      $0.42 |    $0.0004 | 128K    | reasoning, tools                             |\n| xai\u002Fgrok-3-mini                               |     $0.30 |      $0.50 |    $0.0004 | 131K    | tools                                        |\n| minimax\u002Fminimax-m2.7                          |     $0.30 |      $1.20 |    $0.0008 | 205K    | reasoning, agentic, tools                    |\n| minimax\u002Fminimax-m2.5                          |     $0.30 |      $1.20 |    $0.0008 | 205K    | reasoning, agentic, tools                    |\n| google\u002Fgemini-2.5-flash                       |     $0.30 |      $2.50 |    $0.0014 | 1M      | vision, tools                                |\n| openai\u002Fgpt-4.1-mini                           |     $0.40 |      $1.60 |    $0.0010 | 128K    | tools                                        |\n| google\u002Fgemini-3-flash-preview                 |     $0.50 |      $3.00 |    $0.0018 | 1M      | vision                                       |\n| moonshot\u002Fkimi-k2.5                            |     $0.60 |      $3.00 |    $0.0018 | 262K    | reasoning, vision, agentic, tools            |\n| moonshot\u002Fkimi-k2.6                            |     $0.95 |      $4.00 |    $0.0025 | 262K    | reasoning, vision, agentic, tools            |\n\n### Mid-Range Models ($0.001–$0.01\u002Frequest)\n\n| Model                       | Input $\u002FM | Output $\u002FM | ~$\u002Frequest | Context | Features                          |\n| --------------------------- | --------: | ---------: | ---------: | ------- | --------------------------------- |\n| anthropic\u002Fclaude-haiku-4.5  |     $1.00 |      $5.00 |    $0.0030 | 200K    | vision, agentic, tools            |\n| zai\u002Fglm-5                   |     $1.00 |      $3.20 |    $0.0021 | 200K    | tools                             |\n| openai\u002Fo1-mini              |     $1.10 |      $4.40 |    $0.0028 | 128K    | reasoning, tools                  |\n| openai\u002Fo3-mini              |     $1.10 |      $4.40 |    $0.0028 | 128K    | reasoning, tools                  |\n| openai\u002Fo4-mini              |     $1.10 |      $4.40 |    $0.0028 | 128K    | reasoning, tools                  |\n| zai\u002Fglm-5-turbo             |     $1.20 |      $4.00 |    $0.0026 | 200K    | tools                             |\n| google\u002Fgemini-2.5-pro       |     $1.25 |     $10.00 |    $0.0056 | 1M      | reasoning, vision, tools          |\n| openai\u002Fgpt-5.2              |     $1.75 |     $14.00 |    $0.0079 | 400K    | reasoning, vision, agentic, tools |\n| openai\u002Fgpt-5.3              |     $1.75 |     $14.00 |    $0.0079 | 128K    | reasoning, vision, agentic, tools |\n| openai\u002Fgpt-5.3-codex        |     $1.75 |     $14.00 |    $0.0079 | 400K    | agentic, tools                    |\n| openai\u002Fgpt-4.1              |     $2.00 |      $8.00 |    $0.0050 | 128K    | vision, tools                     |\n| openai\u002Fo3                   |     $2.00 |      $8.00 |    $0.0050 | 200K    | reasoning, tools                  |\n| google\u002Fgemini-3-pro-preview |     $2.00 |     $12.00 |    $0.0070 | 1M      | reasoning, vision, tools          |\n| google\u002Fgemini-3.1-pro       |     $2.00 |     $12.00 |    $0.0070 | 1M      | reasoning, vision, tools          |\n| xai\u002Fgrok-2-vision           |     $2.00 |     $10.00 |    $0.0060 | 131K    | vision, tools                     |\n| openai\u002Fgpt-4o               |     $2.50 |     $10.00 |    $0.0063 | 128K    | vision, agentic, tools            |\n| openai\u002Fgpt-5.4              |     $2.50 |     $15.00 |    $0.0088 | 400K    | reasoning, vision, agentic, tools |\n\n### Premium Models ($0.01+\u002Frequest)\n\n| Model                       | Input $\u002FM | Output $\u002FM | ~$\u002Frequest | Context | Features                          |\n| --------------------------- | --------: | ---------: | ---------: | ------- | --------------------------------- |\n| anthropic\u002Fclaude-sonnet-4.6 |     $3.00 |     $15.00 |    $0.0090 | 200K    | reasoning, vision, agentic, tools |\n| xai\u002Fgrok-3                  |     $3.00 |     $15.00 |    $0.0090 | 131K    | reasoning, tools                  |\n| anthropic\u002Fclaude-opus-4.6   |     $5.00 |     $25.00 |    $0.0150 | 200K    | reasoning, vision, agentic, tools |\n| openai\u002Fgpt-5.5              |     $5.00 |     $30.00 |    $0.0175 | 1M      | reasoning, vision, agentic, tools |\n| openai\u002Fo1                   |    $15.00 |     $60.00 |    $0.0375 | 200K    | reasoning, tools                  |\n| openai\u002Fgpt-5.2-pro          |    $21.00 |    $168.00 |    $0.0945 | 400K    | reasoning, tools                  |\n| openai\u002Fgpt-5.4-pro          |    $30.00 |    $180.00 |    $0.1050 | 400K    | reasoning, tools                  |\n\n> **Free tier:** 10 models cost nothing — `\u002Fmodel free` points to gpt-oss-120b, or pick any free model directly (e.g., `\u002Fmodel deepseek-v4-pro` for reasoning, `\u002Fmodel nemotron-omni` for vision, `\u002Fmodel qwen-thinking`, `\u002Fmodel deepseek-v4-flash` for 1M context, `\u002Fmodel mistral-small`).\n> **Best value:** `gpt-5-nano` and `gemini-2.5-flash-lite` deliver strong results at ~$0.0003\u002Frequest.\n\n---\n\n## Payment\n\nNo account. No API key. **Payment IS authentication** via [x402](https:\u002F\u002Fx402.org).\n\n```\nRequest → 402 (price: $0.003) → wallet signs USDC → retry → response\n```\n\nUSDC stays in your wallet until spent — non-custodial. Price is visible in the 402 header before signing.\n\n**Dual-chain support:** Pay with **USDC** on **Base (EVM)** or **USDC on Solana**. Both wallets are derived from a single BIP-39 mnemonic on first run.\n\n```bash\n\u002Fwallet              # Check balance and address (both chains)\n\u002Fwallet export       # Export mnemonic + keys for backup\n\u002Fwallet recover      # Restore wallet from mnemonic on a new machine\n\u002Fwallet solana       # Switch to Solana USDC payments\n\u002Fwallet base         # Switch back to Base (EVM) USDC payments\n\u002Fchain solana        # Alias for \u002Fwallet solana\n\u002Fstats               # View usage and savings\n\u002Fstats clear         # Reset usage statistics\n\u002Fexclude             # Show excluded models\n\u002Fexclude add \u003Cmodel> # Block a model from routing (aliases work: \"grok-4\", \"free\")\n\u002Fexclude remove \u003Cmodel> # Unblock a model\n\u002Fexclude clear       # Remove all exclusions\n```\n\n**Fund your wallet:**\n\n- **Base (EVM):** Send USDC on Base to your EVM address\n- **Solana:** Send USDC on Solana to your Solana address\n- **Coinbase\u002FCEX:** Withdraw USDC to either network\n- **Credit card:** Reach out to [@bc1max on Telegram](https:\u002F\u002Ft.me\u002Fbc1max)\n\n---\n\n## Screenshots\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\" align=\"center\">\n\u003Cstrong>Smart Routing in Action\u003C\u002Fstrong>\u003Cbr>\u003Cbr>\n\u003Cimg src=\"docs\u002Fclawrouter-savings.png\" alt=\"ClawRouter savings\" width=\"400\">\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\" align=\"center\">\n\u003Cstrong>Telegram Integration\u003C\u002Fstrong>\u003Cbr>\u003Cbr>\n\u003Cimg src=\"assets\u002Ftelegram-demo.png\" alt=\"Telegram demo\" width=\"400\">\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## Configuration\n\nFor basic usage, no configuration needed. For advanced options:\n\n| Variable                    | Default                               | Description             |\n| --------------------------- | ------------------------------------- | ----------------------- |\n| `BLOCKRUN_WALLET_KEY`       | auto-generated                        | Your wallet private key |\n| `BLOCKRUN_PROXY_PORT`       | `8402`                                | Local proxy port        |\n| `CLAWROUTER_DISABLED`       | `false`                               | Disable smart routing   |\n| `CLAWROUTER_SOLANA_RPC_URL` | `https:\u002F\u002Fapi.mainnet-beta.solana.com` | Solana RPC endpoint     |\n\n**Full reference:** [docs\u002Fconfiguration.md](docs\u002Fconfiguration.md)\n\n### Model Exclusion\n\nBlock specific models from being routed to. Useful if a model doesn't follow your agent instructions or you want to control costs.\n\n```bash\n\u002Fexclude add nvidia\u002Fgpt-oss-120b   # Block the default free model\n\u002Fexclude add grok-4                # Aliases work — blocks all grok-4 variants\n\u002Fexclude add gpt-5.4               # Skip expensive models\n\u002Fexclude                           # Show current exclusions\n\u002Fexclude remove grok-4             # Unblock a model\n\u002Fexclude clear                     # Remove all exclusions\n```\n\nExclusions persist across restarts (`~\u002F.openclaw\u002Fblockrun\u002Fexclude-models.json`). If all models in a tier are excluded, the safety net ignores the filter so routing never breaks.\n\n---\n\n## Troubleshooting\n\n**When things go wrong, run the doctor:**\n\n```bash\nnpx @blockrun\u002Fclawrouter doctor\n```\n\nThis collects diagnostics and sends them to Claude Sonnet for AI-powered analysis:\n\n```\n🩺 BlockRun Doctor v0.12.24\n\nSystem\n  ✓ OS: darwin arm64\n  ✓ Node: v20.11.0\n\nWallet\n  ✓ Address: 0x1234...abcd\n  ✓ Balance: $12.50\n\nNetwork\n  ✓ BlockRun API: reachable (142ms)\n  ✗ Local proxy: not running on :8402\n\n📤 Sending to Claude Sonnet 4.6 (~$0.003)...\n\n🤖 AI Analysis:\nThe local proxy isn't running. Run `openclaw gateway restart` to fix.\n```\n\n**Use Opus for complex issues:**\n\n```bash\nnpx @blockrun\u002Fclawrouter doctor opus\n```\n\n**Ask a specific question:**\n\n```bash\nnpx @blockrun\u002Fclawrouter doctor \"why is my request failing?\"\nnpx @blockrun\u002Fclawrouter doctor opus \"深度分析我的配置\"\n```\n\n**Cost:** Sonnet ~$0.003 (default) | Opus ~$0.01\n\n---\n\n## Development\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FBlockRunAI\u002FClawRouter.git\ncd ClawRouter\nnpm install\nnpm run build\nnpm test\n```\n\n---\n\n## Support\n\n| Channel               | Link                                                               |\n| --------------------- | ------------------------------------------------------------------ |\n| 📅 Schedule Demo      | [calendly.com\u002Fvickyfu9\u002F30min](https:\u002F\u002Fcalendly.com\u002Fvickyfu9\u002F30min) |\n| 💬 Community Telegram | [t.me\u002FblockrunAI](https:\u002F\u002Ft.me\u002FblockrunAI)                         |\n| 🐦 X \u002F Twitter        | [x.com\u002Fblockrunai](https:\u002F\u002Fx.com\u002Fblockrunai)                       |\n| 📱 Founder Telegram   | [@bc1max](https:\u002F\u002Ft.me\u002Fbc1max)                                     |\n| ✉️ Email              | vicky@blockrun.ai                                                  |\n\n---\n\n## From the BlockRun Ecosystem\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n### ⚡ ClawRouter\n\n**The LLM router built for autonomous agents**\n\nYou're here. 55+ models, local smart routing, x402 USDC payments — the only stack that lets agents operate independently.\n\n`curl -fsSL https:\u002F\u002Fblockrun.ai\u002FClawRouter-update | bash`\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n### 🤖 [BRCC](https:\u002F\u002Fblockrun.ai\u002Fbrcc.md)\n\n**BlockRun for Claude Code**\n\nRun Claude Code with 50+ models, no rate limits, no Anthropic account, no phone verification. Pay per request with USDC — your wallet is your identity.\n\n`curl -fsSL https:\u002F\u002Fblockrun.ai\u002Fbrcc-install | bash`\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n### 🐍 [ClawRouter-Hermes](https:\u002F\u002Fgithub.com\u002FBlockRunAI\u002FClawRouter-Hermes)\n\n**ClawRouter for NousResearch Hermes**\n\nPython plugin that wraps the ClawRouter proxy for `hermes-agent`. Same 55+ models, same x402 USDC payments on Base & Solana, native Hermes ergonomics.\n\n`pip install hermes-plugin-clawrouter`\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n\u003C!-- next ecosystem entry goes here -->\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## More Resources\n\n| Resource                                               | Description              |\n| ------------------------------------------------------ | ------------------------ |\n| [Documentation](https:\u002F\u002Fblockrun.ai\u002Fdocs)              | Full docs                |\n| [Model Pricing](https:\u002F\u002Fblockrun.ai\u002Fmodels)            | All models & prices      |\n| [Image Generation & Editing](docs\u002Fimage-generation.md) | API examples, 5 models   |\n| [Routing Profiles](docs\u002Frouting-profiles.md)           | ECO\u002FAUTO\u002FPREMIUM details |\n| [Architecture](docs\u002Farchitecture.md)                   | Technical deep dive      |\n| [Configuration](docs\u002Fconfiguration.md)                 | Environment variables    |\n| [Troubleshooting](docs\u002Ftroubleshooting.md)             | Common issues            |\n\n### Blog\n\n| Article                                                                                            | Topic                                                   |\n| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |\n| [11 Free AI Models, Zero Cost](docs\u002F11-free-ai-models-zero-cost-blockrun.md)                       | How BlockRun gives developers top-tier LLMs for nothing |\n| [ClawRouter Cuts LLM API Costs 500×](docs\u002Fclawrouter-cuts-llm-api-costs-500x.md)                   | Deep dive into cost savings                             |\n| [ClawRouter vs OpenRouter](docs\u002Fclawrouter-vs-openrouter-llm-routing-comparison.md)                | Head-to-head comparison                                 |\n| [Smart LLM Router: 14-Dimension Classifier](docs\u002Fsmart-llm-router-14-dimension-classifier.md)      | How the routing engine works                            |\n| [LLM Router Benchmark: 46 Models, Sub-1ms](docs\u002Fllm-router-benchmark-46-models-sub-1ms-routing.md) | Performance benchmarks                                  |\n| [Anthropic Cost Savings](docs\u002Fanthropic-cost-savings.md)                                           | Reducing Claude API spend                               |\n\n---\n\n## Frequently Asked Questions\n\n### What is ClawRouter?\n\nClawRouter is an open-source (MIT licensed) smart LLM router built for autonomous AI agents. It analyzes each request across 15 dimensions and routes to the cheapest capable model in under 1ms, entirely locally — no external API calls needed for routing decisions.\n\n### How much can ClawRouter save on LLM costs?\n\nClawRouter's blended average cost is $2.05 per million tokens compared to $25\u002FM for Claude Opus, representing 92% savings. Actual savings depend on your workload — simple queries are routed to free models ($0\u002Frequest), while complex tasks get premium models.\n\n### How does ClawRouter compare to OpenRouter?\n\nClawRouter is open source and runs locally. It uses wallet-based authentication (no API keys) and USDC per-request payments (no credit cards or subscriptions). OpenRouter requires an account, API key, and credit card. ClawRouter also features smart routing — it automatically picks the best model for each request, while OpenRouter requires manual model selection.\n\n### How does ClawRouter compare to LiteLLM?\n\nBoth are open source and run locally. But ClawRouter adds smart routing (automatic model selection), wallet-based auth, and USDC payments. LiteLLM requires you to bring your own API keys and manually choose models.\n\n### What agents does ClawRouter work with?\n\nClawRouter works with any tool that makes OpenAI-compatible API calls — point it at `http:\u002F\u002Flocalhost:8402`. This includes continue.dev, Cursor, VS Code extensions, ElizaOS, and custom agents. It also integrates as a plugin with [OpenClaw](https:\u002F\u002Fopenclaw.ai) (an AI coding agent), which enables additional features like slash commands and usage reports.\n\n### Is ClawRouter free?\n\nClawRouter itself is free and MIT licensed. You pay only for the LLM API calls routed through it — and 10 NVIDIA-hosted models (`gpt-oss-120b`, `gpt-oss-20b`, `mistral-small-4-119b`, `deepseek-v4-pro`, `deepseek-v4-flash`, `qwen3-next-80b-a3b-thinking`, `qwen3-coder-480b`, `glm-4.7`, `llama-4-maverick`, `nemotron-3-nano-omni-30b-a3b-reasoning`) are completely free. Use `\u002Fmodel free` to smart-route across them, or pick any by name.\n\n---\n\n\u003Cdiv align=\"center\">\n\n**MIT License** · [BlockRun](https:\u002F\u002Fblockrun.ai) — Agent-native AI infrastructure\n\n⭐ If ClawRouter powers your agents, consider starring the repo!\n\n\u003C\u002Fdiv>\n","ClawRouter 是一个专为自主代理设计的LLM路由工具，支持超过41种模型，并能在1毫秒内完成智能路由。其核心功能包括本地路由分析、零API密钥管理和通过x402协议实现的USDC微支付支持，显著降低了AI API的成本。技术上，ClawRouter使用TypeScript构建，提供智能路由算法以优化成本并确保快速响应。适用于需要高效且低成本处理大量AI请求的场景，如自动化客服、内容生成等应用，尤其适合希望减少对传统支付方式依赖的开发者或团队。",2,"2026-06-11 03:50:45","high_star"]