Clawrouter

Hosted-gateway LLM router — save 67% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest ca...

1bcMax

@1bcmax

What This Skill Does

Local proxy that forwards LLM requests to the blockrun.ai gateway, which automatically routes each prompt to the cheapest capable model across 55+ models from 9 providers. Also exposes realtime market data, Twitter/X intelligence, and Polymarket prediction data as built-in agent tools.

Replaces managing multiple provider API keys and manually selecting models by automatically routing each request to the cheapest capable model across 55+ options.

When to Use It

  • Route LLM inference requests to the cheapest capable model across multiple providers
  • Access realtime stock, crypto, FX, and commodity market data from agent tools
  • Query Twitter/X intelligence data without separate API integrations
  • Fetch Polymarket prediction market outcomes and probabilities
  • Reduce inference costs by 67% across OpenAI, Anthropic, Google, and other providers
  • Run agent workflows that need both LLM inference and live financial data in one tool

Install

$ openclaw skills install @1bcmax/clawrouter

ClawRouter

Hosted-gateway LLM router that saves 67% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across 55+ models from 9 providers (8 free NVIDIA models). All billing flows through one USDC wallet; you do not hold provider API keys.

This is not a local-inference tool. ClawRouter is a thin local proxy. Your prompts are sent over HTTPS to the blockrun.ai gateway for model execution. If your workload requires inference that never leaves your machine, use a local runtime like Ollama — ClawRouter is not the right tool for that use case.

Source: https://github.com/BlockRunAI/ClawRouter · npm: https://www.npmjs.com/package/@blockrun/clawrouter · License: MIT.

Data Flow

Your app → localhost proxy (ClawRouter) → https://blockrun.ai/api  (or sol.blockrun.ai/api)
                                              ↓
                                        OpenAI / Anthropic / Google / etc.
                                              ↓
                                        Response → back through proxy → your app

Sent to blockrun.ai on every request: the model name, the full prompt/messages body, sampling params (temperature, max_tokens, tools, etc.), and an X-PAYMENT header containing a signed x402 USDC micropayment.

Not sent: your wallet private key (only the detached payment signature is sent), any other local files, environment variables, or OpenClaw config beyond what's needed for this request.

Blockrun's privacy stance: https://blockrun.ai/privacy. Treat prompts the same way you'd treat prompts sent to any hosted LLM API (OpenAI, Anthropic, etc.) — do not send data you would not share with a third-party API provider.

Credentials & Local Key Storage

ClawRouter does not collect or forward third-party provider API keys. You do not supply OpenAI, Anthropic, Google, DeepSeek, xAI, or NVIDIA credentials — the blockrun.ai gateway owns those relationships.

What models.providers.blockrun stores (fully enumerated):

FieldSensitivePurpose
walletKeyYesEVM private key used to sign USDC micropayments via x402. Auto-generated locally on first run — no user input required. Never transmitted over the network; only detached payment signatures are sent.
solanaKeyYesSolana keypair (BIP-44 m/44'/501'/0'/0'). Auto-derived from the same local mnemonic via @scure/bip32 + @scure/bip39.
gatewayNoGateway URL. Defaults: https://blockrun.ai/api (Base) · https://sol.blockrun.ai/api (Solana).
routingNoOptional override of the default four-tier router.

How and where keys are stored:

  • Keys live in the OpenClaw user config file — typically ~/.config/openclaw/config.json on Linux, ~/Library/Application Support/openclaw/config.json on macOS, %APPDATA%\openclaw\config.json on Windows — under the models.providers.blockrun path.
  • Written by OpenClaw's standard config writer with 0600 permissions on POSIX systems (owner read/write only).
  • Stored in plaintext, the same way every OpenClaw provider's API key is stored. ClawRouter does not add an extra encryption layer; your filesystem permissions are the security boundary. If you require an encrypted keystore, run OpenClaw on an encrypted volume (FileVault, LUKS, BitLocker) or use a dedicated burner wallet funded only with what you intend to spend.
  • Auto-generation uses @scure/bip39 to produce a 24-word mnemonic, then BIP-44 derivation for both chains. Source: src/wallet.ts.

Operational guidance: treat the wallet as a spending account with a small top-up, not a long-term store of value. Fund it with what you expect to spend on LLM calls. If the host machine is compromised, the wallet key is compromised — rotate and refund.

Supply-Chain Integrity

Install

openclaw plugins install @blockrun/clawrouter

The structured install block above tells OpenClaw to install the auditable npm package @blockrun/clawrouter. Source for every version is on GitHub; every release is tagged.

Setup

# Enable smart routing (auto-picks cheapest model per request)
openclaw models set blockrun/auto

# Or pin a specific model
openclaw models set openai/gpt-4o

How Routing Works

ClawRouter classifies each request into one of four tiers:

  • SIMPLE (40% of traffic) — factual lookups, greetings, translations → Gemini Flash ($0.60/M, 99% savings)
  • MEDIUM (30%) — summaries, explanations, data extraction → DeepSeek Chat ($0.42/M, 99% savings)
  • COMPLEX (20%) — code generation, multi-step analysis → Claude Opus ($75/M, best quality)
  • REASONING (10%) — proofs, formal logic, multi-step math → o3 ($8/M, 89% savings)

Rules handle 80% of requests in <1ms. Only ambiguous queries hit the LLM classifier ($0.00003 per classification).

Available Models

55+ models including: gpt-5.5, gpt-5.4, gpt-4o, o3, claude-opus-4.7, claude-opus-4.6, claude-opus-4.5, claude-sonnet-4.6, gemini-3.1-pro, gemini-2.5-flash, deepseek-chat, grok-3, kimi-k2.6, kimi-k2.5, and 10 free NVIDIA models (gpt-oss-120b [default], gpt-oss-20b, mistral-small-4-119b, deepseek-v4-pro, deepseek-v4-flash, qwen3-next-80b-a3b-thinking, qwen3-coder-480b, glm-4.7, llama-4-maverick, nemotron-3-nano-omni-30b-a3b-reasoning [vision]).

Built-in Agent Tools

In addition to LLM routing, ClawRouter exposes BlockRun's x402-gated data APIs as ready-to-use OpenClaw tools. Every tool is paid from the same USDC wallet — no extra setup, no extra API keys.

Market Data

Realtime prices and historical OHLC across every asset class. The agent should call these directly instead of scraping finance sites.

ToolCoveragePrice
blockrun_stock_price12 global markets: US (NYSE/Nasdaq), HK, JP, KR, UK, DE, FR, NL, IE, LU, CN, CA$0.001 / call
blockrun_stock_historyOHLC bars at 1/5/15/60/240-min or D/W/M resolution$0.001 / call
blockrun_stock_listTicker lookup / company-name search per marketFree
blockrun_crypto_priceBTC-USD, ETH-USD, SOL-USD, and moreFree
blockrun_fx_priceEUR-USD, GBP-USD, JPY-USD, and moreFree
blockrun_commodity_priceXAU-USD (gold), XAG-USD (silver), XPT-USD (platinum)Free

Image & Video Generation

ToolPurposePrice
blockrun_image_generation8 image models — DALL-E 3, Nano Banana / Pro, Flux, Grok Imagine, CogView-4$0.015–$0.15 / image
blockrun_image_editEdit / inpaint existing image (openai/gpt-image-1)$0.02–$0.04 / image
blockrun_video_generationGrok Imagine + ByteDance Seedance (1.5-pro / 2.0-fast / 2.0), 5–10s$0.03–$0.30 / second

Polymarket (Predexon)

Full prediction-market toolbox: live events, leaderboard, market search, smart money positioning, wallet analytics, and cross-market arbitrage matching (Polymarket ↔ Kalshi). 8 tools, $0.001–$0.005 per call. See blockrun_predexon_* in the tool list.

Example Output

[ClawRouter] google/gemini-2.5-flash (SIMPLE, rules, confidence=0.92)
             Cost: $0.0025 | Baseline: $0.308 | Saved: 99.2%

Top skills in this category

Stock Analysis

@udiedrichsen

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.

25758k

Stock Market Pro

@kys42

Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends, high-resolution charts (RSI/MACD/BB/VWAP/ATR), plus optional web a...

15532k

A股量化 AkShare

@mbpz

A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。

10131k

Stock Watcher

@robin797860

Manage and monitor a personal stock watchlist with support for adding, removing, listing stocks, and summarizing their recent performance using data from 10jqka.com.cn. Use when the user wants to track specific stocks, get performance summaries, or manage their watchlist.

8736k

Intelligent Stocks Screener

@financial-ai-analyst

基于东方财富数据库,支持通过自然语言输入筛选A港美股、基金、债券等多种资产,支持多元指标筛选,含技术面、消息面、基本面及市场情绪等,可用于全球资产速筛、跨市场监控、投资组合构建、策略回测等场景。返回结果包含数据说明及 csv 文件。Natural language screener for investment...

10626k