@blockrun/clawrouter 0.12.61 → 0.12.63
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.
- package/docs/anthropic-cost-savings.md +349 -0
- package/docs/architecture.md +559 -0
- package/docs/assets/blockrun-248-day-cost-overrun-problem.png +0 -0
- package/docs/assets/blockrun-clawrouter-7-layer-token-compression-openclaw.png +0 -0
- package/docs/assets/blockrun-clawrouter-observation-compression-97-percent-token-savings.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-agentic-proxy-architecture.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-automatic-tier-routing-model-selection.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-error-classification-retry-storm-prevention.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-session-memory-journaling-vs-context-compounding.png +0 -0
- package/docs/assets/blockrun-clawrouter-vs-openclaw-standalone-comparison-production-safety.png +0 -0
- package/docs/assets/blockrun-clawrouter-x402-usdc-micropayment-wallet-budget-control.png +0 -0
- package/docs/assets/blockrun-openclaw-inference-layer-blind-spots.png +0 -0
- package/docs/blog-benchmark-2026-03.md +184 -0
- package/docs/blog-openclaw-cost-overruns.md +197 -0
- package/docs/clawrouter-savings.png +0 -0
- package/docs/configuration.md +512 -0
- package/docs/features.md +257 -0
- package/docs/image-generation.md +380 -0
- package/docs/plans/2026-02-03-smart-routing-design.md +267 -0
- package/docs/plans/2026-02-13-e2e-docker-deployment.md +1260 -0
- package/docs/plans/2026-02-28-worker-network.md +947 -0
- package/docs/plans/2026-03-18-error-classification.md +574 -0
- package/docs/plans/2026-03-19-exclude-models.md +538 -0
- package/docs/routing-profiles.md +81 -0
- package/docs/subscription-failover.md +320 -0
- package/docs/technical-routing-2026-03.md +322 -0
- package/docs/troubleshooting.md +159 -0
- package/docs/vision.md +49 -0
- package/docs/vs-openrouter.md +157 -0
- package/docs/worker-network.md +1241 -0
- package/package.json +3 -2
- package/scripts/reinstall.sh +8 -4
- package/scripts/update.sh +8 -4
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# Stop Overpaying for Claude: How ClawRouter Cuts Your Anthropic Bill by 70%
|
|
2
|
+
|
|
3
|
+
*You love Claude. Your wallet doesn't. Here's how to keep frontier-quality answers — at a fraction of the cost.*
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The Problem: Claude Is Brilliant, But Expensive
|
|
8
|
+
|
|
9
|
+
If you're building with the Anthropic API, you already know Claude is the best reasoning model available. Opus 4.6 runs $5/$25 per million tokens. Sonnet at $3/$15. Even Haiku costs $1/$5.
|
|
10
|
+
|
|
11
|
+
But here's what most developers won't admit: **the majority of your API calls don't need Claude.**
|
|
12
|
+
|
|
13
|
+
Think about your typical workload. You're building a SaaS app. Some requests need Claude's reasoning — debugging complex code, analyzing long documents, orchestrating multi-step agent workflows. But most requests are mundane: extracting JSON from text, answering simple user questions, translating a string, summarizing a paragraph.
|
|
14
|
+
|
|
15
|
+
You're paying $3-25 per million tokens for work that a $0.10 model handles identically.
|
|
16
|
+
|
|
17
|
+
**The problem is simple:** you're paying Claude rates on 100% of your requests, but only ~30% of them need Claude.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What Does a Typical Developer Workload Look Like?
|
|
22
|
+
|
|
23
|
+
### The Everyday Tasks (~70% of requests)
|
|
24
|
+
|
|
25
|
+
These are the requests you fire off constantly and barely think about:
|
|
26
|
+
|
|
27
|
+
- **"Extract the name and email from this text and return JSON"** — Any model can do this. You're paying Claude $15/M output tokens for structured extraction that a $0.40 model handles perfectly.
|
|
28
|
+
|
|
29
|
+
- **"Summarize this customer support ticket in 2 sentences"** — Summarization is a solved problem. You don't need frontier reasoning here.
|
|
30
|
+
|
|
31
|
+
- **"Translate this error message to Spanish"** — Translation is a commodity task. Paying Claude rates for it is like taking a Lamborghini to the grocery store.
|
|
32
|
+
|
|
33
|
+
- **"What's the difference between `useEffect` and `useLayoutEffect`?"** — Factual Q&A. Every model gets this right.
|
|
34
|
+
|
|
35
|
+
- **"Convert this CSV data to a markdown table"** — Pure formatting. A free model does this identically.
|
|
36
|
+
|
|
37
|
+
### The Tasks That Actually Need Claude (~30% of requests)
|
|
38
|
+
|
|
39
|
+
This is where you're paying for real value:
|
|
40
|
+
|
|
41
|
+
- **Complex code generation** — "Refactor this authentication module to support OAuth2 + PKCE, handle token refresh, and add rate limiting." Multi-file, multi-constraint reasoning. Claude earns its price here.
|
|
42
|
+
|
|
43
|
+
- **Long-document analysis** — "Read this 50-page contract and identify all clauses that could expose us to liability over $1M." Context window + reasoning quality matter.
|
|
44
|
+
|
|
45
|
+
- **Multi-step agent orchestration** — "Scan these 5 APIs, cross-reference the data, and generate a report with recommendations." Agentic workflows where the model needs to maintain a plan across many steps.
|
|
46
|
+
|
|
47
|
+
- **Advanced reasoning** — "Debug this race condition in our distributed system" or "Prove this algorithm is O(n log n)." Tasks where cheaper models lose the thread.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## The Solution: ClawRouter
|
|
52
|
+
|
|
53
|
+
[ClawRouter](https://github.com/blockrunai/ClawRouter) is an open-source local proxy that sits between your app and 41+ AI models. It saves you money in three ways: **smart routing**, **token optimization**, and **response caching**.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
┌─────────────┐ ┌──────────────────────────────┐ ┌──────────────────┐
|
|
57
|
+
│ Your App │────▶│ ClawRouter │────▶│ 41+ AI Models │
|
|
58
|
+
│ (OpenAI │ │ (local proxy) │ │ │
|
|
59
|
+
│ SDK) │ │ │ │ FREE (nvidia) │
|
|
60
|
+
│ │ │ 1. Route to cheapest model │ │ $0.10 (gemini) │
|
|
61
|
+
│ model: │ │ 2. Compress tokens │ │ $3.00 (sonnet) │
|
|
62
|
+
│ "auto" │ │ 3. Cache repeated requests │ │ $0.20 (grok) │
|
|
63
|
+
└─────────────┘ └──────────────────────────────┘ └──────────────────┘
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## How You Save: Three Layers
|
|
69
|
+
|
|
70
|
+
### Layer 1: Smart Routing (the biggest win)
|
|
71
|
+
|
|
72
|
+
ClawRouter scores every prompt against 14 dimensions in <1ms and routes it to the cheapest model that can handle the task.
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
"What is the capital of France?"
|
|
76
|
+
→ SIMPLE → nvidia/gpt-oss-120b (FREE)
|
|
77
|
+
|
|
78
|
+
"Extract JSON from this text"
|
|
79
|
+
→ SIMPLE → nvidia/gpt-oss-120b (FREE)
|
|
80
|
+
|
|
81
|
+
"Refactor this auth module with OAuth2 + PKCE"
|
|
82
|
+
→ COMPLEX → anthropic/claude-sonnet-4.6 ($3/$15)
|
|
83
|
+
|
|
84
|
+
"Prove sqrt(2) is irrational, show every step"
|
|
85
|
+
→ REASONING → xai/grok-4-1-fast-reasoning ($0.20/$0.50)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
From real production data across 20,000+ paying user requests:
|
|
89
|
+
|
|
90
|
+
| Model | % of Requests | Price (input/output per M) |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| gemini-2.5-flash-lite | 34.5% | $0.10 / $0.40 |
|
|
93
|
+
| **claude-sonnet-4.6** | **22.7%** | **$3.00 / $15.00** |
|
|
94
|
+
| kimi-k2.5 | 16.2% | $0.60 / $3.00 |
|
|
95
|
+
| minimax-m2.5 | 6.5% | $0.30 / $1.20 |
|
|
96
|
+
| grok-code-fast | 6.1% | $0.20 / $1.50 |
|
|
97
|
+
| claude-haiku-4.5 | 2.7% | $1.00 / $5.00 |
|
|
98
|
+
| nvidia/gpt-oss-120b | 2.1% | FREE |
|
|
99
|
+
| grok-reasoning | 2.9% | $0.20 / $0.50 |
|
|
100
|
+
| Others | 6.3% | varies |
|
|
101
|
+
|
|
102
|
+
**Result:** 77% of requests go to models that cost 5-150x less than Sonnet. Only the ~23% that genuinely need Claude still go to Claude.
|
|
103
|
+
|
|
104
|
+
### Layer 2: Token Compression (saves on every request)
|
|
105
|
+
|
|
106
|
+
Even when a request does go to Claude, ClawRouter reduces the tokens you pay for. The proxy runs a multi-layer compression pipeline on your request **before** sending it to the provider — and you pay based on the **compressed** token count, not the original.
|
|
107
|
+
|
|
108
|
+
**How it works:**
|
|
109
|
+
|
|
110
|
+
| Compression Layer | What It Does | Savings |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| **Deduplication** | Removes duplicate messages in conversation history | 2-5% |
|
|
113
|
+
| **Whitespace normalization** | Strips excess whitespace, trailing spaces, empty lines | 3-8% |
|
|
114
|
+
| **JSON compaction** | Minifies JSON in tool calls and results | 2-4% |
|
|
115
|
+
|
|
116
|
+
These three layers are **enabled by default** and are completely safe — they don't change semantic meaning. The compression triggers automatically on requests larger than 180KB (common in agent workflows and long conversations).
|
|
117
|
+
|
|
118
|
+
**For agent-heavy workloads** (long tool outputs, multi-turn conversations), the savings are even larger. An optional observation compression layer can reduce massive tool outputs by up to 97% — turning 10KB of verbose log output into 300 characters of essential information.
|
|
119
|
+
|
|
120
|
+
**Typical combined savings: 7-15% fewer tokens per request.** On long-context agent workloads: 20-40%.
|
|
121
|
+
|
|
122
|
+
This matters most on expensive models. If you're sending a 50K-token agent conversation to Claude Sonnet, 15% compression saves ~$0.03 per request — that adds up to real money at scale.
|
|
123
|
+
|
|
124
|
+
### Layer 3: Response Cache + Request Deduplication (saves 100%)
|
|
125
|
+
|
|
126
|
+
ClawRouter caches responses locally. If your app sends the same request within 10 minutes, you get an instant response at **zero cost** — no API call, no tokens billed.
|
|
127
|
+
|
|
128
|
+
This is more common than you'd think:
|
|
129
|
+
- **Retry logic** — Your app retries on timeout. Without dedup, you pay twice. With ClawRouter, the retry resolves from cache instantly.
|
|
130
|
+
- **Redundant requests** — Multiple users or processes asking the same thing? One API call, multiple responses.
|
|
131
|
+
- **Agent loops** — Agentic frameworks often re-query with identical context. Cache catches these.
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Request 1: "Summarize this document" → API call → $0.02 → cached
|
|
135
|
+
Request 2: "Summarize this document" → cache hit → $0.00 → instant
|
|
136
|
+
Request 3: "Summarize this document" → cache hit → $0.00 → instant
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The deduplicator also catches in-flight duplicates: if two identical requests arrive simultaneously, only one goes to the provider. Both callers get the same response.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## The Cost Math (Honest Numbers)
|
|
144
|
+
|
|
145
|
+
**10,000 mixed requests per month**, averaging 1,000 input tokens and 500 output tokens each.
|
|
146
|
+
|
|
147
|
+
### Direct Anthropic API
|
|
148
|
+
|
|
149
|
+
| Approach | Input (10M tokens) | Output (5M tokens) | Monthly Total |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| All Claude Sonnet | $30.00 | $75.00 | **$105.00** |
|
|
152
|
+
| All Claude Opus | $50.00 | $125.00 | **$175.00** |
|
|
153
|
+
|
|
154
|
+
### ClawRouter (real paying-user distribution)
|
|
155
|
+
|
|
156
|
+
| Tier | % Requests | Routed To | Cost |
|
|
157
|
+
|---|---|---|---|
|
|
158
|
+
| Cheap models | 34.5% | gemini-flash-lite | $0.76 |
|
|
159
|
+
| Mid-tier | 16.2% | kimi-k2.5 | $2.43 |
|
|
160
|
+
| **Claude (complex)** | **22.7%** | **claude-sonnet-4.6** | **$17.44** |
|
|
161
|
+
| Code models | 6.1% | grok-code-fast | $0.52 |
|
|
162
|
+
| Reasoning | 2.9% | grok-reasoning | $0.03 |
|
|
163
|
+
| Haiku | 2.7% | claude-haiku-4.5 | $0.76 |
|
|
164
|
+
| Free | 2.1% | nvidia/gpt-oss-120b | $0.00 |
|
|
165
|
+
| Other | 12.8% | various | $1.18 |
|
|
166
|
+
| **Subtotal (routing)** | | | **$23.12** |
|
|
167
|
+
| Token compression (~10%) | | | **-$2.31** |
|
|
168
|
+
| Cache hits (~5% est.) | | | **-$1.16** |
|
|
169
|
+
| **Final Total** | | | **~$19.65** |
|
|
170
|
+
|
|
171
|
+
### The Bottom Line
|
|
172
|
+
|
|
173
|
+
| Approach | Monthly Cost | Savings |
|
|
174
|
+
|---|---|---|
|
|
175
|
+
| Direct Claude Sonnet | $105.00 | — |
|
|
176
|
+
| Direct Claude Opus | $175.00 | — |
|
|
177
|
+
| **ClawRouter** | **~$20** | **~81% vs Sonnet, ~89% vs Opus** |
|
|
178
|
+
|
|
179
|
+
Breaking down where the savings come from:
|
|
180
|
+
|
|
181
|
+
| Savings Source | Estimated Impact | How |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| **Smart routing** | ~68% cost reduction | 77% of requests → cheaper models |
|
|
184
|
+
| **Token compression** | ~7-15% on remaining cost | Fewer tokens billed per request |
|
|
185
|
+
| **Response cache** | ~3-5% additional | Repeat requests cost $0 |
|
|
186
|
+
| **Request dedup** | Prevents overcharges | Retries don't double-bill |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## How the 14-Dimension Router Works
|
|
191
|
+
|
|
192
|
+
ClawRouter runs a weighted scoring algorithm on every prompt — entirely locally, in under 1 millisecond, zero external API calls.
|
|
193
|
+
|
|
194
|
+
| Dimension | Weight | Detects |
|
|
195
|
+
|---|---|---|
|
|
196
|
+
| Reasoning Markers | 0.18 | "prove," "step by step," "analyze" |
|
|
197
|
+
| Code Presence | 0.15 | `function`, `class`, `import`, code blocks |
|
|
198
|
+
| Multi-Step Patterns | 0.12 | "first...then," numbered steps |
|
|
199
|
+
| Technical Terms | 0.10 | Domain-specific vocabulary |
|
|
200
|
+
| Token Count | 0.08 | Short vs. long context |
|
|
201
|
+
| Question Complexity | 0.05 | Nested or compound questions |
|
|
202
|
+
| Creative Markers | 0.05 | Creative writing indicators |
|
|
203
|
+
| Constraint Count | 0.04 | "max," "minimum," "at most" |
|
|
204
|
+
| Imperative Verbs | 0.03 | "create," "generate," "build" |
|
|
205
|
+
| Output Format | 0.03 | JSON, YAML, table, markdown |
|
|
206
|
+
| Simple Indicators | 0.02 | "what is," "define," "translate" |
|
|
207
|
+
| Reference Complexity | 0.02 | "the code above," "the docs" |
|
|
208
|
+
| Domain Specificity | 0.02 | Quantum, genomics, etc. |
|
|
209
|
+
| Negation Complexity | 0.01 | "don't," "never," "avoid" |
|
|
210
|
+
|
|
211
|
+
The weighted score maps to four tiers:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Score < 0.0 → SIMPLE → Free or ultra-cheap models
|
|
215
|
+
Score 0.0–0.3 → MEDIUM → Mid-tier (Kimi K2.5, DeepSeek)
|
|
216
|
+
Score 0.3–0.5 → COMPLEX → Frontier (Claude Sonnet, Gemini Pro)
|
|
217
|
+
Score > 0.5 → REASONING → Specialized (Grok Reasoning, DeepSeek-R)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Multilingual support across 9 languages. Tool-calling and vision requests automatically filter for compatible models. If the primary model fails, a fallback chain tries alternatives before returning an error.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Getting Started: 3 Minutes
|
|
225
|
+
|
|
226
|
+
### Step 1: Install
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npx @blockrun/clawrouter
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Starts a local proxy on port 8402. Auto-generates a crypto wallet. Done.
|
|
233
|
+
|
|
234
|
+
### Step 2: Update Your Code
|
|
235
|
+
|
|
236
|
+
**Python** — change 2 lines:
|
|
237
|
+
```python
|
|
238
|
+
from openai import OpenAI
|
|
239
|
+
|
|
240
|
+
client = OpenAI(
|
|
241
|
+
base_url="http://localhost:8402/v1", # ← was: https://api.anthropic.com
|
|
242
|
+
api_key="unused" # ← ClawRouter handles auth
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
response = client.chat.completions.create(
|
|
246
|
+
model="blockrun/auto", # ← was: claude-sonnet-4.6
|
|
247
|
+
messages=[{"role": "user", "content": "Your prompt here"}]
|
|
248
|
+
)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**TypeScript** — same idea:
|
|
252
|
+
```typescript
|
|
253
|
+
import OpenAI from "openai";
|
|
254
|
+
|
|
255
|
+
const client = new OpenAI({
|
|
256
|
+
baseURL: "http://localhost:8402/v1",
|
|
257
|
+
apiKey: "unused",
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
const response = await client.chat.completions.create({
|
|
261
|
+
model: "blockrun/auto", // or "eco" for max savings, "premium" for best quality
|
|
262
|
+
messages: [{ role: "user", content: "Your prompt here" }],
|
|
263
|
+
});
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Routing profiles:**
|
|
267
|
+
- `blockrun/auto` — Balanced cost/quality (default)
|
|
268
|
+
- `blockrun/eco` — Maximum savings (free tier aggressively)
|
|
269
|
+
- `blockrun/premium` — Best quality (Opus/Sonnet/GPT-5)
|
|
270
|
+
- `blockrun/free` — Free tier only (gpt-oss-120b)
|
|
271
|
+
|
|
272
|
+
### Step 3: Fund (optional)
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Your wallet address is shown on startup.
|
|
276
|
+
# Send any amount of USDC on Base chain to that address.
|
|
277
|
+
# $1 is enough for hundreds of requests.
|
|
278
|
+
# Or start with $0 — the free tier model works immediately.
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
That's it. Your existing code works. Your output quality on complex tasks stays the same.
|
|
282
|
+
|
|
283
|
+
### Check Your Savings
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
$ /stats 7
|
|
287
|
+
|
|
288
|
+
╔═══════════════════════════════════════════════════════╗
|
|
289
|
+
║ ClawRouter v0.12.12 — Usage Statistics ║
|
|
290
|
+
╠═══════════════════════════════════════════════════════╣
|
|
291
|
+
║ Period: last 7 days ║
|
|
292
|
+
║ Total Requests: 1,523 ║
|
|
293
|
+
║ Actual Cost: $12.35 ║
|
|
294
|
+
║ Baseline Cost: $156.23 (if all went to Opus 4.6) ║
|
|
295
|
+
║ Saved: $143.89 (92.1%) ║
|
|
296
|
+
╠═══════════════════════════════════════════════════════╣
|
|
297
|
+
║ SIMPLE ████████████████ 50.2% (765 reqs) ║
|
|
298
|
+
║ MEDIUM ██████████ 28.5% (434 reqs) ║
|
|
299
|
+
║ COMPLEX ██████ 15.0% (228 reqs) ║
|
|
300
|
+
║ REASONING ██ 6.3% (96 reqs) ║
|
|
301
|
+
╚═══════════════════════════════════════════════════════╝
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Why ClawRouter Instead of OpenRouter?
|
|
307
|
+
|
|
308
|
+
| | ClawRouter | OpenRouter |
|
|
309
|
+
|---|---|---|
|
|
310
|
+
| **Smart routing** | Automatic — 14-dimension scorer picks the model | Manual — you pick the model |
|
|
311
|
+
| **Token optimization** | Built-in compression (7-15% savings) | None |
|
|
312
|
+
| **Response caching** | Local cache, repeat requests = $0 | None |
|
|
313
|
+
| **Request dedup** | Retries don't double-bill | None |
|
|
314
|
+
| **Routing latency** | <1ms (local, on your machine) | Additional network hop |
|
|
315
|
+
| **Payments** | Non-custodial USDC on Base (your wallet, your keys) | Prepaid credit balance (custodial) |
|
|
316
|
+
| **Free tier** | NVIDIA GPT-OSS-120B (always available) | No free models |
|
|
317
|
+
| **API keys** | Zero — proxy handles all auth | You manage keys per provider |
|
|
318
|
+
| **Algorithm** | Open-source, MIT license, modify it yourself | Proprietary |
|
|
319
|
+
|
|
320
|
+
The fundamental difference: **OpenRouter is a model marketplace where you choose.** ClawRouter is an intelligent proxy that **chooses for you**, compresses your tokens, caches your responses, and pays per-request with crypto from your own wallet.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## TL;DR
|
|
325
|
+
|
|
326
|
+
| What | Details |
|
|
327
|
+
|---|---|
|
|
328
|
+
| **Problem** | You pay Claude $3-25/M tokens on every request, but ~70% don't need Claude |
|
|
329
|
+
| **Solution** | ClawRouter auto-routes + compresses + caches |
|
|
330
|
+
| **Savings** | ~81% vs Sonnet, ~89% vs Opus |
|
|
331
|
+
| **How** | Routing (68%) + token compression (7-15%) + caching (3-5%) |
|
|
332
|
+
| **Code change** | 2 lines (base_url + model name) |
|
|
333
|
+
| **Setup time** | 3 minutes |
|
|
334
|
+
| **Quality tradeoff** | None — complex tasks still go to Claude |
|
|
335
|
+
| **Open source** | MIT license, local proxy, non-custodial payments |
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
# Start saving now:
|
|
339
|
+
npx @blockrun/clawrouter
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Links:**
|
|
343
|
+
- [ClawRouter on GitHub](https://github.com/blockrunai/ClawRouter) — MIT License
|
|
344
|
+
- [BlockRun](https://blockrun.ai) — AI model marketplace
|
|
345
|
+
- [x402 Protocol](https://www.x402.org/) — Per-request crypto payments for AI
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
*Cost data based on real production traffic from paying users across 20,000+ requests, March 2026. Savings vary by workload — agent-heavy and long-context workloads see larger compression benefits. ClawRouter is open-source and part of the BlockRun ecosystem.*
|