Guide · May 25, 2026
Route Claude Code through the AntSeed P2P network
Claude Code, Aider, and any harness that speaks the Anthropic or OpenAI API can route inference through AntSeed with two environment variables. No API key. No account signup. Requests go peer-to-peer to independent providers and settle in USDC on Base.
Why this matters
- No vendor account required. Your buyer wallet is your identity. Fund it with USDC on Base and start sending requests.
- Provider neutrality. The buyer’s router auto-selects providers based on price, latency, and reputation. If one goes down, the next one picks up the request — invisible to your harness.
- USDC settlement. Per-session billing on Base. No invoices, no monthly bills, no credit card on file. You deposit what you want to spend.
- Same API, different pipe. The AntSeed buyer exposes standard
/v1/messages(Anthropic) and/v1/chat/completions(OpenAI) endpoints. Any tool that respectsANTHROPIC_BASE_URLorOPENAI_BASE_URLworks without code changes.
The five-minute setup
1.Install the AntSeed CLI
Requires Node.js 20+. Works on macOS, Linux, and Windows (WSL).
npm install -g @antseed/cliVerify with antseed --version. AntStation Desktop is also available for macOS and Windows; it runs the buyer on port 8378 instead of 8377.
2.Start the buyer
antseed buyer startThis starts a local proxy at http://localhost:8377 that speaks both the Anthropic Messages API and the OpenAI Chat Completions API. On first run, it generates a secp256k1 key at ~/.antseed/identity.key — this is your on-chain wallet. Back it up.
3.Fund your wallet
antseed paymentsOpens a browser at localhost:3118. Connect any wallet (MetaMask, Coinbase Wallet, etc.), deposit USDC on Base. A few dollars is enough to start. Anyone can deposit on behalf of a buyer — useful for team treasuries.
Check your balance anytime with antseed buyer balance:
$ antseed buyer balance Wallet: 0xDDB6...c61442 USDC Balance (wallet): 6.003914 USDC Deposits Account: Available: 1.0 USDC Reserved: 0.0 USDC
4.Point Claude Code at the buyer
export ANTHROPIC_BASE_URL=http://localhost:8377
claudeThat’s it. Claude Code reads ANTHROPIC_BASE_URL and sends all inference requests to your local buyer instead of Anthropic’s API. The buyer finds a provider on the AntSeed network that serves the requested model, opens a payment channel, and proxies the response back.
Same setup for Aider
Aider also reads ANTHROPIC_BASE_URL. Point it at the buyer and specify a model available on the network:
export ANTHROPIC_BASE_URL=http://localhost:8377
aider --model claude-sonnet-4-6Any tool that respects OPENAI_BASE_URL works the same way — the buyer serves OpenAI-compatible endpoints at the same address.
Verify with curl
Before wiring up a full harness, confirm the buyer is working:
curl http://localhost:8377/v1/messages \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello from AntSeed"}]
}'You should get a standard API response. No API key header needed — the buyer handles auth via your on-chain identity.
Example response from a live buyer:
$ curl localhost:8377/v1/chat/completions \
-H "content-type: application/json" \
-d '{"model":"deepseek-chat","max_tokens":100, \
"messages":[{"role":"user","content":"Write a haiku about P2P networks."}]}'
{
"id": "chatcmpl-RAmS8CoJYaJIdOQzG4kiStcG",
"model": "deepseek-chat",
"choices": [{
"message": {
"role": "assistant",
"content": "Nodes hum in the dark,\nShared paths weave through silent streams—\nTrust blooms, link by link."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 23,
"estimated_cost": 0.0000036
}
}What just happened
When Claude Code sends a request to localhost:8377/v1/messages, the buyer:
- Looks up providers on the AntSeed DHT that advertise the requested model (e.g.
claude-sonnet-4-6). - Scores them by price (30%), latency (25%), capacity (20%), reputation (10%), freshness (10%), and reliability (5%) — then picks the best match.
- Opens a payment channel on Base, locking a small USDC reserve for the session.
- Forwards the request peer-to-peer. The provider runs inference and streams the response back.
- Meters token usage. When the session reserve runs out, it settles on-chain and opens a new one transparently.
If a provider fails mid-request, the router switches to the next-best candidate. Because the API is stateless, this is invisible to your harness. Here’s what the buyer looks like with an active session:
$ antseed buyer status Metric Value Connection state connected Proxy port 8377 Pinned peer 80d1e7b9b6eb...46288cd Deposits available 0.0 USDC Deposits reserved 1.0 USDC Active channels 1 Wallet address 0xDDB6...c61442
Claude Code / Aider / any harness
│
│ ANTHROPIC_BASE_URL or OPENAI_BASE_URL
▼
local buyer (localhost:8377)
│
│ auto-routed, encrypted P2P
▼
provider on AntSeed network
│
│ inference + token metering
▼
USDC settlement on BaseWhat does it cost?
Prices are set by individual providers and vary. Here are three providers currently serving Claude models on the network, pulled live from the provider directory (as of May 25, 2026):
| Model | Provider | Input $/M tokens | Output $/M tokens |
|---|---|---|---|
| claude-sonnet-4-6 | Clanker Seller | $0.16 | $0.65 |
| claude-sonnet-4-6 | Flash | $1.00 | $5.00 |
| claude-sonnet-4-6 | Open Ant | $3.60 | $18.00 |
| claude-opus-4-6 | Clanker Seller | $0.60 | $1.00 |
| claude-opus-4-6 | Flash | $5.00 | $25.00 |
| claude-opus-4-6 | Open Ant | $7.50 | $37.50 |
Prices drift as providers update their rates. Check the provider directory for current pricing. The buyer’s router factors price into its selection — cheaper providers rank higher, all else being equal.
What works and what doesn’t yet
Works
- Single-turn and multi-turn messages
- Streaming responses
- Both Anthropic and OpenAI API formats
- Automatic provider selection and failover
- Claude Sonnet 4.6, Opus 4.6, Opus 4.7, Haiku 4.5
- Non-Claude models (DeepSeek, GPT-5.x, Gemini, etc.)
Rough edges
- Tool use (function calling) — support varies by provider
- Very long contexts — some providers cap below 200k tokens
- Provider quality — not all providers deliver equal latency or reliability; check ghost rates on the directory
- No usage dashboard yet — track spend via
antseed buyer balanceand on-chain settlement events
Other harnesses
Any tool that lets you override the API base URL can route through AntSeed. The key env vars:
| Harness | Env var | Value |
|---|---|---|
| Claude Code | ANTHROPIC_BASE_URL | http://localhost:8377 |
| Aider | ANTHROPIC_BASE_URL | http://localhost:8377 |
| Cline / Continue | OPENAI_BASE_URL | http://localhost:8377 |
| Any OpenAI-compatible | OPENAI_BASE_URL | http://localhost:8377 |
AntStation Desktop runs on port 8378. If using the desktop app, replace 8377 with 8378.
Get started
Questions, bugs, or rough edges? Open a GitHub issue or ping @AntFeed on X.