BlockRunAI/ClawRouterPublic

The agent-native LLM router for autonomous agents. Every frontier model behind one wallet, <1ms local routing, USDC payments on Base & Solana via x402.

AI summary: LLM router explicitly built for autonomous AI agents using crypto authentication.

Stars
6.6K
+-2 today
Forks
652
Watchers
69
Open issues
0
Open PRs
0
Contributors
~31
Commits
1.1K
Branches
15

TypeScriptMITCreated Feb 3, 2026Last push 1d agoLatest release v0.12.280+1 stars this week+35 this month

Quick answers

What is ClawRouter?
LLM router explicitly built for autonomous AI agents using crypto authentication.
What does ClawRouter do?
ClawRouter is an open-source, smart LLM router designed specifically for autonomous AI agents rather than human developers. Recognizing that agents cannot sign up for accounts or enter credit cards, ClawRouter uses wallet signatures for authentication and the x402 protocol for USDC micropayments. It analyzes requests across 15 dimensions to route to the cheapest capable model in under 1ms entirely locally. This provides agent-native access to 66 models without API keys, empowering developers to build self-funding AI agents. It natively supports the standard OpenAI chat completions endpoint format for maximum client compatibility.
Who is ClawRouter for?
AI engineers, crypto developers, and teams building autonomous AI agents that require programmatic, keyless access to language models. Requires basic knowledge of crypto wallets.
How do I get started with ClawRouter?
Clone the repository and follow the setup instructions to run the local router.
How popular is ClawRouter on GitHub?
BlockRunAI/ClawRouter has 6,613 stars and 652 forks on GitHub, and gained 1 stars in the last 7 days.
What license does ClawRouter use?
BlockRunAI/ClawRouter is released under the MIT license.

Star history

since Jul 28, 2026
02K4K6KJul 2026Aug 2026Sep 2026Oct 2026
6.6K stars as of Oct 3, 2026. Measured daily since Jul 28, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
SepOctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-09-27: 0 commits2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 1 commit2026-02-07: 0 commits2026-02-08: 1 commit2026-02-09: 1 commit2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 1 commit2026-02-14: 1 commit2026-02-15: 1 commit2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 2 commits2026-02-19: 3 commits2026-02-20: 1 commit2026-02-21: 7 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 15 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 1 commit2026-03-02: 2 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 2 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 2 commits2026-03-15: 0 commits2026-03-16: 2 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 1 commit2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 1 commit2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 1 commit2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 1 commit2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 1 commit2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 2 commits2026-04-24: 2 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 1 commit2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 1 commit2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 1 commit2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 1 commit2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 1 commit2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 1 commit2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 1 commit2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 1 commit2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 1 commit2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 1 commit2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 2 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 1 commit2026-07-15: 1 commit2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 1 commit2026-07-19: 0 commits2026-07-20: 1 commit2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 1 commit2026-07-26: 1 commit2026-07-27: 3 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 1 commit2026-08-03: 1 commit2026-08-04: 0 commits2026-08-05: 1 commit2026-08-06: 0 commits2026-08-07: 1 commit2026-08-08: 1 commit2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 1 commit2026-08-21: 2 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 1 commit2026-08-30: 4 commits2026-08-31: 3 commits2026-09-01: 6 commits2026-09-02: 11 commits2026-09-03: 7 commits2026-09-04: 1 commit2026-09-05: 26 commits2026-09-06: 5 commits2026-09-07: 3 commits2026-09-08: 0 commits2026-09-09: 2 commits2026-09-10: 5 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 2 commits2026-09-16: 1 commit2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits
158 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Actively maintained

    Pushed within 48 hours

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What ClawRouter does

ClawRouter is an open-source, smart LLM router designed specifically for autonomous AI agents rather than human developers. Recognizing that agents cannot sign up for accounts or enter credit cards, ClawRouter uses wallet signatures for authentication and the x402 protocol for USDC micropayments. It analyzes requests across 15 dimensions to route to the cheapest capable model in under 1ms entirely locally. This provides agent-native access to 66 models without API keys, empowering developers to build self-funding AI agents. It natively supports the standard OpenAI chat completions endpoint format for maximum client compatibility.

AI engineers, crypto developers, and teams building autonomous AI agents that require programmatic, keyless access to language models. Requires basic knowledge of crypto wallets.

  • Agent-Native Authentication: Uses cryptographic wallet signatures instead of traditional API keys or email signups.
  • Crypto Micropayments: Facilitates pay-as-you-go model access via USDC transactions using the x402 protocol.
  • Local Intelligent Routing: Evaluates prompts against 15 dimensions locally to select the optimal model in under 1ms.
  • Multi-Provider Access: Provides unified access to 66 models from providers like OpenAI, Anthropic, Google, and xAI.
  • Free Starting Tier: Offers 8 NVIDIA models completely free of charge to bootstrap agent operations.

Where teams use it

Autonomous Agent Funding

Developers deploy independent AI agents that fund their own API calls using integrated crypto wallets.

Cost-Optimized Inference

Automated workflows rely on the router to dynamically select cheaper models for simple tasks and premium models for complex reasoning.

Keyless API Access

Hackathon participants spin up AI projects instantly without managing API keys or sharing credit card details.

Multi-Model Fallbacks

Production systems ensure uptime by automatically failing over across 66 different models if one provider goes down.

Getting started: Clone the repository and follow the setup instructions to run the local router.

README

main branch
ClawRouter Banner

The LLM router built for autonomous agents

Agents can't sign up for accounts. Agents can't enter credit cards.
Agents can only sign transactions.

ClawRouter is the only LLM router that lets agents operate independently.

Pay however you like: credit card — sign up at user.blockrun.ai, top up, mint an API key
or USDC on Solana or Base (x402 wallet, no account at all).
Or neither — 6 models are free, with no signup, no key and no wallet.


6 free models  Agent native  Card or USDC  Local routing  x402 USDC  Open source

npm version npm downloads GitHub stars CI TypeScript License: MIT

USDC Hackathon Winner x402 Protocol Base Network Solana OpenClaw Plugin Telegram

ClawRouter is an open-source smart LLM router that reduces AI API costs by up to 84%. It analyzes each request across 15 dimensions and routes to the cheapest capable model in under 1ms, entirely locally. It is the only LLM router that an autonomous agent can pay for by itself — a wallet signature is the account, and USDC micropayments over the x402 protocol are the billing — and it takes an ordinary credit card too: sign up at user.blockrun.ai, top up, and run the same router on an API key. 82 models from OpenAI, Anthropic, Google, xAI, DeepSeek, and more. MIT licensed.


What BlockRun is

BlockRun lets agents pay for the outcome — every LLM, tool and data source, best value per dollar.

Not a seat, not a subscription, not a monthly minimum you keep paying while the agent idles. An agent asks for one thing — an answer, an image, a transcript, a price, a call placed — and pays for that one thing at the moment it happens. Nothing to sign up for, nothing to cancel.

Every LLM 82 chat models across 9 providers, behind one endpoint and one balance
Every tool 12 image models, 8 video models, music, 5 voices, img2img editing, and outbound phone calls that come back as transcripts
Every data source web, news and neural search; prediction markets; live crypto and equity quotes; on-chain SQL over 100M+ labeled wallets; DEX routing; RPC across 40 chains
Best value per dollar 15-dimension local routing sends each request to the cheapest model that can actually do it — 84% below pinning Claude Opus 5 on the same traffic, computed from a published workload mix rather than estimated

ClawRouter is how an agent reaches it. BlockRun is the gateway and the billing; ClawRouter is the MIT-licensed router that runs on your machine, decides which model each request deserves, and settles the bill — a wallet signature in USDC, or a credit-card-funded API key. The rest of this README is about ClawRouter.


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:

  • Starts at $0 — 6 open-weight models are free forever (incl. a 1M-context reasoner and two sub-second coders). Image turns route to paid models — see the free-tier note below.
  • No accounts needed — a wallet is generated locally, no signup
  • No API keys needed — your wallet signature IS authentication
  • No model selection — 15-dimension scoring + constraint-first ranking (router-core) picks the right model automatically
  • No credit card needed — 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.

…and if you are a human, not an agent

Every "no X needed" above is a capability, not a restriction. ClawRouter takes a credit card too. Sign up at user.blockrun.ai, top up, mint an API key, and run clawrouter login brk_live_…. Same router, same 82 models, same local routing — calls go to api.blockrun.ai on a bearer token and bill your account credit. No crypto, no gas, no seed phrase.

You are Pay with Setup
Just trying it Nothing Install and pin a free model
A person Credit card → account credit Sign up at user.blockrun.ai → clawrouter login brk_live_…
An autonomous agent USDC on Solana or Base, per request Nothing — a wallet is generated on first run (Solana by default)

Full walkthrough: Paying with a credit card.


How it compares

OpenRouter LiteLLM Martian Portkey ClawRouter
Models 200+ 100+ Smart routing Gateway 82
Free tier Rate-limited BYO keys No No 6 models, no signup
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 or API key
Payment Credit card BYO keys Credit card $49-499/mo USDC per-request or card credit
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

No wallet? 6 models work free out of the box. Install, run, and pin free/nemotron-3.5-lightning (or any of the 6) — no crypto, no signup, no balance required. Add a credit card or USDC later when you want paid models.

Two ways to pay for the paid ones — pick one, the rest of ClawRouter is identical:

Wallet (default) API key
Who it is for Autonomous agents, and anyone happy holding USDC People who would rather pay with a card
Setup Nothing — a wallet is generated on first run Sign up at user.blockrun.ai, top up, mint a key, clawrouter login brk_live_…
Auth An x402 signature per request Authorization: Bearer brk_live_…
Gateway sol.blockrun.ai (Solana, default) / blockrun.ai (Base) api.blockrun.ai
Billing USDC leaves your wallet per call, non-custodial Card-funded account credit, drawn down at exact usage
Fees $0.001/tx settlement fee (covers on-chain gas) 5.5% + $0.30 on the top-up, then list price with nothing per call

ClawRouter prefers the API key whenever one is configured, so clawrouter login is all it takes to switch and clawrouter logout is all it takes to switch back.

Where do I sign up? user.blockrun.ai — sign in with Google, add credit with a card under Credits, mint a key under API Keys. That one key covers all 82 chat models plus images, video, speech and the live-data APIs. No wallet, no crypto, no seed phrase.

Desktop control plane (macOS)

The Electron app in apps/desktop provides one-click connections for OpenClaw, Codex, Hermes, DeepSeek Harness, and Pi, plus model pricing/context, wallet balances, Solana/Base switching, and Coinbase Onramp. It snapshots each agent's existing config before changing it and restores the original bytes when you disconnect. Wallets are shared through ~/.blockrun; older ClawRouter wallets are copied there automatically without overwriting existing Core files.

Option A — OpenClaw Agent

OpenClaw is an AI coding agent. If you're using it, ClawRouter installs as a plugin. Two paths:

A1. Recommended — one-shot install script:

curl -fsSL https://blockrun.ai/ClawRouter-update | bash
openclaw gateway restart

This handles everything: registration, models config, auth profile, wallet setup. Smart routing (blockrun/auto) is now your default model.

OpenClaw now also bundles an unrelated plugin named clawrouter (@openclaw/clawrouter). BlockRun uses the distinct plugin id blockrun-clawrouter; the installer preserves the official plugin and allows both products to coexist.

A2. If you prefer pure npm:

npm install -g @blockrun/clawrouter
clawrouter setup            # finishes OpenClaw integration — REQUIRED
openclaw gateway restart

⚠️ 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: /models in your bot shows only OpenClaw's defaults instead of the 55 BlockRun models. Run clawrouter setup to repair, or use path A1 to begin with.

Option B — Standalone (continue.dev, Cursor, VS Code, any OpenAI-compatible client)

Using Claude Code? Check out BRCC — it's purpose-built for Claude Code with the same smart routing and x402 payments.

Using NousResearch Hermes? See ClawRouter-Hermes — a Python plugin that wires Hermes into the ClawRouter proxy. Same wallet, same 82 models, same x402 USDC settlement on Solana & Base.

No OpenClaw required. ClawRouter runs as a local proxy on port 8402.

1. Start the proxy

npx @blockrun/clawrouter

2. Fund your wallet — optional, skip for free tier Your wallet address is printed on first run. For paid models, send a few USDC on Solana (the default chain) or Base — $5 covers thousands of requests. Prefer a card? Sign up at user.blockrun.ai and run clawrouter login brk_live_… instead. To stay at $0, pin any of the 6 free models (e.g. free/nemotron-3.5-lightning) or use /model free inside OpenClaw.

3. Point your client at http://localhost:8402

continue.dev — ~/.continue/config.yaml

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.

models:
  - name: ClawRouter Auto
    provider: openai
    model: blockrun/auto
    apiBase: http://localhost:8402/v1/
    apiKey: x402
    roles:
      - chat
      - edit
      - apply

To pin a specific model, replace blockrun/auto with any model from blockrun.ai/models, e.g. anthropic/claude-opus-5, xai/grok-4.5.

Both provider: openai and provider: clawrouter work — just make sure apiBase ends with /v1/.

Legacy JSON format (~/.continue/config.json)
{
  "models": [
    {
      "title": "ClawRouter Auto",
      "provider": "openai",
      "model": "blockrun/auto",
      "apiBase": "http://localhost:8402/v1/",
      "apiKey": "x402"
    }
  ]
}
Cursor — Settings → Models → OpenAI-compatible

Set base URL to http://localhost:8402, API key to x402, model to blockrun/auto.

Any OpenAI SDK
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8402", api_key="x402")
response = client.chat.completions.create(model="blockrun/auto", messages=[...])

Routing Profiles

Choose your routing strategy with /model <profile>:

Profile Strategy Savings Best For
/model free Free NVIDIA models 100% $0 balance, learning
/model auto Balanced (default) 84% General use
/model eco Cheapest possible 98% 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.

Routing decisions come from @blockrun/router-core — Router Core V3.5, the constraint-first portfolio router shared by every BlockRun product (ClawRouter, Franklin, the @blockrun/llm SDKs, ClawRouter-Hermes). ClawRouter inlines it at build time, pinned to an exact commit, and injects its live model catalog at startup.

Request → 15-dimension scorer → tier + task shape
        → hard filters (tools · vision · context · max-output · structured output)
        → rank survivors (quality · capability · cost · speed · reliability)
        → winner + ordered fallback chain → Response
  1. Classify — a 15-dimension weighted scorer picks a tier (SIMPLE / MEDIUM / COMPLEX / REASONING); a task classifier labels the shape of the work (code_agent, tool_agent, reasoning_math, long_context, vision, …). Turns that actually need their tools switch to agent-tuned tiers automatically.
  2. Filter — every model that cannot satisfy the request is dropped before anything is scored. A model that can't call tools, can't read the image, or can't hold the conversation never gets to win on price.
  3. Rank — survivors are scored on task quality, capability, estimated cost, speed and reliability, with per-profile weights (eco leans on cost, premium on quality and reliability).
  4. Recover — the whole ranked list rides along as the fallback chain, so a provider timeout or 5xx costs a retry, not the task.
Tier ECO Model AUTO Model PREMIUM Model AGENTIC Model ‡
SIMPLE nemotron-3.5-lightning (FREE) gemini-2.5-flash ($0.30/$2.50) gemini-3.5-flash ($1.50/$9) gpt-4o-mini ($0.15/$0.60)
MEDIUM glm-5.3-flash ($0.15/$0.50) gemini-3.5-flash ($1.50/$9) gpt-5.3-codex ($1.75/$14.00) gpt-5-mini ($0.25/$2)
COMPLEX glm-5.3-flash ($0.15/$0.50) gemini-3.1-pro ($2/$12) claude-fable-5 ($10/$50) claude-sonnet-5 ($3/$15)
REASONING deepseek-reasoner ($0.14/$0.28) deepseek-reasoner ($0.14/$0.28) claude-sonnet-5 ($3/$15) claude-sonnet-5 ($3/$15)

† Withheld from /v1/models — since Router Core V3.5 no chain names such a model: every primary and every fallback rung above is a model you can find on the public pricing page. savings-mix.json prices the published savings claim on the same visible models. ‡ Auto-selected in any profile when the turn actually needs its attached tools; prefers models that keep going instead of stopping to ask.

These are the curated primaries; every tier carries a benchmark-ordered fallback chain — full chains and per-profile ranking weights in docs/routing-profiles.md. On router-core's frozen three-arm agent benchmark (τ-bench, BrowseComp, Terminal-Bench) the V3.4 policy (the last one benchmarked; V3.5 is a catalog refresh on the same scorer and weights) completed 57% of tasks vs 49% for the previous rules router, at 6.4% lower cost per successful task — and spent 8.9% of the tokens a pinned flagship would have.

84% cheaper than pinning Claude Opus 5 for the same traffic, on auto; 98% on eco.

Not an "up to" figure. The baseline, the workload mix and the token ratio are published in savings-mix.json, priced against the live catalog, so anyone can recompute it and get the same answer. Models withheld from /v1/models are excluded from the mix — pricing a public claim on a model you cannot look up is not defensible — which makes the number conservative.

Rollback lever: routing.strategy: "rules" restores the V2 primary-first selector; routing.shadow compares both locally without a second paid call.


Image Generation

Generate images directly from chat with /cr-imagegen:

/cr-imagegen a dog dancing on the beach
/cr-imagegen --model gpt-image-2 a futuristic city at sunset
/cr-imagegen --model banana-pro --size 2048x2048 mountain landscape

The slash command is /cr-imagegen to avoid colliding with Telegram channel commands. Typing /imagegen in chat still works for backward compatibility.

Model Provider Price Max Size
nano-banana Google Gemini Flash $0.05/image 1024x1024
banana-2 Google Nano Banana 2 $0.09/image 1024x1024
banana-pro Google Gemini Pro $0.10/image 4096x4096
gpt-image OpenAI GPT Image 1 $0.02/image 1536x1024
gpt-image-2 OpenAI GPT Image 2 $0.06/image 1536x1024
flare OpenAI GPT Image 2.5 Flare $0.28/image 1536x1024
sunburst OpenAI GPT Image 2.5 Sunburst $0.28/image 1536x1024
seedream ByteDance Seedream 5 $0.045/image 2848x1600
xai/grok-imagine-image xAI Grok Imagine $0.02/image 1024x1024
grok-imagine-2 xAI Grok Imagine 2.0 $0.04/image 1024x1024
xai/grok-imagine-image-pro xAI Grok Imagine Pro $0.07/image 1024x1024
zai/cogview-4 Zhipu CogView-4 $0.015/image 1440x1440

Video Generation

Generate short AI videos directly from chat with /videogen:

/videogen a red apple slowly spinning
/videogen --model seedance-2-fast --duration=5 a cat waving
/videogen --model grok-video a neon city at night

Or drive it over HTTP — ClawRouter proxies the BlockRun gateway, handles x402 payment, and downloads the returned MP4 to local disk, rewriting url to http://localhost:8402/videos/<file>.mp4 so the asset survives past the upstream's temporary bucket.

curl -X POST http://localhost:8402/v1/videos/generations \
  -H "Content-Type: application/json" \
  -d '{"model":"bytedance/seedance-2.0-fast","prompt":"a red apple slowly spinning","duration_seconds":5}'
Model Provider 5s text-to-video 5s image-to-video Duration
bytedance/seedance-1.5-pro ByteDance Seedance ~$0.46 ~$0.46 (flat) 5s default, up to 10s
bytedance/seedance-2.0-fast ByteDance Seedance ~$1.19 ~$1.19 (flat) 5s default, up to 10s
bytedance/seedance-2.0 ByteDance Seedance ~$1.49 ~$1.49 (flat) 5s default, up to 10s
azure/sora-2 OpenAI Sora (Azure) ~$0.42 (4s) ~$0.42 (4s, flat) 4s default; 4/8/12s
xai/grok-imagine-video xAI Grok Imagine ~$0.42 (8s) n/a 8s default

Seedance is token-priced upstream at ~20,256 tokens/sec — the blockrun videos route now defaults Seedance to resolution=720p with generate_audio=true for text-to-video (2× the per-second token count of the older 480p baseline; audio is included in that rate). The quote is duration × tokens/sec × $/1M tokens × 1.05 margin. Image-to-video is priced the same as text-to-video (the earlier ~40% i2v discount was removed upstream on 2026-06-01; only video-to-video remains cheaper). Sora 2 is flat-priced at $0.10/sec for both t2v and i2v — note it rejects human faces in reference images (use Seedance + RealFace for real people). Calls block for 30–120s while the upstream polls the job. Seedance 2.0 Fast typically returns in 60–80s; 2.0 Pro trades latency for quality.

BytePlus RealFace (Seedance 2.0 only)

For real-person character consistency across frames, pass real_face_asset_id (format ta_xxxxxxxx) on 2.0 Fast or 2.0 Pro. Asset IDs come from token360's Asset UI after H5 face verification — see blockrun's /docs/video/real-person-ip for the enrollment walkthrough. Cannot be combined with image_url (both seed the first frame — pick one). Pricing is unchanged.

curl -X POST http://localhost:8402/v1/videos/generations \
  -H "Content-Type: application/json" \
  -d '{"model":"bytedance/seedance-2.0","prompt":"the person walks through a forest","real_face_asset_id":"ta_abc123def","duration_seconds":5}'

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 gpt-image-1 (default), gpt-image-2, sunburst, nano-banana, banana-2, banana-pro — --mask is OpenAI-only
--size <WxH> No Output size (default: 1024x1024)

API endpoint: POST http://localhost:8402/v1/images/image2image — see full docs.

Phone & Voice Calls

Verify 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.

/cr-call +14155552671 "Hi, this is calling to confirm tomorrow's 3pm meeting"
/cr-call +14155552671 "Order a large pepperoni for delivery" --voice josh --max-duration 10

Calls 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 /v1/voice/call/{call_id} (or clawrouter share/transcripts dashboard) to retrieve the transcript and recording when status is completed.

Operation Provider Price
Phone lookup (carrier, line type) Twilio $0.01
Fraud check (SIM-swap, fwd) Twilio $0.05
Buy phone number (30-day lease) Twilio $5.00
Renew lease (+30 days) Twilio $5.00
List wallet's owned numbers Twilio $0.001
Release a number Twilio free
AI voice call (≤30 min) Bland.ai $0.54 flat per call
Poll call status / transcript Bland.ai free

CLI for wallet-owned numbers:

clawrouter phone numbers list                              # See active numbers + expiry
clawrouter phone numbers buy US --area-code 415            # Provision a SF number
clawrouter phone numbers renew +14155551234                # Extend 30 days
clawrouter phone numbers release +14155551234              # Release
clawrouter phone lookup +14155552671                       # Carrier + line type
clawrouter phone fraud +14155552671                        # SIM-swap + fwd signals

HTTP API:

# Place a call
curl -X POST http://localhost:8402/v1/voice/call \
  -H "Content-Type: application/json" \
  -d '{"to":"+14155552671","task":"Confirm the 3pm Thursday meeting.","max_duration":5}'
# → { "call_id": "call_abc123", "poll_url": "/v1/voice/call/call_abc123", "status": "queued" }

# Poll for transcript
curl http://localhost:8402/v1/voice/call/call_abc123

LLM agents discover all eight operations as blockrun_phone_* / blockrun_voice_* tools (see /partners).

⚠️ blockrun_voice_call and /cr-call place a real outbound phone call. Server enforces an emergency-number blocklist; choose --from from wallet-owned numbers via phone numbers list.


Crypto Data (Surf)

Surf is BlockRun's unified crypto data API — 84 endpoints across 13 domains: CEX/DEX markets, on-chain SQL over 80+ ClickHouse tables (Ethereum, Base, Arbitrum, BSC, TRON, HyperEVM, Tempo), 100M+ labeled wallets, prediction markets (Polymarket + Kalshi), social/CT mindshare, news, project/DeFi metrics, token analytics, unified search, VC fund intelligence. The killer feature is ad-hoc POST /surf/onchain/sql — agents query the warehouse directly without running an indexer.

ClawRouter ships Surf as a skill, not as typed wrappers. The proxy whitelists /v1/surf/* so any call through the local proxy is paid x402 from the same wallet; the agent reads skills/surf/SKILL.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.

Flat per-call pricing — every Surf endpoint costs the same. The old $0.001/$0.005/$0.020 tiers no longer apply; upstream prices all three tiers identically, and the tier now describes only endpoint weight.

Rail Price per call
API key (api.blockrun.ai) $0.0075 (base rate, no tx fee)
Wallet — Solana $0.0075
Wallet — Base $0.0085

Measured 2026-09-05: the API-key rate from the account ledger, the wallet rates from the x402 challenge, which quotes the price before anything is signed. That quote is authoritative for the rail that issued it — the key rail issues no 402, and the wallet quote includes a transaction fee account credit does not pay, so the two are not interchangeable. Solana being cheaper than Base is deliberate (the $0.001 is Base's transaction fee), not drift.

Usage (HTTP):

# Aggregated BTC spot price (Tier 1, $0.001)
curl 'http://localhost:8402/v1/surf/market/price?symbol=BTC'

# Bulk wallet labels over 100M+ labeled wallets (Tier 2, $0.005)
curl 'http://localhost:8402/v1/surf/wallet/labels/batch?addresses=0xabc,0xdef,0x123'

# Ad-hoc on-chain SQL (Tier 3, $0.020)
curl -X POST 'http://localhost:8402/v1/surf/onchain/sql' \
  -H 'content-type: application/json' \
  -d '{"sql":"SELECT count() FROM ethereum.transactions WHERE block_timestamp >= now() - INTERVAL 1 HOUR"}'

No 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/surf/SKILL.md. Upstream marketplace: https://blockrun.ai/marketplace/surf.


Models & Pricing

82 models across 9 providers, one wallet. **6 models are $0 — paid models start at fractions of a cent.**

💡 "Cost per request" = estimated cost for a typical chat message (~500 input + 500 output tokens). Paid requests also carry a flat $0.001/tx settlement fee (covers on-chain gas; already included in the price the gateway quotes). Free models never pay it.

Budget Models (under $0.001/request)

Model Input $/M Output $/M ~$/request Context Features
free/nemotron-3.5-lightning FREE FREE $0 1M reasoning (thinking mode) — the free default
free/laguna-xs-2.1 FREE FREE $0 131K coding (Poolside, ~161 tok/s)
free/north-mini-code FREE FREE $0 256K coding (Cohere, sub-second)
free/nemotron-3-nano-omni-30b-a3b-reasoning FREE FREE $0 256K reasoning (text only — see note)
free/nemotron-3-ultra-550b FREE FREE $0 1M largest free model (550B/55B MoE)
free/llama-3.2-11b-vision FREE FREE $0 128K Meta Llama (text only — see note)
qwen/qwen3.7-flash $0.03 $0.13 $0.0001 1M reasoning, tools (fastest Qwen tier)
openai/gpt-5-nano $0.05 $0.40 $0.0002 128K tools
openai/gpt-5.6-luna-pro $0.10 $0.60 $0.0004 1M reasoning, vision, agentic, tools
openai/gpt-4.1-nano $0.10 $0.40 $0.0003 128K tools
google/gemini-2.5-flash-lite $0.10 $0.40 $0.0003 1M tools
openai/gpt-4o-mini $0.15 $0.60 $0.0004 128K tools
tencent/hy3 $0.132 $0.528 $0.0003 262K reasoning (Tencent Hy3)
xai/grok-4-fast $0.20 $0.50 $0.0004 131K tools
openai/gpt-5.6-luna $0.20 $1.20 $0.0007 1M vision, agentic, tools
xai/grok-4-fast-reasoning $0.20 $0.50 $0.0004 131K reasoning, tools
xai/grok-4-1-fast $0.20 $0.50 $0.0004 131K tools
openai/gpt-5-mini $0.25 $2.00 $0.0011 200K tools
qwen/qwen3.7-plus $0.32 $1.28 $0.0008 1M reasoning, agentic, tools (balanced Qwen)
deepseek/deepseek-chat $0.14 $0.28 $0.0002 1M tools (V4 Flash chat)
deepseek/deepseek-reasoner $0.14 $0.28 $0.0002 1M reasoning, tools (V4 Flash thinking)
deepseek/deepseek-v4-pro $0.435 $0.87 $0.0007 1M reasoning, agentic, tools (V4 flagship)
xiaomi/mimo-v2.5-pro $0.435 $0.87 $0.0007 1M reasoning (Xiaomi MiMo-V2.5 Pro)
zai/glm-5-turbo $1.20 $4.00 $0.0026 200K tools
minimax/minimax-m3 $0.30 $1.20 $0.0008 1M reasoning, agentic, tools
minimax/minimax-m2.7 $0.30 $1.20 $0.0008 205K reasoning, agentic, tools
minimax/minimax-m2.5 $0.30 $1.20 $0.0008 205K reasoning, agentic, tools
google/gemini-2.5-flash $0.30 $2.50 $0.0014 1M vision, tools
google/gemini-3.5-flash-lite $0.30 $2.50 $0.0014 1M reasoning, tools (thinking built-in)
openai/gpt-4.1-mini $0.40 $1.60 $0.0010 128K tools
google/gemini-3-flash-preview $0.50 $3.00 $0.0018 1M vision
moonshot/kimi-k2.5 $0.60 $3.00 $0.0018 262K reasoning, vision, agentic, tools
moonshot/kimi-k2.7 $0.95 $4.00 $0.0025 262K reasoning, vision, agentic, tools

Mid-Range Models ($0.001–$0.01/request)

Model Input $/M Output $/M ~$/request Context Features
anthropic/claude-haiku-4.5 $1.00 $5.00 $0.0030 200K vision, agentic, tools
zai/glm-5 $1.00 $3.20 $0.0021 200K reasoning, tools
openai/gpt-5.6-terra-pro $1.00 $6.00 $0.0035 1M reasoning, vision, agentic, tools
openai/o1-mini $1.10 $4.40 $0.0028 128K reasoning, tools
openai/o3-mini $1.10 $4.40 $0.0028 128K reasoning, tools
openai/o4-mini $1.10 $4.40 $0.0028 128K reasoning, tools
google/gemini-2.5-pro $1.25 $10.00 $0.0056 1M reasoning, vision, tools
zai/glm-5.2 $1.40 $4.40 $0.0029 1M reasoning, coding, tools (flagship)
zai/glm-5.1 $1.40 $4.40 $0.0029 200K reasoning, tools (promo ended 2026-06-05)
qwen/qwen3.7-max $1.475 $4.425 $0.0030 1M reasoning, agentic, tools (Qwen flagship)
xai/grok-4.3 $1.25 $2.50 $0.0019 1M reasoning, vision, agentic, tools
google/gemini-3.8-flash $0.75 $3.75 $0.0023 1M reasoning, vision, tools (newest Flash)
google/gemini-3.6-flash $0.75 $3.75 $0.0023 1M reasoning, vision, tools (thinking mode)
google/gemini-3.5-flash $1.50 $9.00 $0.0053 1M reasoning, vision, tools (thinking)
xai/grok-4.5 $2.00 $6.00 $0.0040 500K reasoning, vision, agentic, tools
xai/grok-build-0.1 $1.00 $2.00 $0.0015 256K agentic coding, tools
openai/gpt-5.2 $1.75 $14.00 $0.0079 400K reasoning, vision, agentic, tools
openai/gpt-5.3 $1.75 $14.00 $0.0079 128K reasoning, vision, agentic, tools
openai/gpt-5.3-codex $1.75 $14.00 $0.0079 400K agentic, tools
openai/gpt-4.1 $2.00 $8.00 $0.0050 128K vision, tools
openai/o3 $2.00 $8.00 $0.0050 200K reasoning, tools
google/gemini-3-pro-preview $2.00 $12.00 $0.0070 1M reasoning, vision, tools
google/gemini-3.1-pro $2.00 $12.00 $0.0070 1M reasoning, vision, tools
xai/grok-2-vision $2.00 $10.00 $0.0060 131K vision, tools
openai/gpt-4o $2.50 $10.00 $0.0063 128K vision, agentic, tools
openai/gpt-5.4 $2.50 $15.00 $0.0088 400K reasoning, vision, agentic, tools
openai/gpt-5.6-terra $2.00 $12.00 $0.0070 1M reasoning, vision, agentic, tools

Premium Models ($0.01+/request)

Model Input $/M Output $/M ~$/request Context Features
anthropic/claude-sonnet-5 $3.00 $15.00 $0.0090 1M reasoning, vision, agentic, tools
anthropic/claude-sonnet-4.6 $3.00 $15.00 $0.0090 200K reasoning, vision, agentic, tools
anthropic/claude-opus-5 $5.00 $25.00 $0.0150 1M reasoning, vision, agentic, tools
anthropic/claude-opus-4.8 $5.00 $25.00 $0.0150 1M reasoning, vision, agentic, tools
openai/gpt-5.6-sol $4.00 $20.00 $0.0120 1M reasoning, vision, agentic, tools
openai/gpt-5.6-sol-pro $4.00 $20.00 $0.0120 1M reasoning, vision, agentic, tools
openai/gpt-5.5 $5.00 $30.00 $0.0175 1M reasoning, vision, agentic, tools
moonshot/kimi-k3 $3.00 $15.00 $0.0110 1M reasoning, vision, agentic, tools
openai/chat-latest $5.00 $30.00 $0.0175 128K vision, tools
openai/o1 $15.00 $60.00 $0.0375 200K reasoning, tools
openai/gpt-5.2-pro $21.00 $168.00 $0.0945 400K reasoning, tools
openai/gpt-5.4-pro $30.00 $180.00 $0.1050 400K reasoning, tools
openai/gpt-5.5-pro $30.00 $180.00 $0.1050 1M reasoning, vision, tools

Free tier: 6 open-weight models cost nothing — /model free pins the free default (nemotron-3.5-lightning, with the other five as fallbacks), /model eco opens on it, or pick one directly (e.g., /model lightning for 1M-context reasoning, /model north-mini or /model laguna for fast coding).

No free vision. Two free models are catalogued as vision-capable and neither reliably is: on a 64×64 solid-colour probe nemotron-3-nano-omni was right 1 of 4 times on Base and answered "white" for red on Solana, and llama-3.2-11b-vision replied "I'm unable to see the image" 3 of 3 while answering text fine. Both return HTTP 200, so a wrong answer arrives with no error to branch on. ClawRouter therefore does not flag them for vision, and requests carrying an image_url route to a paid vision model instead. Best value: gpt-5-nano and gemini-2.5-flash-lite deliver strong results at ~$0.0003/request.


Payment

Two rails. This section covers the wallet one; the card/API-key one is below.

Here, no account and no API key are needed at all — payment IS authentication, via x402.

Request → 402 (price: $0.003) → wallet signs USDC → retry → response

USDC stays in your wallet until spent — non-custodial. Price is visible in the 402 header before signing.

Dual-chain support: Pay with USDC on Solana (the default) or USDC on Base (EVM). Both wallets are derived from a single BIP-39 mnemonic on first run. New installs get Solana; an install that predates the Solana default keeps its Base wallet — its USDC is there — until you switch with /wallet solana.

/wallet              # Check balance and address (both chains)
/wallet export       # Export mnemonic + keys for backup
/wallet recover      # Restore wallet from mnemonic on a new machine
/wallet solana       # Switch to Solana USDC payments
/wallet base         # Switch to Base (EVM) USDC payments
/stats               # View usage and savings
/stats clear         # Reset usage statistics
/exclude             # Show excluded models
/exclude add <model> # Block a model from routing (aliases work: "grok-4", "free")
/exclude remove <model> # Unblock a model
/exclude clear       # Remove all exclusions

Fund your wallet:

  • Solana (default): Send USDC on Solana to your Solana address
  • Base (EVM): Send USDC on Base to your EVM address
  • Coinbase/CEX: Withdraw USDC to either network
  • Credit card: don't fund a wallet at all — sign up at user.blockrun.ai and use an API key instead (below)

Paying with a credit card (API key)

Wallets are what let an agent pay for itself. If you are a person and would rather pay the way you pay for everything else, BlockRun issues API keys backed by card-funded credit — and ClawRouter speaks that too.

1. Sign up and get a key

Go to user.blockrun.ai:

  1. Sign in with Google. That is the whole signup — no invite, no sales call.
  2. Credits → top up with a credit card. The processing fee is 5.5% + $0.30, charged at purchase, not on inference: you pay it once on the top-up and every model then bills at provider list price with no markup, with no per-call minimum and no per-call fee.
  3. API Keys → create a key. It is shown once and looks like brk_live_… — copy it before you leave the page.

2. Tell ClawRouter about it

clawrouter login brk_live_...     # stores it in ~/.blockrun/.api-key (chmod 600)
clawrouter login                  # or run bare and paste at the prompt

Or, for CI and containers where you would rather not write a file:

export BLOCKRUN_API_KEY=brk_live_...

Either way, restart the proxy. That is the whole change — routing, model names, the free tier, /model auto, exclusions and the OpenAI-compatible surface all behave exactly as before:

npx @blockrun/clawrouter
# [ClawRouter] Using BlockRun API key brk_live_Ab3xQ9…f8c1 (from ~/.blockrun/.api-key)
# [ClawRouter] Billing: account credit — top up at https://user.blockrun.ai/dashboard/credits

3. Check it, and switch back whenever

clawrouter status     # names the mode, the gateway, the masked key and your credit
clawrouter doctor     # verifies the key against the gateway (401 = revoked or mistyped)
clawrouter reconcile  # diff your local usage journal against BlockRun's billing ledger
clawrouter logout     # delete the key and go back to paying from the wallet

Checking your bill without opening a dashboard. clawrouter reconcile compares what ClawRouter recorded locally against GET /v1/usage — BlockRun's authoritative ledger — joined on the gateway's own request id:

BlockRun reconciliation — last 7 days

  Gateway charged:  $12.41   (438 settled calls)
  Journal recorded: $12.41
  Matched:          438, of which 0 disagree on amount

Three outcomes are worth acting on. Amount mismatches mean the local price table has drifted from the gateway's. Charged but not in this machine's journal is the one to look at hardest: money left the account for a call this machine did not make — expected if the same key is used on another machine or by another BlockRun product, and worth investigating if not. Exit code 2 in that case, so a scheduled check can alert on it. Rows still pending pricing are excluded from the totals rather than counted as $0.

Your per-call sum will always be less than your card statement by exactly the top-up fees, which are charged at purchase and never appear as ledger rows. That gap is arithmetic, not a discrepancy.

Using it directly, without ClawRouter. The same key works against api.blockrun.ai from any OpenAI or Anthropic SDK — Authorization: Bearer for OpenAI clients, x-api-key for Anthropic ones:

curl https://api.blockrun.ai/v1/chat/completions \
  -H "Authorization: Bearer brk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model": "anthropic/claude-sonnet-5", "messages": [{"role": "user", "content": "hello"}]}'

Running it through ClawRouter is what adds the smart routing, the fallback chains, the response cache and the local spend controls.

What to know

  • The key wins. If a wallet and a key are both present, ClawRouter uses the key. A machine with both means "bill my account", not "keep spending my USDC". clawrouter logout (and unsetting BLOCKRUN_API_KEY) reverses it.
  • No wallet is created. In API-key mode ClawRouter never generates, reads or signs with a private key — clawrouter doctor will not mint one either.
  • Balance lives server-side. There is no local balance to check: a call that outruns your credit comes back as HTTP 402 insufficient_quota, naming the top-up page. Free models stay free and need no credit at all — all 6 are served on the API-key gateway too.
  • One key covers nearly everything. Verified live against api.blockrun.ai on 2026-09-05: chat completions (/v1/chat/completions), the Anthropic-shaped /v1/messages, /v1/models, image generation, speech, video, and the partner APIs — Surf crypto data, Exa search, prediction markets, and phone lookup and fraud checks.
  • The wallet-only exceptions are the routes that bind a lease or a position to a payer address, because there is no address to bind to without a wallet: buying, renewing, listing and releasing phone numbers (the gateway answers those with a raw 402 on a key), and Polymarket trading, which ClawRouter signs locally with the wallet key. Phone lookups, fraud checks and outbound voice calls are fine on a key; only owning a number is not.
  • maxCostPerRun and /exclude still apply, along with the router's own budget filter — they live in the router, not the signer. clawrouter policy limits do not: they are enforced in the x402 pre-sign hook, and nothing is signed here. Your account balance is the cap instead, and ClawRouter warns at startup if you have one of those limits configured.

Screenshots

Smart Routing in Action

ClawRouter savings
Telegram Integration

Telegram demo

Configuration

For basic usage, no configuration needed. For advanced options:

Variable Default Description
BLOCKRUN_API_KEY unset BlockRun API key (brk_live_…). Set it and ClawRouter pays from account credit via api.blockrun.ai instead of the wallet
BLOCKRUN_WALLET_KEY auto-generated Your wallet private key
BLOCKRUN_PROXY_PORT 8402 Local proxy port
CLAWROUTER_DISABLED false Disable smart routing
CLAWROUTER_DEBUG_HEADERS on Set to off to suppress x-clawrouter-* debug response headers
CLAWROUTER_SOLANA_RPC_URL https://api.mainnet-beta.solana.com Solana RPC endpoint — balance checks and payment signing

Full reference: docs/configuration.md

Model Exclusion

Block specific models from being routed to. Useful if a model doesn't follow your agent instructions or you want to control costs.

/exclude add free/nemotron-3.5-lightning   # Block a free model (e.g. not for your workload)
/exclude add grok-4                # Aliases work — blocks all grok-4 variants
/exclude add gpt-5.4               # Skip expensive models
/exclude                           # Show current exclusions
/exclude remove grok-4             # Unblock a model
/exclude clear                     # Remove all exclusions

Exclusions 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.


Troubleshooting

When things go wrong, run the doctor:

npx @blockrun/clawrouter doctor

This collects diagnostics and sends them to Claude Sonnet for AI-powered analysis:

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

148 total
  1. ### Solana signing runs on `@solana/kit` 8.4 — for +2.3% bundle, not +26% `@solana/kit` 5.5.1 → 8.4.0, and `@x402/svm`'s program clients are forced onto the kit-8 line (`@solana-program/token` / `token-2022` 0.16.1, `compute-budget` 0.18.1) because `@x402/svm` itself still pins the kit-5 ones (x402-foundation/x402#3391). This takes the upstream `content-length` fix ([#358](https://github.com/BlockRunAI/ClawRouter/pull/358), closes [#378](https://github.com/BlockRunAI/ClawRouter/issues/378)). The bump had been on hold because it grew `dist/cli.js` from 8.0 to 10.1 MB. That was never kit 8's cost. All 24 copies of `@solana/errors` in the tree were the same version: npm 10 nested a private copy under every dependent once `overrides` touched the tree, kept that placement on every later install, and crashed on a fresh resolve. Re-resolving only the Solana lock entries with npm 11 hoists one shared copy; CI's npm 10 `npm ci` reproduces it. `dist/cli.js` is now 8,585,853 bytes (+2.3%) with one copy of every `@solana/*` package. Nothing else in the lock moves — `@x402/svm` stays 2.21.0. - **Signing is byte-identical.** `@x402/svm`'s real `ExactSvmScheme` and `ExactSvmSchemeV1`, drive

  2. ### Desktop — visual refresh of the control plane The sidebar is grouped into Control / Account with the wallet card anchored to the bottom of the rail; the hero is data-driven (connected agents, model count, settlement chain); the model catalog carries tinted capability chips (Reasoning / Vision / Agentic / Tools); Usage renders a live daily chart from the router's `/stats` with axis, gridlines and per-day tooltips; Settings gains a theme picker and copyable local endpoints; Wallet shows the official Base and Solana marks with copyable addresses; the funding dialog has Buy / Deposit tabs, and Deposit exposes both wallet addresses. Three numbers on the refreshed screens were corrected before landing ([#367](https://github.com/BlockRunAI/ClawRouter/pull/367)): - **The hero counted alias rows as models.** `/v1/models` deliberately emits a row per shorthand, so the hero and routing map advertised the raw length while the Models page next to them collapsed the same array. Both now count the collapsed catalog. - **A window with no recent traffic drew a week that never happened.** When every day the router reported was older than the chart cap, the padding snapped to today

  3. ### Removed — TWZRD AutoGate, and the optional dependency behind it `src/twzrd-autogate.ts`, the `twzrd-x402-gate` optionalDependency, the `TWZRD_AUTO_GATE` / `TWZRD_GATE_ENABLED` / `TWZRD_GATE_TIMEOUT_MS` / `TWZRD_FAIL_OPEN` flags and their docs are gone. `clawrouter policy` (SpendControl) is the pre-spend control ClawRouter ships, and the x402 pre-sign path carries no third-party vendor. The evidence for removing it came from the vendor's own follow-up ([#360](https://github.com/BlockRunAI/ClawRouter/pull/360), closed), which verified `0.9.4` against the installed package rather than the docs: **The engine changed under a patch bump.** `0.9.3` ran the full `/v1/intel/preflight` the v0.12.277 notes described. In `0.9.4` the same `createTwzrdBeforePaymentHook` call became a wash-only `GET merchant_card/{payTo}` against a different endpoint, on Solana and Base alike, with a different refusal set — no code change on our side. A dependency that redefines what it does inside `onBeforePaymentCreation` on a patch release cannot sit there. **Our failure config was never honoured.** The package converts a fast lookup failure — `503`, `404`, `fetch failed`, invalid JSON, its own 3s tim

  4. ClawRouter Desktop 0.1.3 Preview — UI refresh and status fixesdesktop-v0.1.3-preview.1Sep 8, 2026pre-release102 downloads

    # ClawRouter Desktop 0.1.3 Preview A refreshed Desktop control panel with clearer wallet, model, and usage views. - Refreshed sidebar, model capability labels, Settings, and Buy/Deposit views. - Live daily usage chart instead of placeholder bars. - Correct pending-restart Agent and wallet status; distinguish API-key payment. - Account credit links open through the approved system-browser path. - Fixed narrow-window hero overflow and operation errors that left controls busy. - Aligned the bundled ClawRouter runtime to 0.12.278. - Includes the existing window-drag styles from Desktop 0.1.2. ## Download macOS Apple Silicon: download the DMG, open it, and drag ClawRouter to Applications. The ZIP contains the same app. Intel Mac and Windows packages are not included in this release; do not use the arm64 Mac package on those platforms. ## macOS preview notice This build is ad-hoc signed, **not Apple Developer ID signed or notarized**. macOS may block the first launch because it cannot verify the developer. If you trust this official download, use System Settings → Privacy & Security → Open Anyway after the blocked launch. Do not disable Gatekeeper or clear quarantine. ## Validatio

  5. ### Added — opt-in TWZRD AutoGate on the x402 pre-sign hook Default **off**. `clawrouter policy` (SpendControl) stays the vendor-neutral path and is untouched by any of this. `TWZRD_AUTO_GATE=1` (or `TWZRD_GATE_ENABLED=true`) composes TWZRD's trust check onto the same `onBeforePaymentCreation` chain, after SpendControl. From [#357](https://github.com/BlockRunAI/ClawRouter/pull/357) by [@twzrd-sol](https://github.com/twzrd-sol), which closes [#355](https://github.com/BlockRunAI/ClawRouter/issues/355) and is deliberately not a re-open of the withdrawn default-on [#218](https://github.com/BlockRunAI/ClawRouter/pull/218). Review changed three things about it before it landed. **A third party must not be able to stop your payments.** The gate's preflight is a synchronous POST to `intel.twzrd.xyz` that sets no timeout of its own, and the package defaults to `failOpen: false` — so an outage there refused _every_ paid Solana call. That is precisely the shape of the v0.12.271 outage, where an unreachable third party turned every Solana payment into a bare `fetch failed` and looked exactly like a gateway fault. The gate is additional cover on top of SpendControl, so we pass `failOpen: tru

Code frequency

additions and deletions
+44.6K-44.6KWeek of 2026-02-01: +1 linesWeek of 2026-02-01: -1 linesWeek of 2026-02-08: +103 linesWeek of 2026-02-08: -29 linesWeek of 2026-02-15: +611 linesWeek of 2026-02-15: -132 linesWeek of 2026-02-22: +6,192 linesWeek of 2026-02-22: -5,699 linesWeek of 2026-03-01: +2,423 linesWeek of 2026-03-01: -2,115 linesWeek of 2026-03-08: +811 linesWeek of 2026-03-08: -1,633 linesWeek of 2026-03-15: +1,805 linesWeek of 2026-03-15: -3,778 linesWeek of 2026-03-22: +24 linesWeek of 2026-03-22: -37 linesWeek of 2026-03-29: +21 linesWeek of 2026-03-29: -3 linesWeek of 2026-04-05: +3 linesWeek of 2026-04-05: -3 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +224 linesWeek of 2026-04-19: -60 linesWeek of 2026-04-26: +1,562 linesWeek of 2026-04-26: -2,021 linesWeek of 2026-05-03: +0 linesWeek of 2026-05-03: -0 linesWeek of 2026-05-10: +0 linesWeek of 2026-05-10: -0 linesWeek of 2026-05-17: +1 linesWeek of 2026-05-17: -1 linesWeek of 2026-05-24: +393 linesWeek of 2026-05-24: -192 linesWeek of 2026-05-31: +0 linesWeek of 2026-05-31: -0 linesWeek of 2026-06-07: +5 linesWeek of 2026-06-07: -5 linesWeek of 2026-06-14: +168 linesWeek of 2026-06-14: -26 linesWeek of 2026-06-21: +225 linesWeek of 2026-06-21: -20 linesWeek of 2026-06-28: +1,716 linesWeek of 2026-06-28: -1,429 linesWeek of 2026-07-05: +2,112 linesWeek of 2026-07-05: -4,443 linesWeek of 2026-07-12: +144 linesWeek of 2026-07-12: -66 linesWeek of 2026-07-19: +503 linesWeek of 2026-07-19: -45 linesWeek of 2026-07-26: +143 linesWeek of 2026-07-26: -53 linesWeek of 2026-08-02: +7,246 linesWeek of 2026-08-02: -3,131 linesWeek of 2026-08-09: +0 linesWeek of 2026-08-09: -0 linesWeek of 2026-08-16: +88 linesWeek of 2026-08-16: -13 linesWeek of 2026-08-23: +2 linesWeek of 2026-08-23: -2 linesWeek of 2026-08-30: +44,633 linesWeek of 2026-08-30: -5,325 linesWeek of 2026-09-06: +10,596 linesWeek of 2026-09-06: -9,881 linesWeek of 2026-09-13: +1,692 linesWeek of 2026-09-13: -313 linesWeek of 2026-09-20: +0 linesWeek of 2026-09-20: -0 linesFeb 1, 2026Sep 20, 2026
+83.4K lines added, -40.5K removed over the last year.

Commits per week

last 52 weeks
580Week of 2025-09-27: 0 commitsWeek of 2025-10-04: 0 commitsWeek of 2025-10-11: 0 commitsWeek of 2025-10-18: 0 commitsWeek of 2025-10-25: 0 commitsWeek of 2025-11-01: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 1 commitsWeek of 2026-02-08: 4 commitsWeek of 2026-02-15: 14 commitsWeek of 2026-02-22: 15 commitsWeek of 2026-03-01: 3 commitsWeek of 2026-03-08: 4 commitsWeek of 2026-03-15: 3 commitsWeek of 2026-03-22: 2 commitsWeek of 2026-03-29: 1 commitsWeek of 2026-04-05: 1 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 4 commitsWeek of 2026-04-26: 1 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 1 commitsWeek of 2026-05-24: 2 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 1 commitsWeek of 2026-06-14: 1 commitsWeek of 2026-06-21: 2 commitsWeek of 2026-06-28: 1 commitsWeek of 2026-07-05: 3 commitsWeek of 2026-07-12: 3 commitsWeek of 2026-07-19: 2 commitsWeek of 2026-07-26: 4 commitsWeek of 2026-08-02: 5 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 3 commitsWeek of 2026-08-23: 1 commitsWeek of 2026-08-30: 58 commitsWeek of 2026-09-06: 15 commitsWeek of 2026-09-13: 3 commitsWeek of 2026-09-20: 0 commitsSep 27, 2025Sep 20, 2026
158 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 8 commitsSun 1:00 — 2 commitsSun 2:00 — 1 commitsSun 3:00 — 0 commitsSun 4:00 — 1 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 1 commitsSun 9:00 — 4 commitsSun 10:00 — 2 commitsSun 11:00 — 9 commitsSun 12:00 — 4 commitsSun 13:00 — 8 commitsSun 14:00 — 8 commitsSun 15:00 — 11 commitsSun 16:00 — 1 commitsSun 17:00 — 8 commitsSun 18:00 — 3 commitsSun 19:00 — 0 commitsSun 20:00 — 3 commitsSun 21:00 — 12 commitsSun 22:00 — 12 commitsSun 23:00 — 15 commitsMon 0:00 — 15 commitsMon 1:00 — 6 commitsMon 2:00 — 7 commitsMon 3:00 — 6 commitsMon 4:00 — 0 commitsMon 5:00 — 1 commitsMon 6:00 — 0 commitsMon 7:00 — 2 commitsMon 8:00 — 3 commitsMon 9:00 — 3 commitsMon 10:00 — 13 commitsMon 11:00 — 16 commitsMon 12:00 — 8 commitsMon 13:00 — 20 commitsMon 14:00 — 24 commitsMon 15:00 — 4 commitsMon 16:00 — 6 commitsMon 17:00 — 5 commitsMon 18:00 — 3 commitsMon 19:00 — 11 commitsMon 20:00 — 8 commitsMon 21:00 — 12 commitsMon 22:00 — 4 commitsMon 23:00 — 5 commitsTue 0:00 — 2 commitsTue 1:00 — 1 commitsTue 2:00 — 3 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 2 commitsTue 8:00 — 0 commitsTue 9:00 — 1 commitsTue 10:00 — 6 commitsTue 11:00 — 9 commitsTue 12:00 — 2 commitsTue 13:00 — 7 commitsTue 14:00 — 13 commitsTue 15:00 — 11 commitsTue 16:00 — 1 commitsTue 17:00 — 9 commitsTue 18:00 — 12 commitsTue 19:00 — 8 commitsTue 20:00 — 23 commitsTue 21:00 — 16 commitsTue 22:00 — 12 commitsTue 23:00 — 20 commitsWed 0:00 — 8 commitsWed 1:00 — 21 commitsWed 2:00 — 16 commitsWed 3:00 — 6 commitsWed 4:00 — 2 commitsWed 5:00 — 2 commitsWed 6:00 — 0 commitsWed 7:00 — 7 commitsWed 8:00 — 9 commitsWed 9:00 — 7 commitsWed 10:00 — 11 commitsWed 11:00 — 7 commitsWed 12:00 — 10 commitsWed 13:00 — 2 commitsWed 14:00 — 3 commitsWed 15:00 — 8 commitsWed 16:00 — 8 commitsWed 17:00 — 8 commitsWed 18:00 — 10 commitsWed 19:00 — 2 commitsWed 20:00 — 8 commitsWed 21:00 — 4 commitsWed 22:00 — 9 commitsWed 23:00 — 7 commitsThu 0:00 — 16 commitsThu 1:00 — 18 commitsThu 2:00 — 7 commitsThu 3:00 — 0 commitsThu 4:00 — 1 commitsThu 5:00 — 0 commitsThu 6:00 — 2 commitsThu 7:00 — 3 commitsThu 8:00 — 3 commitsThu 9:00 — 1 commitsThu 10:00 — 14 commitsThu 11:00 — 7 commitsThu 12:00 — 8 commitsThu 13:00 — 4 commitsThu 14:00 — 3 commitsThu 15:00 — 5 commitsThu 16:00 — 3 commitsThu 17:00 — 4 commitsThu 18:00 — 2 commitsThu 19:00 — 0 commitsThu 20:00 — 9 commitsThu 21:00 — 1 commitsThu 22:00 — 8 commitsThu 23:00 — 17 commitsFri 0:00 — 10 commitsFri 1:00 — 0 commitsFri 2:00 — 3 commitsFri 3:00 — 0 commitsFri 4:00 — 1 commitsFri 5:00 — 4 commitsFri 6:00 — 3 commitsFri 7:00 — 0 commitsFri 8:00 — 3 commitsFri 9:00 — 5 commitsFri 10:00 — 9 commitsFri 11:00 — 6 commitsFri 12:00 — 7 commitsFri 13:00 — 3 commitsFri 14:00 — 19 commitsFri 15:00 — 13 commitsFri 16:00 — 8 commitsFri 17:00 — 6 commitsFri 18:00 — 7 commitsFri 19:00 — 6 commitsFri 20:00 — 3 commitsFri 21:00 — 7 commitsFri 22:00 — 11 commitsFri 23:00 — 13 commitsSat 0:00 — 21 commitsSat 1:00 — 4 commitsSat 2:00 — 7 commitsSat 3:00 — 3 commitsSat 4:00 — 2 commitsSat 5:00 — 4 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 2 commitsSat 10:00 — 6 commitsSat 11:00 — 9 commitsSat 12:00 — 4 commitsSat 13:00 — 11 commitsSat 14:00 — 11 commitsSat 15:00 — 4 commitsSat 16:00 — 2 commitsSat 17:00 — 16 commitsSat 18:00 — 1 commitsSat 19:00 — 7 commitsSat 20:00 — 12 commitsSat 21:00 — 10 commitsSat 22:00 — 10 commitsSat 23:00 — 6 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Feb 7, 2026daily#13+234
Feb 6, 2026daily#17+176
  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    456.7K stars · TypeScript

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    391.3K stars · TypeScript

  • obra/superpowers

    An agentic skills framework & software development methodology that works.

    295.2K stars · Shell

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    251.2K stars · Python

  • anomalyco/opencode

    The open source coding agent.

    211.7K stars · TypeScript