Get a key
Connect a wallet on Robinhood Chain, sign once, and you get an API key. No email, no card.
1export ROUTER_KEY=rk_live_…9f3a
2export ROUTER=https://api.router.family/v1
First call
The API is OpenAI-compatible. Point any OpenAI SDK at the base URL and pick a model by its id.
1curl $ROUTER/chat/completions \
2 -H "Authorization: Bearer $ROUTER_KEY" \
3 -d '{
4 "model": "anthropic/claude-sonnet-5.5",
5 "messages": [{"role": "user", "content": "gm"}]
6 }'
Python and Node
Change base_url. Everything else in your code stays the same, streaming and tools included.
1from openai import OpenAI
2router = OpenAI(base_url="https://api.router.family/v1", api_key=KEY)
3
4import OpenAI from "openai";
5const router = new OpenAI({ baseURL: "https://api.router.family/v1", apiKey: KEY });
Fallbacks
List backup models. A 429 or 5xx at the first becomes a 200 at the next, at the price you set.
1{
2 "model": "anthropic/claude-sonnet-5.5",
3 "models": ["openai/gpt-6.1-sol", "google/gemini-3.8-flash"],
4 "route": "fastest",
5 "max_cost_usd": 0.02
6}
Top up
Send any Pons coin, ETH or a stock token. It sells on its own curve and the dollars land on your key as credits.
1const quote = await router.read.quote([TARDI, amount]);
2await tardi.write.approve([router.address, amount]);
3await router.write.topUp([TARDI, amount, quote * 995n / 1000n, keyHash]);
4// inside: PonsCurve.sell(tokensIn, minOut, address(this))
MCP
Use the router from Claude Code, Cursor or any MCP client. Tools: list_models, chat, balance, top_up_quote.
1{ "mcpServers": { "router": {
2 "url": "https://api.router.family/mcp",
3 "headers": { "Authorization": "Bearer rk_live_…9f3a" }
4} } }
Caps and errors
Set a daily cap per key. 402 means the balance is empty, 429 means every fallback is busy.
1{ "daily_cap_usd": 5 }
2
3402 balance empty, top up
4429 all routes busy, retry after 2 s