@blockrun/clawrouter 0.12.296 → 0.12.298

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: clawrouter
3
- description: Hosted-gateway LLM router — save 84% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 88 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, and more. 7 free open-weight models included. Also exposes realtime market data (global stocks, crypto, FX, commodities), Twitter/X intelligence, prediction-market data across Polymarket, Kalshi, Limitless, Opinion, Predict.Fun, dFlow + UMA oracle resolution + wallet identity & clustering, phone-number intelligence (carrier + SIM-swap fraud detection) plus AI-powered outbound voice calls (Twilio + Bland.ai), AND the Surf unified crypto data API (84 endpoints — CEX/DEX, on-chain SQL over 80+ ClickHouse tables, 100M+ labeled wallets, prediction markets, social/CT mindshare, news, VC fund intel) as built-in agent tools. Not a local-inference tool — prompts are sent to the blockrun.ai gateway.
3
+ description: Hosted-gateway LLM router — save 84% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 90 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, and more. Free open-weight models included. Also exposes realtime market data (global stocks, crypto, FX, commodities), Twitter/X intelligence, prediction-market data across Polymarket, Kalshi, Limitless, Opinion, Predict.Fun, dFlow + UMA oracle resolution + wallet identity & clustering, phone-number intelligence (carrier + SIM-swap fraud detection) plus AI-powered outbound voice calls (Twilio + Bland.ai) as built-in agent tools. Not a local-inference tool — prompts are sent to the blockrun.ai gateway.
4
4
  triggers:
5
5
  - "clawrouter"
6
6
  - "claw router"
@@ -21,13 +21,6 @@ triggers:
21
21
  - "phone number verification"
22
22
  - "sim swap detection"
23
23
  - "outbound ai call"
24
- - "blockrun surf"
25
- - "surf crypto api"
26
- - "on-chain sql query"
27
- - "clickhouse onchain"
28
- - "wallet labels api"
29
- - "crypto mindshare"
30
- - "crypto news api"
31
24
  homepage: https://blockrun.ai/clawrouter.md
32
25
  repository: https://github.com/BlockRunAI/ClawRouter
33
26
  license: MIT
@@ -53,7 +46,7 @@ metadata:
53
46
 
54
47
  # ClawRouter
55
48
 
56
- Hosted-gateway LLM router that saves <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across <!-- br:models.chatVisible -->88<!-- /br:models.chatVisible --> models from 9 providers (<!-- br:models.free -->7<!-- /br:models.free --> free open-weight models). All billing flows through one BlockRun credential — either a USDC wallet paying x402 per call, or a BlockRun API key drawing on card-funded account credit. Either way you do not hold provider API keys.
49
+ Hosted-gateway LLM router that saves <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across <!-- br:models.chatVisible -->90<!-- /br:models.chatVisible --> models from 9 providers (<!-- br:models.free -->7<!-- /br:models.free --> free open-weight models). All billing flows through one BlockRun credential — either a USDC wallet paying x402 per call, or a BlockRun API key drawing on card-funded account credit. Either way you do not hold provider API keys.
57
50
 
58
51
  **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.
59
52
 
@@ -132,14 +125,14 @@ Routing is done locally by [`@blockrun/router-core`](https://github.com/BlockRun
132
125
 
133
126
  Curated primaries on the default `auto` profile:
134
127
 
135
- - **SIMPLE** — factual lookups, greetings, translations → gemini-2.5-flash ($0.30/$2.50)
136
- - **MEDIUM** — summaries, explanations, data extraction → kimi-k2.7 ($0.95/$4.00)
137
- - **COMPLEX** — code generation, multi-step analysis → gemini-3.1-pro ($2/$12)
138
- - **REASONING** — proofs, formal logic, multi-step math → grok-4-1-fast-reasoning ($0.20/$0.50)
128
+ - **SIMPLE** — factual lookups, greetings, translations → gemini-2.5-flash
129
+ - **MEDIUM** — summaries, explanations, data extraction → kimi-k2.7
130
+ - **COMPLEX** — code generation, multi-step analysis → gemini-3.1-pro
131
+ - **REASONING** — proofs, formal logic, multi-step math → grok-4-1-fast-reasoning
139
132
 
140
133
  Turns that actually need their attached tools switch to agent-tuned tiers (gpt-4o-mini → kimi-k2.7 → claude-sonnet-4.6). `eco` opens on the free tier (nemotron-3.5-lightning); `premium` climbs to gpt-5.3-codex / claude-fable-5 / claude-sonnet-4.6. Full chains: [docs/routing-profiles.md](../../docs/routing-profiles.md).
141
134
 
142
- Prices are per 1M input/output tokens. Per-tier
135
+ Per-tier
143
136
  savings percentages are deliberately not quoted here: the published figure is
144
137
  blended across a stated workload mix, and a per-tier number invites comparing
145
138
  it against a baseline nobody wrote down. See
@@ -147,7 +140,34 @@ it against a baseline nobody wrote down. See
147
140
 
148
141
  ## Available Models
149
142
 
150
- <!-- br:models.chatVisible -->88<!-- /br:models.chatVisible --> models including: gpt-6-astra [GPT-6 flagship, 1M ctx], gpt-6-sol, gpt-6.1-sol [refreshed Sol, $2/$10], gpt-6-luna [fast, $0.10/$0.50], gpt-5.6-terra [balanced, stable default], gpt-5.6-sol [flagship], gpt-5.6-luna [cost-efficient], gpt-5.6-sol/terra/luna-pro [pro reasoning tiers], gpt-5.5, gpt-5.5-pro [max compute], chat-latest [ChatGPT Instant], gpt-5.4, gpt-5.1, gpt-4o, o3, claude-fable-5.1, claude-fable-5, claude-opus-5.5 [newest Opus, $4/$20], claude-opus-5 [1M ctx], claude-opus-4.8, claude-opus-4.7, claude-opus-4.5, claude-sonnet-5.5, claude-sonnet-5, claude-sonnet-4.6, gemini-3.1-pro, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, deepseek-v4-pro, deepseek-chat, grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-build-0.1, glm-5.3 [Z.AI flagship, 1M ctx], glm-5.3-flash [natively multimodal, 1M ctx — $0.15/$0.50], glm-5.2, minimax-m3, kimi-k3 [1M ctx flagship], kimi-k2.7, qwen3.8-max [Qwen 3.8 flagship, 1M ctx], qwen3.7-max, qwen3.7-plus, qwen3.7-flash, mimo [Xiaomi MiMo-V2.5 Pro, 1M ctx], mistral-large-4 [Mistral flagship, 512K ctx, vision], hy4-preview [Tencent, 770B MoE], laguna-s-2.1 [Poolside, coding, $0.09/$0.18], and <!-- br:models.free -->7<!-- /br:models.free --> free open-weight models (nemotron-3.5-lightning [1M ctx, thinking mode — the free default], nemotron-3-ultra-550b [550B/55B MoE, 1M ctx — the largest free model], nemotron-3-nano-omni-30b-a3b-reasoning [256K ctx], llama-3.2-11b-vision [Meta Llama], north-mini-code [Cohere, coding, sub-second], laguna-xs-2.1 [Poolside, coding, ~161 tok/s], muse-glimmer-30b [Meta Muse, reasoning]). The free tier is text-only — image turns route to a paid vision model, because the two free models the catalogs advertise as vision-capable fail a solid-colour probe on both chains and do so with an HTTP 200.
143
+ <!-- br:models.chatVisible -->90<!-- /br:models.chatVisible --> models including: gpt-6-astra [GPT-6 flagship, 1M ctx], gpt-6-sol, gpt-6.1-sol [refreshed Sol], gpt-6-luna [fast], gpt-5.6-terra [balanced, stable default], gpt-5.6-sol [flagship], gpt-5.6-luna [cost-efficient], gpt-5.6-sol/terra/luna-pro [pro reasoning tiers], gpt-5.5, gpt-5.5-pro [max compute], chat-latest [ChatGPT Instant], gpt-5.4, gpt-5.1, gpt-4o, o3, claude-fable-5.1, claude-fable-5, claude-opus-5.5 [newest Opus], claude-opus-5 [1M ctx], claude-opus-4.8, claude-opus-4.7, claude-opus-4.5, claude-sonnet-5.5, claude-sonnet-5, claude-sonnet-4.6, gemini-3.1-pro, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, deepseek-v4-pro, deepseek-chat, grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-build-0.1, glm-5.3 [Z.AI flagship, 1M ctx], glm-5.3-flash [natively multimodal, 1M ctx], glm-5.2, minimax-m3, kimi-k3 [1M ctx flagship], kimi-k2.7, qwen3.8-max [Qwen 3.8 flagship, 1M ctx], qwen3.7-max, qwen3.7-plus, qwen3.7-flash, mimo [Xiaomi MiMo-V2.5 Pro, 1M ctx], mistral-large-4 [Mistral flagship, 512K ctx, vision], hy4-preview [Tencent, 770B MoE], laguna-s-2.1 [Poolside, coding], and <!-- br:models.free -->7<!-- /br:models.free --> free open-weight models (nemotron-3.5-lightning [1M ctx, thinking mode — the free default], nemotron-3-ultra-550b [550B/55B MoE, 1M ctx — the largest free model], nemotron-3-nano-omni-30b-a3b-reasoning [256K ctx], llama-3.2-11b-vision [Meta Llama], north-mini-code [Cohere, coding, sub-second], laguna-xs-2.1 [Poolside, coding, ~161 tok/s], muse-glimmer-30b [Meta Muse, reasoning]). The free tier is text-only — image turns route to a paid vision model, because the two free models the catalogs advertise as vision-capable fail a solid-colour probe on both chains and do so with an HTTP 200.
144
+
145
+ ## Model Prices — Look Them Up Live
146
+
147
+ Model prices move (vendors reprice, promos end), so this skill carries no model price table. Read the live catalog before you budget a call:
148
+
149
+ ```bash
150
+ curl -s https://blockrun.ai/api/v1/models # Base
151
+ curl -s https://sol.blockrun.ai/api/v1/models # Solana
152
+ ```
153
+
154
+ Each entry in `data[]` has an `id`, a `billing_mode` and a `pricing` object. All amounts are USD.
155
+
156
+ | `billing_mode` | `pricing` fields | Estimated cost of one call |
157
+ | ---------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
158
+ | `paid` (chat) | `input`, `output` per 1M tokens; optional `cache_read` / `cache_write` per 1M; optional `long_context` | `(input_tokens × input + output_tokens × output) / 1,000,000`, minimum $0.001, plus the $0.001 transaction fee |
159
+ | `free` | `input: 0`, `output: 0` | $0 — no payment |
160
+ | `per_image` | `per_image`, `transaction_fee` | `per_image × images + transaction_fee` |
161
+ | `per_second` | `per_second`, `per_call_surcharge`, `transaction_fee`, `default_duration_seconds` | `per_second × seconds + per_call_surcharge + transaction_fee` |
162
+ | `per_track` | `per_track`, `transaction_fee` | `per_track + transaction_fee` |
163
+ | `per_character` | `per_1k_chars`, `transaction_fee` | `per_1k_chars × characters / 1,000 + transaction_fee` |
164
+ | `per_generation` | `per_generation`, `transaction_fee` | `per_generation + transaction_fee` |
165
+
166
+ - **Cached prompt tokens** bill at `cache_read` instead of `input` (and cache writes at `cache_write`) when the model lists them.
167
+ - **`long_context`** is a list of tiers. When the prompt is larger than a tier's `threshold` (or equal to it, if `inclusive` is true), that tier's `input` / `output` / `cache_*` rates apply to the **whole** request.
168
+ - Image size/quality and video resolution can raise the media price above the listed base rate.
169
+ - The figure above is an estimate. The exact amount is quoted in the HTTP 402 challenge before anything is signed, so a call never settles above its quote.
170
+ - Human-readable rate card: https://blockrun.ai/pricing
151
171
 
152
172
  ## Built-in Agent Tools
153
173
 
@@ -168,11 +188,11 @@ Realtime prices and historical OHLC across every asset class. The agent should c
168
188
 
169
189
  ### Image & Video Generation
170
190
 
171
- | Tool | Purpose | Price |
172
- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
173
- | `blockrun_image_generation` | 12 image models — GPT Image 1/2/2.5 (Flare, Sunburst), Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / 2.0 / Pro, CogView-4 | $0.015–$0.15 / image |
174
- | `blockrun_image_edit` | Edit / inpaint existing image (GPT Image 1/2, 2.5 Sunburst, Nano Banana; `model` param) | $0.02–$0.04 / image |
175
- | `blockrun_video_generation` | Grok Imagine + ByteDance Seedance (1.5-pro / 2.0-fast / 2.0) at 720p with synced audio (t2v default), 5–10s, + OpenAI Sora 2 via Azure (`azure/sora-2`, 4/8/12s, t2v + i2v, rejects human faces in reference images). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | $0.05/s (Grok); $0.10/s (Sora 2); Seedance ~$0.46–$1.49 per 5s clip |
191
+ | Tool | Purpose | Price |
192
+ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
193
+ | `blockrun_image_generation` | 12 image models — GPT Image 1/2/2.5 (Flare, Sunburst), Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / 2.0 / Pro, CogView-4 | per model — see [Model Prices](#model-prices--look-them-up-live) |
194
+ | `blockrun_image_edit` | Edit / inpaint existing image (GPT Image 1/2, 2.5 Sunburst, Nano Banana; `model` param) | per model — see [Model Prices](#model-prices--look-them-up-live) |
195
+ | `blockrun_video_generation` | Grok Imagine + ByteDance Seedance (1.5-pro / 2.0-fast / 2.0) at 720p with synced audio (t2v default), 5–10s, + OpenAI Sora 2 via Azure (`azure/sora-2`, 4/8/12s, t2v + i2v, rejects human faces in reference images). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | per model — see [Model Prices](#model-prices--look-them-up-live) |
176
196
 
177
197
  ### Phone & Voice (Twilio + Bland.ai)
178
198
 
@@ -238,16 +258,6 @@ egress by default, so it works out of the box in geoblocked regions).
238
258
  `blockrun_predexon_*` data tools first. See the **`polymarket-trading` skill**
239
259
  for the golden rules and end-to-end flow.
240
260
 
241
- ### Crypto Data (Surf) — skill-only integration
242
-
243
- Surf is a unified crypto data API with **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 `POST /surf/onchain/sql` — ad-hoc SELECT against the warehouse, no indexer required.
244
-
245
- **ClawRouter ships Surf as a skill, not as typed wrappers.** The base proxy whitelists `/v1/surf/*` so any call through `http://127.0.0.1:8402/v1/surf/...` flows through the same x402 wallet that pays for LLM calls. The endpoint catalog, parameter shapes, and example flows live in the dedicated **`surf` skill** — Claude Code (or any agent) reads that skill on demand and crafts the HTTP call itself. No `blockrun_surf_*` tool definitions to maintain, no release of ClawRouter when Surf adds endpoint #85.
246
-
247
- Pricing tiers (per call, settled in USDC directly to Surf's Base treasury): **$0.001** prices/rankings/lists/news · **$0.005** orderbooks/candles/search/wallet details/social · **$0.02** on-chain SQL/query/schema, chat completions. No monthly minimums, no Surf account, no API key. See the `surf` skill for the full endpoint reference.
248
-
249
- This is the pattern for new BlockRun-marketplace APIs going forward: base proxy whitelists the namespace, a dedicated skill documents the surface — no hand-coded tool wrappers per endpoint.
250
-
251
261
  ## Example Output
252
262
 
253
263
  ```
@@ -55,20 +55,22 @@ Display inline: `![generated image](http://localhost:8402/images/abc123.png)`
55
55
 
56
56
  ### Model Selection
57
57
 
58
- | Alias | Full ID | Price | Sizes | Best for |
59
- | ------------------ | ------------------------------- | ------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
60
- | `nano-banana` | `google/nano-banana` | $0.05 | 1024×1024 | Default — fast, cheap, good quality |
61
- | `banana-2` | `google/nano-banana-2` | $0.09 | 1024×1024 | Gemini 3.1 Flash imagegen — sharper than nano-banana at 1K |
62
- | `banana-pro` | `google/nano-banana-pro` | $0.10–$0.15 | 1024×1024, 2048×2048, 4096×4096 | High-res, large format |
63
- | `gpt-image` | `openai/gpt-image-1` | $0.02–$0.04 | 1024×1024, 1536×1024, 1024×1536 | Budget option; supports editing |
64
- | `gpt-image-2` | `openai/gpt-image-2` | $0.06–$0.12 | 1024×1024, 1536×1024, 1024×1536 | Photorealistic, reasoning-driven, text rendering (slow — proxy polls up to 5min); legacy `dalle` alias routes here |
65
- | `flare` | `openai/gpt-image-2.5-flare` | $0.28–$0.56 | 1024×1024, 1536×1024, 1024×1536 | GPT Image 2.5, fast — top OpenAI quality, caller can pick `quality` at a flat price |
66
- | `sunburst` | `openai/gpt-image-2.5-sunburst` | $0.28–$0.56 | 1024×1024, 1536×1024, 1024×1536 | GPT Image 2.5, precision — best for high-fidelity edits |
67
- | `seedream` | `bytedance/seedream-5-pro` | $0.045–$0.09 | up to 2848×1600 / 2304×1728 | Flagship quality, reference-image support |
68
- | `grok-imagine` | `xai/grok-imagine-image` | $0.02 | 1024×1024 | xAI Grok image style |
69
- | `grok-imagine-2` | `xai/grok-imagine-image-2.0` | $0.04 | 1024×1024 | Grok Imagine 2.0 — between grok-imagine and pro |
70
- | `grok-imagine-pro` | `xai/grok-imagine-image-pro` | $0.07 | 1024×1024 | Grok high-quality |
71
- | `cogview` | `zai/cogview-4` | $0.015–$0.02 | 512×512 to 1440×1440 | Cheapest — Zhipu CogView |
58
+ | Alias | Full ID | Sizes | Best for |
59
+ | ------------------ | ------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
60
+ | `nano-banana` | `google/nano-banana` | 1024×1024 | Default — fast, cheap, good quality |
61
+ | `banana-2` | `google/nano-banana-2` | 1024×1024 | Gemini 3.1 Flash imagegen — sharper than nano-banana at 1K |
62
+ | `banana-pro` | `google/nano-banana-pro` | 1024×1024, 2048×2048, 4096×4096 | High-res, large format |
63
+ | `gpt-image` | `openai/gpt-image-1` | 1024×1024, 1536×1024, 1024×1536 | Budget option; supports editing |
64
+ | `gpt-image-2` | `openai/gpt-image-2` | 1024×1024, 1536×1024, 1024×1536 | Photorealistic, reasoning-driven, text rendering (slow — proxy polls up to 5min); legacy `dalle` alias routes here |
65
+ | `flare` | `openai/gpt-image-2.5-flare` | 1024×1024, 1536×1024, 1024×1536 | GPT Image 2.5, fast — top OpenAI quality, caller can pick `quality` at a flat price |
66
+ | `sunburst` | `openai/gpt-image-2.5-sunburst` | 1024×1024, 1536×1024, 1024×1536 | GPT Image 2.5, precision — best for high-fidelity edits |
67
+ | `seedream` | `bytedance/seedream-5-pro` | up to 2848×1600 / 2304×1728 | Flagship quality, reference-image support |
68
+ | `grok-imagine` | `xai/grok-imagine-image` | 1024×1024 | xAI Grok image style |
69
+ | `grok-imagine-2` | `xai/grok-imagine-image-2.0` | 1024×1024 | Grok Imagine 2.0 — between grok-imagine and pro |
70
+ | `grok-imagine-pro` | `xai/grok-imagine-image-pro` | 1024×1024 | Grok high-quality |
71
+ | `cogview` | `zai/cogview-4` | 512×512 to 1440×1440 | Cheapest — Zhipu CogView |
72
+
73
+ **Prices:** per image, and they change — look the model up live instead of trusting a number here. `GET https://blockrun.ai/api/v1/models` (Solana: `https://sol.blockrun.ai/api/v1/models`), find the entry whose `id` is the Full ID above, and read `pricing.per_image` plus `pricing.transaction_fee`. Larger sizes or higher `quality` can cost more than the listed base rate; the exact amount is quoted in the HTTP 402 challenge before anything is signed.
72
74
 
73
75
  **Choosing a model:**
74
76
 
@@ -119,7 +121,7 @@ Response is identical to generation:
119
121
  }
120
122
  ```
121
123
 
122
- **Supported models for editing:** `openai/gpt-image-1` (default, $0.02), `openai/gpt-image-2` ($0.06), `openai/gpt-image-2.5-sunburst` ($0.28), `google/nano-banana` ($0.05), `google/nano-banana-2` ($0.09), `google/nano-banana-pro` ($0.10). `mask` works with the OpenAI models only. `openai/gpt-image-2.5-flare` cannot edit.
124
+ **Supported models for editing:** `openai/gpt-image-1` (default), `openai/gpt-image-2`, `openai/gpt-image-2.5-sunburst`, `google/nano-banana`, `google/nano-banana-2`, `google/nano-banana-pro`. `mask` works with the OpenAI models only. `openai/gpt-image-2.5-flare` cannot edit.
123
125
 
124
126
  ---
125
127
 
@@ -1,274 +0,0 @@
1
- ---
2
- name: surf
3
- description: Use this skill — NOT browser or web_fetch — for ALL Surf crypto-data calls. 83 endpoints at localhost:8402/v1/surf/* covering 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 intelligence, news, project + DeFi metrics, token analytics, unified search, VC fund intelligence. Paid through ClawRouter — x402 USDC from the local wallet, or BlockRun account credit if an API key is configured. No Surf account or Surf API key required either way.
4
- triggers:
5
- - "blockrun surf"
6
- - "surf crypto api"
7
- - "surf onchain sql"
8
- - "onchain sql query"
9
- - "clickhouse onchain query"
10
- - "raw sql ethereum"
11
- - "raw sql base"
12
- - "wallet labels api"
13
- - "labeled wallets api"
14
- - "surf wallet detail"
15
- - "crypto mindshare"
16
- - "crypto news api"
17
- - "fear and greed index crypto"
18
- - "token holder distribution"
19
- - "vc fund portfolio"
20
- - "ethena tokenomics"
21
- homepage: https://blockrun.ai/marketplace/surf
22
- license: MIT
23
- ---
24
-
25
- # Surf — Unified Crypto Data API (via ClawRouter)
26
-
27
- Surf bundles **83 endpoints across 12 domains** into one paid HTTP API. ClawRouter exposes them at `http://127.0.0.1:8402/v1/surf/*`, paid the same way ClawRouter pays for LLM calls — an x402 USDC micropayment from the local wallet, or a draw on BlockRun account credit if an API key is configured (verified working on both, 2026-09-05). **No Surf account and no Surf API key either way.** Upstream lives at `api.asksurf.ai/gateway/v1` — ClawRouter forwards transparently.
28
-
29
- **Pricing — flat per call, the same for every endpoint.**
30
-
31
- Surf used to be tiered at $0.001 / $0.005 / $0.020. It is not any more: upstream
32
- now prices all three tiers identically (`SURF_TIER_{1,2,3}_PRICE` are equal). The
33
- `Tier` column in the catalog below still describes endpoint weight, but it no
34
- longer affects what you pay. Anything quoting the old tier prices is stale.
35
-
36
- | Rail | Price per call |
37
- | --------------------------- | ------------------------------------------- |
38
- | API key (`api.blockrun.ai`) | **$0.0075** — base rate, no transaction fee |
39
- | Wallet, Solana | **$0.0075** |
40
- | Wallet, Base | **$0.0085** |
41
-
42
- Verified 2026-09-05 by measurement, not from a price page: the API-key figure by
43
- diffing the account ledger across one call, the wallet figures by reading the
44
- `amount` in the x402 402 challenge, which quotes the price before anything is
45
- signed. Base and Solana genuinely differ for the same endpoint.
46
-
47
- **A 402 quote is authoritative for the rail that issued it — and only that rail.**
48
- On the wallet rail the price arrives in the challenge before you pay, so if this
49
- table disagrees with it, believe the challenge and treat the table as stale.
50
-
51
- Do NOT carry a wallet-rail 402 figure over to the API-key rail. The key rail
52
- issues no 402 at all, and the wallet quote includes the chain's transaction fee
53
- that account credit does not pay — on Base that is $0.0085 quoted against
54
- $0.0075 actually billed to an account. Reading across rails turns a correct
55
- number into a wrong one; it has already happened once.
56
-
57
- The Base/Solana difference is deliberate, not drift: the $0.001 is the Base
58
- transaction fee, and Solana omitting it is a migration incentive. Solana being
59
- cheaper is expected — Solana priced _above_ Base would be the bug worth
60
- reporting, since estimates generally assume the Base figure is the ceiling.
61
-
62
- > The legacy **surf-1.5 chat** surface is intentionally NOT exposed yet — it's held until per-token settlement is wired. Trying `/v1/surf/chat/completions` returns 404 ("Unknown Surf endpoint"), no payment is taken.
63
-
64
- All requests use GET unless the table below says otherwise. Path parameters that look like `?symbol=` are query params on a GET. POST endpoints take a JSON body. ClawRouter attaches payment transparently — an x402 header in wallet mode, a bearer token in API-key mode.
65
-
66
- **Required-param pre-check.** 56 of the 83 endpoints have required query params (e.g. `pair`, `symbol`, `address`, `chain`, `q`, `interval`). The route validates them **before settlement** — call with missing params and you get `400 { missing_params, all_required, docs }` and you are NOT charged. Check each row in the catalog below for the correct param name (e.g. mindshare is `q` + `interval`, not `project` + `window`).
67
-
68
- ## When to use this skill
69
-
70
- - "What is the current BTC price?" → `/surf/market/price?symbol=BTC` (cheaper + more reliable than scraping)
71
- - "Who holds the most USDC on Ethereum?" → `/surf/token/holders?address=0xA0b8...&chain=ethereum`
72
- - "How many Ethereum transactions in the last hour?" → `POST /surf/onchain/sql { sql: 'SELECT count() FROM ethereum.transactions WHERE block_timestamp >= now() - INTERVAL 1 HOUR' }`
73
- - "Label this list of wallets." → `/surf/wallet/labels/batch?addresses=0xabc,0xdef,...`
74
- - "Is HYPE mindshare peaking?" → `/surf/social/mindshare?q=hyperliquid&interval=30d`
75
- - "Find the canonical metadata for 'ethena'." → `/surf/search/project?q=ethena`
76
-
77
- Always prefer Surf over generic web scraping for these. Use the OpenClaw tool name `blockrun_surf_*` when invoking from an agent; use the HTTP path directly when calling from a script.
78
-
79
- ## Endpoint catalog
80
-
81
- ### Exchange (CEX) — 7 endpoints
82
-
83
- | Path | Tier | Required |
84
- | --------------------------------- | ---- | -------- |
85
- | `/surf/exchange/markets` | T1 | — |
86
- | `/surf/exchange/price` | T1 | `pair` |
87
- | `/surf/exchange/perp` | T1 | `pair` |
88
- | `/surf/exchange/depth` | T2 | `pair` |
89
- | `/surf/exchange/klines` | T2 | `pair` |
90
- | `/surf/exchange/funding-history` | T2 | `pair` |
91
- | `/surf/exchange/long-short-ratio` | T2 | `pair` |
92
-
93
- ### Market Overview — 11 endpoints
94
-
95
- | Path | Tier | Required |
96
- | ---------------------------------------- | ---- | ------------------------------------------------- |
97
- | `/surf/market/ranking` | T1 | — |
98
- | `/surf/market/fear-greed` | T1 | — |
99
- | `/surf/market/futures` | T1 | — |
100
- | `/surf/market/price` | T1 | `symbol` |
101
- | `/surf/market/etf` | T1 | `symbol` |
102
- | `/surf/market/options` | T1 | `symbol` |
103
- | `/surf/market/liquidation/exchange-list` | T2 | — |
104
- | `/surf/market/liquidation/order` | T2 | — |
105
- | `/surf/market/liquidation/chart` | T2 | `symbol` |
106
- | `/surf/market/onchain-indicator` | T2 | `symbol`, `metric` (NUPL, SOPR, MVRV, Puell, NVT) |
107
- | `/surf/market/price-indicator` | T2 | `indicator` (RSI, MACD, Bollinger, EMA), `symbol` |
108
-
109
- ### News — 2 endpoints
110
-
111
- | Path | Tier | Required |
112
- | ------------------- | ---- | -------------------- |
113
- | `/surf/news/feed` | T1 | — (`limit` optional) |
114
- | `/surf/news/detail` | T1 | `id` |
115
-
116
- ### On-Chain — 7 endpoints
117
-
118
- | Path | Method | Tier | Required |
119
- | ------------------------------ | -------- | ---- | ------------------------ |
120
- | `/surf/onchain/bridge/ranking` | GET | T1 | — |
121
- | `/surf/onchain/yield/ranking` | GET | T1 | — |
122
- | `/surf/onchain/gas-price` | GET | T1 | `chain` |
123
- | `/surf/onchain/tx` | GET | T1 | `hash`, `chain` |
124
- | `/surf/onchain/schema` | GET | T3 | — |
125
- | `/surf/onchain/query` | **POST** | T3 | typed predicates in body |
126
- | `/surf/onchain/sql` | **POST** | T3 | `{ sql: "SELECT ..." }` |
127
-
128
- **On-Chain SQL workflow.** Call `/surf/onchain/schema` once to get table names + columns (cache it locally — schema is stable). Then POST your SELECT against `/surf/onchain/sql`. Always include `LIMIT` on large scans — billing is per call, but slow queries time out. Multi-statement queries are rejected upstream.
129
-
130
- ### Prediction Markets (Polymarket + Kalshi) — 17 endpoints
131
-
132
- | Path | Tier | Required |
133
- | -------------------------------------------------- | ---- | --------------- |
134
- | `/surf/prediction-market/category-metrics` | T1 | — |
135
- | `/surf/prediction-market/polymarket/ranking` | T1 | — |
136
- | `/surf/prediction-market/polymarket/trades` | T1 | — |
137
- | `/surf/prediction-market/polymarket/markets` | T1 | `market_slug` |
138
- | `/surf/prediction-market/polymarket/events` | T1 | `event_slug` |
139
- | `/surf/prediction-market/polymarket/prices` | T1 | `condition_id` |
140
- | `/surf/prediction-market/polymarket/volumes` | T1 | `condition_id` |
141
- | `/surf/prediction-market/polymarket/open-interest` | T1 | `condition_id` |
142
- | `/surf/prediction-market/polymarket/positions` | T2 | `address` |
143
- | `/surf/prediction-market/polymarket/activity` | T2 | `address` |
144
- | `/surf/prediction-market/kalshi/ranking` | T1 | — |
145
- | `/surf/prediction-market/kalshi/markets` | T1 | `market_ticker` |
146
- | `/surf/prediction-market/kalshi/events` | T1 | `event_ticker` |
147
- | `/surf/prediction-market/kalshi/prices` | T1 | `ticker` |
148
- | `/surf/prediction-market/kalshi/trades` | T1 | `ticker` |
149
- | `/surf/prediction-market/kalshi/volumes` | T1 | `ticker` |
150
- | `/surf/prediction-market/kalshi/open-interest` | T1 | `ticker` |
151
-
152
- (For Polymarket smart-money, wallet PnL, UMA oracle resolution, and the other prediction-market venues — Limitless, Opinion, Predict.Fun, dFlow, Binance Futures, cross-venue canonical markets — use the dedicated **Predexon** integration instead; Surf's prediction-market coverage is narrower but cheaper.)
153
-
154
- ### Project + DeFi — 3 endpoints
155
-
156
- | Path | Tier | Required |
157
- | ---------------------------- | ---- | -------- |
158
- | `/surf/project/detail` | T1 | — |
159
- | `/surf/project/defi/metrics` | T1 | `metric` |
160
- | `/surf/project/defi/ranking` | T1 | `metric` |
161
-
162
- ### Social / CT Intelligence — 11 endpoints
163
-
164
- | Path | Tier | Required |
165
- | -------------------------------------- | ---- | --------------- |
166
- | `/surf/social/detail` | T2 | — |
167
- | `/surf/social/ranking` | T2 | — |
168
- | `/surf/social/smart-followers/history` | T2 | — |
169
- | `/surf/social/mindshare` | T2 | `q`, `interval` |
170
- | `/surf/social/tweets` | T1 | `ids` |
171
- | `/surf/social/tweet/replies` | T1 | `tweet_id` |
172
- | `/surf/social/user` | T1 | `handle` |
173
- | `/surf/social/user/followers` | T1 | `handle` |
174
- | `/surf/social/user/following` | T1 | `handle` |
175
- | `/surf/social/user/posts` | T1 | `handle` |
176
- | `/surf/social/user/replies` | T1 | `handle` |
177
-
178
- ### Token Analytics — 4 endpoints
179
-
180
- | Path | Tier | Required |
181
- | ------------------------ | ---- | ------------------ |
182
- | `/surf/token/tokenomics` | T1 | — |
183
- | `/surf/token/dex-trades` | T2 | `address` |
184
- | `/surf/token/holders` | T2 | `address`, `chain` |
185
- | `/surf/token/transfers` | T2 | `address`, `chain` |
186
-
187
- ### Unified Search — 11 endpoints (all Tier 2)
188
-
189
- | Path | Required |
190
- | ---------------------------- | -------- |
191
- | `/surf/search/airdrop` | — |
192
- | `/surf/search/events` | — |
193
- | `/surf/search/kalshi` | — |
194
- | `/surf/search/polymarket` | — |
195
- | `/surf/search/web` | `q` |
196
- | `/surf/search/project` | `q` |
197
- | `/surf/search/news` | `q` |
198
- | `/surf/search/wallet` | `q` |
199
- | `/surf/search/fund` | `q` |
200
- | `/surf/search/social/people` | `q` |
201
- | `/surf/search/social/posts` | `q` |
202
-
203
- ### VC Fund Intelligence — 3 endpoints
204
-
205
- | Path | Tier | Required |
206
- | ---------------------- | ---- | -------- |
207
- | `/surf/fund/detail` | T1 | — |
208
- | `/surf/fund/portfolio` | T1 | — |
209
- | `/surf/fund/ranking` | T1 | `metric` |
210
-
211
- ### Wallet Intelligence — 6 endpoints (all Tier 2)
212
-
213
- | Path | Required |
214
- | --------------------------- | ----------------------------------- |
215
- | `/surf/wallet/detail` | `address` |
216
- | `/surf/wallet/history` | `address` |
217
- | `/surf/wallet/net-worth` | `address` |
218
- | `/surf/wallet/transfers` | `address` |
219
- | `/surf/wallet/protocols` | `address` |
220
- | `/surf/wallet/labels/batch` | `addresses` (comma-separated, ≤200) |
221
-
222
- ### Web — 1 endpoint
223
-
224
- | Path | Tier | Required |
225
- | ----------------- | ---- | -------- |
226
- | `/surf/web/fetch` | T2 | `url` |
227
-
228
- ## Example flows
229
-
230
- **1. "Who is wallet X and what do they hold?"**
231
-
232
- ```bash
233
- curl 'http://127.0.0.1:8402/v1/surf/wallet/detail?address=vitalik.eth'
234
- ```
235
-
236
- If the response says they're a smart-money wallet, follow up with `/surf/wallet/protocols?address=...` for protocol breakdown or `/surf/wallet/history?address=...` for the activity timeline.
237
-
238
- **2. "How concentrated is supply for token Y?"**
239
-
240
- ```bash
241
- curl 'http://127.0.0.1:8402/v1/surf/token/holders?address=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&limit=25'
242
- ```
243
-
244
- Combine the top-25 balances with their wallet labels — `/surf/wallet/labels/batch?addresses=...` — to distinguish "concentration in CEX hot wallets" (normal) from "concentration in dev team multisig" (riskier).
245
-
246
- **3. "Run a custom on-chain query."**
247
-
248
- ```bash
249
- # Step 1 — fetch schema (do this once, then cache locally)
250
- curl 'http://127.0.0.1:8402/v1/surf/onchain/schema'
251
-
252
- # Step 2 — run the SQL
253
- curl -X POST 'http://127.0.0.1:8402/v1/surf/onchain/sql' \
254
- -H 'content-type: application/json' \
255
- -d '{"sql":"SELECT to_address, count() AS hits FROM ethereum.transactions WHERE block_timestamp >= now() - INTERVAL 1 DAY GROUP BY to_address ORDER BY hits DESC LIMIT 20"}'
256
- ```
257
-
258
- Cost: 1 × $0.02 (schema, cached) + 1 × $0.02 (the SQL query) = **$0.04 total** for a custom 24-hour ranking that would otherwise need an indexer.
259
-
260
- **4. "Is project Z trending?"**
261
-
262
- ```bash
263
- # Resolve the canonical slug first (search uses q, not query)
264
- curl 'http://127.0.0.1:8402/v1/surf/search/project?q=ethena'
265
-
266
- # Then pull mindshare (mindshare uses q + interval)
267
- curl 'http://127.0.0.1:8402/v1/surf/social/mindshare?q=ethena&interval=30d'
268
- ```
269
-
270
- ## How calls are paid
271
-
272
- ClawRouter intercepts every `/v1/surf/*` request through `proxyPaidApiRequest`. The local x402 wallet auto-signs the USDC micropayment; the agent never sees the payment flow. Telemetry tags Surf calls with `tier: SURF` so `clawrouter stats` separates them from LLM, partner, and phone usage.
273
-
274
- No typed `blockrun_surf_*` tools are registered — by design. Each new BlockRun-marketplace API ships as a skill (this file) plus a one-line namespace addition to ClawRouter's proxy whitelist, so adding endpoint #85 requires zero ClawRouter release.