{"id":44341477,"url":"https://github.com/blockrunai/clawrouter","last_synced_at":"2026-04-01T20:50:14.761Z","repository":{"id":336356659,"uuid":"1149071982","full_name":"BlockRunAI/ClawRouter","owner":"BlockRunAI","description":"The agent-native LLM router empowering OpenClaw — by BlockRunAI","archived":false,"fork":false,"pushed_at":"2026-02-24T19:10:55.000Z","size":2548,"stargazers_count":3440,"open_issues_count":17,"forks_count":341,"subscribers_count":87,"default_branch":"main","last_synced_at":"2026-02-24T21:04:05.332Z","etag":null,"topics":["ai","ai-agents","anthropic","cost-optimization","crypto","deepseek","gemini","llm","llm-router","micropayments","openai","openclaw","smart-routing","usdc","x402"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlockRunAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-03T17:32:00.000Z","updated_at":"2026-02-24T19:11:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BlockRunAI/ClawRouter","commit_stats":null,"previous_names":["blockrunai/clawrouter"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/BlockRunAI/ClawRouter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2FClawRouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2FClawRouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2FClawRouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2FClawRouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockRunAI","download_url":"https://codeload.github.com/BlockRunAI/ClawRouter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2FClawRouter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29870360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:42:30.764Z","status":"ssl_error","status_checked_at":"2026-02-26T18:41:47.936Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","anthropic","cost-optimization","crypto","deepseek","gemini","llm","llm-router","micropayments","openai","openclaw","smart-routing","usdc","x402"],"created_at":"2026-02-11T13:00:32.683Z","updated_at":"2026-04-01T20:50:14.749Z","avatar_url":"https://github.com/BlockRunAI.png","language":"TypeScript","funding_links":[],"categories":["The latest additions 🎉"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/banner.png\" alt=\"ClawRouter Banner\" width=\"600\"\u003e\n\n\u003ch1\u003eThe LLM router built for autonomous agents\u003c/h1\u003e\n\n\u003cp\u003eAgents can't sign up for accounts. Agents can't enter credit cards.\u003cbr\u003e\nAgents can only sign transactions.\u003cbr\u003e\u003cbr\u003e\n\u003cstrong\u003eClawRouter is the only LLM router that lets agents operate independently.\u003c/strong\u003e\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cimg src=\"https://img.shields.io/badge/🤖_Agent--Native-black?style=for-the-badge\" alt=\"Agent native\"\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/🔑_Zero_API_Keys-blue?style=for-the-badge\" alt=\"No API keys\"\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/⚡_Local_Routing-yellow?style=for-the-badge\" alt=\"Local routing\"\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/💰_x402_USDC-purple?style=for-the-badge\" alt=\"x402 USDC\"\u003e\u0026nbsp;\n\u003cimg src=\"https://img.shields.io/badge/🔓_Open_Source-green?style=for-the-badge\" alt=\"Open source\"\u003e\n\n[![npm version](https://img.shields.io/npm/v/@blockrun/clawrouter.svg?style=flat-square\u0026color=cb3837)](https://npmjs.com/package/@blockrun/clawrouter)\n[![npm downloads](https://img.shields.io/npm/dm/@blockrun/clawrouter.svg?style=flat-square\u0026color=blue)](https://npmjs.com/package/@blockrun/clawrouter)\n[![GitHub stars](https://img.shields.io/github/stars/BlockRunAI/ClawRouter?style=flat-square)](https://github.com/BlockRunAI/ClawRouter)\n[![CI](https://img.shields.io/github/actions/workflow/status/BlockRunAI/ClawRouter/ci.yml?style=flat-square\u0026label=CI)](https://github.com/BlockRunAI/ClawRouter/actions)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-3178c6?style=flat-square\u0026logo=typescript\u0026logoColor=white)](https://typescriptlang.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)\n\n[![USDC Hackathon Winner](https://img.shields.io/badge/🏆_USDC_Hackathon-Agentic_Commerce_Winner-gold?style=flat-square)](https://x.com/USDC/status/2021625822294216977)\n[![x402 Protocol](https://img.shields.io/badge/x402-Micropayments-purple?style=flat-square)](https://x402.org)\n[![Base Network](https://img.shields.io/badge/Base-USDC-0052FF?style=flat-square\u0026logo=coinbase\u0026logoColor=white)](https://base.org)\n[![Solana](https://img.shields.io/badge/Solana-USDC-9945FF?style=flat-square\u0026logo=solana\u0026logoColor=white)](https://solana.com)\n[![OpenClaw Plugin](https://img.shields.io/badge/OpenClaw-Plugin-orange?style=flat-square)](https://openclaw.ai)\n[![Telegram](https://img.shields.io/badge/Telegram-Community-26A5E4?style=flat-square\u0026logo=telegram)](https://t.me/blockrunAI)\n\n\u003c/div\u003e\n\n\u003e **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- **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://x402.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| **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/mo        | **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### Option A — OpenClaw Agent\n\n[OpenClaw](https://openclaw.ai) is an AI coding agent. If you're using it, ClawRouter installs as a plugin:\n\n```bash\ncurl -fsSL https://blockrun.ai/ClawRouter-update | bash\nopenclaw gateway restart\n```\n\nDone. Smart routing (`blockrun/auto`) is now your default model.\n\n### Option B — Standalone (continue.dev, Cursor, VS Code, any OpenAI-compatible client)\n\n\u003e **Using Claude Code?** Check out [BRCC](https://github.com/BlockRunAI/brcc) — it's purpose-built for Claude Code with the same smart routing and x402 payments.\n\nNo OpenClaw required. ClawRouter runs as a local proxy on port 8402.\n\n**1. Start the proxy**\n\n```bash\nnpx @blockrun/clawrouter\n```\n\n**2. Fund your wallet**\nYour wallet address is printed on first run. Send a few USDC on Base or Solana — $5 covers thousands of requests.\n\n**3. Point your client at `http://localhost:8402`**\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003econtinue.dev\u003c/strong\u003e — \u003ccode\u003e~/.continue/config.yaml\u003c/code\u003e\u003c/summary\u003e\n\n\u003e **Important:** `apiBase` must end with `/v1/` (including the trailing slash). Without it, continue.dev constructs the URL as `/chat/completions` instead of `/v1/chat/completions`, and the proxy returns 404.\n\n```yaml\nmodels:\n  - name: ClawRouter Auto\n    provider: openai\n    model: blockrun/auto\n    apiBase: http://localhost:8402/v1/\n    apiKey: x402\n    roles:\n      - chat\n      - edit\n      - apply\n```\n\nTo pin a specific model, replace `blockrun/auto` with any model from [blockrun.ai/models](https://blockrun.ai/models), e.g. `anthropic/claude-opus-4.6`, `xai/grok-4-0709`.\n\nBoth `provider: openai` and `provider: clawrouter` work — just make sure `apiBase` ends with `/v1/`.\n\n\u003cdetails\u003e\n\u003csummary\u003eLegacy JSON format (\u003ccode\u003e~/.continue/config.json\u003c/code\u003e)\u003c/summary\u003e\n\n```json\n{\n  \"models\": [\n    {\n      \"title\": \"ClawRouter Auto\",\n      \"provider\": \"openai\",\n      \"model\": \"blockrun/auto\",\n      \"apiBase\": \"http://localhost:8402/v1/\",\n      \"apiKey\": \"x402\"\n    }\n  ]\n}\n```\n\n\u003c/details\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCursor\u003c/strong\u003e — Settings → Models → OpenAI-compatible\u003c/summary\u003e\n\nSet base URL to `http://localhost:8402`, API key to `x402`, model to `blockrun/auto`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAny OpenAI SDK\u003c/strong\u003e\u003c/summary\u003e\n\n```python\nfrom openai import OpenAI\nclient = OpenAI(base_url=\"http://localhost:8402\", api_key=\"x402\")\nresponse = client.chat.completions.create(model=\"blockrun/auto\", messages=[...])\n```\n\n\u003c/details\u003e\n\n---\n\n## Routing Profiles\n\nChoose your routing strategy with `/model \u003cprofile\u003e`:\n\n| Profile          | Strategy           | Savings | Best For         |\n| ---------------- | ------------------ | ------- | ---------------- |\n| `/model auto`    | Balanced (default) | 74-100% | General use      |\n| `/model eco`     | Cheapest possible  | 95-100% | Maximum savings  |\n| `/model premium` | Best quality       | 0%      | Mission-critical |\n\n**Shortcuts:** `/model grok`, `/model br-sonnet`, `/model gpt5`, `/model 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/gpt-oss-120b (**FREE**)      | gemini-2.5-flash ($0.30/$2.50)        | kimi-k2.5                    |\n| 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) |\n| COMPLEX   | gemini-3.1-flash-lite ($0.25/$1.50) | gemini-3.1-pro ($2/$12)               | claude-opus-4.6 ($5/$25)     |\n| REASONING | grok-4-1-fast ($0.20/$0.50)         | grok-4-1-fast-reasoning ($0.20/$0.50) | claude-sonnet-4.6 ($3/$15)   |\n\n**Blended average: $2.05/M** vs $25/M for Claude Opus = **92% savings**\n\n---\n\n## Image Generation\n\nGenerate images directly from chat with `/imagegen`:\n\n```\n/imagegen a dog dancing on the beach\n/imagegen --model dall-e-3 a futuristic city at sunset\n/imagegen --model banana-pro --size 2048x2048 mountain landscape\n```\n\n| Model         | Provider              | Price       | Max Size  |\n| ------------- | --------------------- | ----------- | --------- |\n| `nano-banana` | Google Gemini Flash   | $0.05/image | 1024x1024 |\n| `banana-pro`  | Google Gemini Pro     | $0.10/image | 4096x4096 |\n| `dall-e-3`    | OpenAI DALL-E 3       | $0.04/image | 1792x1024 |\n| `gpt-image`   | OpenAI GPT Image 1    | $0.02/image | 1536x1024 |\n| `flux`        | Black Forest Flux 1.1 | $0.04/image | 1024x1024 |\n\n## Image Editing (img2img)\n\nEdit existing images with `/img2img`:\n\n```\n/img2img --image ~/photo.png change the background to a starry sky\n/img2img --image ./cat.jpg --mask ./mask.png remove the background\n```\n\n| Option            | Required | Description                           |\n| ----------------- | -------- | ------------------------------------- |\n| `--image \u003cpath\u003e`  | Yes      | Local image file path (supports `~/`) |\n| `--mask \u003cpath\u003e`   | No       | Mask image (white = area to edit)     |\n| `--model \u003cmodel\u003e` | No       | Model to use (default: `gpt-image-1`) |\n| `--size \u003cWxH\u003e`    | No       | Output size (default: `1024x1024`)    |\n\n**API endpoint:** `POST http://localhost:8402/v1/images/image2image` — see [full docs](docs/image-generation.md#post-v1imagesimage2image).\n\n---\n\n## Models \u0026 Pricing\n\n55+ models across 9 providers, one wallet. **Starting at $0.0002/request.**\n\n\u003e **💡 \"Cost per request\"** = estimated cost for a typical chat message (~500 input + 500 output tokens).\n\n### Budget Models (under $0.001/request)\n\n| Model                         | Input $/M | Output $/M | ~$/request | Context | Features                          |\n| ----------------------------- | --------: | ---------: | ---------: | ------- | --------------------------------- |\n| nvidia/gpt-oss-120b           |  **FREE** |   **FREE** |     **$0** | 128K    |                                   |\n| nvidia/gpt-oss-20b            |  **FREE** |   **FREE** |     **$0** | 128K    |                                   |\n| nvidia/nemotron-ultra-253b    |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| nvidia/nemotron-3-super-120b  |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| nvidia/nemotron-super-49b     |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| nvidia/deepseek-v3.2          |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| nvidia/mistral-large-3-675b   |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| nvidia/qwen3-coder-480b       |  **FREE** |   **FREE** |     **$0** | 131K    |                                   |\n| nvidia/devstral-2-123b        |  **FREE** |   **FREE** |     **$0** | 131K    |                                   |\n| nvidia/glm-4.7                |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| nvidia/llama-4-maverick       |  **FREE** |   **FREE** |     **$0** | 131K    | reasoning                         |\n| openai/gpt-5-nano             |     $0.05 |      $0.40 |    $0.0002 | 128K    | tools                             |\n| openai/gpt-4.1-nano           |     $0.10 |      $0.40 |    $0.0003 | 128K    | tools                             |\n| google/gemini-2.5-flash-lite  |     $0.10 |      $0.40 |    $0.0003 | 1M      | tools                             |\n| openai/gpt-4o-mini            |     $0.15 |      $0.60 |    $0.0004 | 128K    | tools                             |\n| xai/grok-4-fast               |     $0.20 |      $0.50 |    $0.0004 | 131K    | tools                             |\n| xai/grok-4-fast-reasoning     |     $0.20 |      $0.50 |    $0.0004 | 131K    | reasoning, tools                  |\n| xai/grok-4-1-fast             |     $0.20 |      $0.50 |    $0.0004 | 131K    | tools                             |\n| xai/grok-4-1-fast-reasoning   |     $0.20 |      $0.50 |    $0.0004 | 131K    | reasoning, tools                  |\n| xai/grok-4-0709               |     $0.20 |      $1.50 |    $0.0009 | 131K    | reasoning, tools                  |\n| openai/gpt-5-mini             |     $0.25 |      $2.00 |    $0.0011 | 200K    | tools                             |\n| deepseek/deepseek-chat        |     $0.28 |      $0.42 |    $0.0004 | 128K    | tools                             |\n| deepseek/deepseek-reasoner    |     $0.28 |      $0.42 |    $0.0004 | 128K    | reasoning, tools                  |\n| xai/grok-3-mini               |     $0.30 |      $0.50 |    $0.0004 | 131K    | tools                             |\n| minimax/minimax-m2.7          |     $0.30 |      $1.20 |    $0.0008 | 205K    | reasoning, agentic, tools         |\n| minimax/minimax-m2.5          |     $0.30 |      $1.20 |    $0.0008 | 205K    | reasoning, agentic, tools         |\n| google/gemini-2.5-flash       |     $0.30 |      $2.50 |    $0.0014 | 1M      | vision, tools                     |\n| openai/gpt-4.1-mini           |     $0.40 |      $1.60 |    $0.0010 | 128K    | tools                             |\n| google/gemini-3-flash-preview |     $0.50 |      $3.00 |    $0.0018 | 1M      | vision                            |\n| nvidia/kimi-k2.5              |     $0.55 |      $2.50 |    $0.0015 | 262K    | tools                             |\n| moonshot/kimi-k2.5            |     $0.60 |      $3.00 |    $0.0018 | 262K    | reasoning, vision, agentic, tools |\n\n### Mid-Range Models ($0.001–$0.01/request)\n\n| Model                       | Input $/M | Output $/M | ~$/request | Context | Features                          |\n| --------------------------- | --------: | ---------: | ---------: | ------- | --------------------------------- |\n| anthropic/claude-haiku-4.5  |     $1.00 |      $5.00 |    $0.0030 | 200K    | vision, agentic, tools            |\n| zai/glm-5                   |     $1.00 |      $3.20 |    $0.0021 | 200K    | tools                             |\n| openai/o1-mini              |     $1.10 |      $4.40 |    $0.0028 | 128K    | reasoning, tools                  |\n| openai/o3-mini              |     $1.10 |      $4.40 |    $0.0028 | 128K    | reasoning, tools                  |\n| openai/o4-mini              |     $1.10 |      $4.40 |    $0.0028 | 128K    | reasoning, tools                  |\n| zai/glm-5-turbo             |     $1.20 |      $4.00 |    $0.0026 | 200K    | tools                             |\n| google/gemini-2.5-pro       |     $1.25 |     $10.00 |    $0.0056 | 1M      | reasoning, vision, tools          |\n| openai/gpt-5.2              |     $1.75 |     $14.00 |    $0.0079 | 400K    | reasoning, vision, agentic, tools |\n| openai/gpt-5.3              |     $1.75 |     $14.00 |    $0.0079 | 128K    | reasoning, vision, agentic, tools |\n| openai/gpt-5.3-codex        |     $1.75 |     $14.00 |    $0.0079 | 400K    | agentic, tools                    |\n| openai/gpt-4.1              |     $2.00 |      $8.00 |    $0.0050 | 128K    | vision, tools                     |\n| openai/o3                   |     $2.00 |      $8.00 |    $0.0050 | 200K    | reasoning, tools                  |\n| google/gemini-3-pro-preview |     $2.00 |     $12.00 |    $0.0070 | 1M      | reasoning, vision, tools          |\n| google/gemini-3.1-pro       |     $2.00 |     $12.00 |    $0.0070 | 1M      | reasoning, vision, tools          |\n| xai/grok-2-vision           |     $2.00 |     $10.00 |    $0.0060 | 131K    | vision, tools                     |\n| openai/gpt-4o               |     $2.50 |     $10.00 |    $0.0063 | 128K    | vision, agentic, tools            |\n| openai/gpt-5.4              |     $2.50 |     $15.00 |    $0.0088 | 400K    | reasoning, vision, agentic, tools |\n\n### Premium Models ($0.01+/request)\n\n| Model                       | Input $/M | Output $/M | ~$/request | Context | Features                          |\n| --------------------------- | --------: | ---------: | ---------: | ------- | --------------------------------- |\n| anthropic/claude-sonnet-4.6 |     $3.00 |     $15.00 |    $0.0090 | 200K    | reasoning, vision, agentic, tools |\n| xai/grok-3                  |     $3.00 |     $15.00 |    $0.0090 | 131K    | reasoning, tools                  |\n| anthropic/claude-opus-4.6   |     $5.00 |     $25.00 |    $0.0150 | 200K    | reasoning, vision, agentic, tools |\n| openai/o1                   |    $15.00 |     $60.00 |    $0.0375 | 200K    | reasoning, tools                  |\n| openai/gpt-5.2-pro          |    $21.00 |    $168.00 |    $0.0945 | 400K    | reasoning, tools                  |\n| openai/gpt-5.4-pro          |    $30.00 |    $180.00 |    $0.1050 | 400K    | reasoning, tools                  |\n\n\u003e **Free tier:** 11 models cost nothing — `/model free` points to nemotron-ultra-253b, or pick any free model directly (e.g., `/model nemotron`, `/model deepseek-free`, `/model devstral`).\n\u003e **Best value:** `gpt-5-nano` and `gemini-2.5-flash-lite` deliver strong results at ~$0.0003/request.\n\n---\n\n## Payment\n\nNo account. No API key. **Payment IS authentication** via [x402](https://x402.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/wallet              # Check balance and address (both chains)\n/wallet export       # Export mnemonic + keys for backup\n/wallet recover      # Restore wallet from mnemonic on a new machine\n/wallet solana       # Switch to Solana USDC payments\n/wallet base         # Switch back to Base (EVM) USDC payments\n/chain solana        # Alias for /wallet solana\n/stats               # View usage and savings\n/stats clear         # Reset usage statistics\n/exclude             # Show excluded models\n/exclude add \u003cmodel\u003e # Block a model from routing (aliases work: \"grok-4\", \"free\")\n/exclude remove \u003cmodel\u003e # Unblock a model\n/exclude 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/CEX:** Withdraw USDC to either network\n- **Credit card:** Reach out to [@bc1max on Telegram](https://t.me/bc1max)\n\n---\n\n## Screenshots\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\" align=\"center\"\u003e\n\u003cstrong\u003eSmart Routing in Action\u003c/strong\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"docs/clawrouter-savings.png\" alt=\"ClawRouter savings\" width=\"400\"\u003e\n\u003c/td\u003e\n\u003ctd width=\"50%\" align=\"center\"\u003e\n\u003cstrong\u003eTelegram Integration\u003c/strong\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"assets/telegram-demo.png\" alt=\"Telegram demo\" width=\"400\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\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://api.mainnet-beta.solana.com` | Solana RPC endpoint     |\n\n**Full reference:** [docs/configuration.md](docs/configuration.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/exclude add nvidia/gpt-oss-120b   # Block the free model\n/exclude add grok-4                # Aliases work — blocks all grok-4 variants\n/exclude add gpt-5.4               # Skip expensive models\n/exclude                           # Show current exclusions\n/exclude remove grok-4             # Unblock a model\n/exclude clear                     # Remove all exclusions\n```\n\nExclusions persist across restarts (`~/.openclaw/blockrun/exclude-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/clawrouter 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/clawrouter doctor opus\n```\n\n**Ask a specific question:**\n\n```bash\nnpx @blockrun/clawrouter doctor \"why is my request failing?\"\nnpx @blockrun/clawrouter doctor opus \"深度分析我的配置\"\n```\n\n**Cost:** Sonnet ~$0.003 (default) | Opus ~$0.01\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/BlockRunAI/ClawRouter.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/vickyfu9/30min](https://calendly.com/vickyfu9/30min) |\n| 💬 Community Telegram | [t.me/blockrunAI](https://t.me/blockrunAI)                         |\n| 🐦 X / Twitter        | [x.com/blockrunai](https://x.com/blockrunai)                       |\n| 📱 Founder Telegram   | [@bc1max](https://t.me/bc1max)                                     |\n| ✉️ Email              | vicky@blockrun.ai                                                  |\n\n---\n\n## From the BlockRun Ecosystem\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\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://blockrun.ai/ClawRouter-update | bash`\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🤖 [BRCC](https://github.com/BlockRunAI/brcc)\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://blockrun.ai/brcc-install | bash`\n\n[![GitHub](https://img.shields.io/github/stars/BlockRunAI/brcc?style=flat-square)](https://github.com/BlockRunAI/brcc)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## More Resources\n\n| Resource                                               | Description              |\n| ------------------------------------------------------ | ------------------------ |\n| [Documentation](https://blockrun.ai/docs)              | Full docs                |\n| [Model Pricing](https://blockrun.ai/models)            | All models \u0026 prices      |\n| [Image Generation \u0026 Editing](docs/image-generation.md) | API examples, 5 models   |\n| [Routing Profiles](docs/routing-profiles.md)           | ECO/AUTO/PREMIUM details |\n| [Architecture](docs/architecture.md)                   | Technical deep dive      |\n| [Configuration](docs/configuration.md)                 | Environment variables    |\n| [Troubleshooting](docs/troubleshooting.md)             | Common issues            |\n\n### Blog\n\n| Article                                                                                            | Topic                                                   |\n| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |\n| [11 Free AI Models, Zero Cost](docs/11-free-ai-models-zero-cost-blockrun.md)                       | How BlockRun gives developers top-tier LLMs for nothing |\n| [ClawRouter Cuts LLM API Costs 500×](docs/clawrouter-cuts-llm-api-costs-500x.md)                   | Deep dive into cost savings                             |\n| [ClawRouter vs OpenRouter](docs/clawrouter-vs-openrouter-llm-routing-comparison.md)                | Head-to-head comparison                                 |\n| [Smart LLM Router: 14-Dimension Classifier](docs/smart-llm-router-14-dimension-classifier.md)      | How the routing engine works                            |\n| [LLM Router Benchmark: 46 Models, Sub-1ms](docs/llm-router-benchmark-46-models-sub-1ms-routing.md) | Performance benchmarks                                  |\n| [Anthropic Cost Savings](docs/anthropic-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/M for Claude Opus, representing 92% savings. Actual savings depend on your workload — simple queries are routed to free models ($0/request), 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://localhost:8402`. This includes continue.dev, Cursor, VS Code extensions, ElizaOS, and custom agents. It also integrates as a plugin with [OpenClaw](https://openclaw.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 11 models (DeepSeek V3.2, Nemotron Ultra 253B, Mistral Large 675B, Llama 4 Maverick, and more) are completely free. Use `/model free` for Nemotron Ultra 253B, or pick any free model by name.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**MIT License** · [BlockRun](https://blockrun.ai) — Agent-native AI infrastructure\n\n⭐ If ClawRouter powers your agents, consider starring the repo!\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockrunai%2Fclawrouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockrunai%2Fclawrouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockrunai%2Fclawrouter/lists"}