Routstr — Decentralized AI powered by Bitcoin and Nostr
Routstr lets you pay for AI with Bitcoin, per request, using Cashu eCash. Point your existing OpenAI-compatible client to a Routstr node, pass a token, get answers. No signups, no credit cards, no KYC.
The problem (why this matters)
- Gatekeepers everywhere: Access to powerful models lives behind platforms, accounts, and opaque approvals. There’s no open market where anyone can sell capacity and anyone can buy it.
- No true micropayments: Today it’s monthly plans, prepayments, and thresholds. You can’t easily pay a few sats for a single call.
- Friction + doxxing: Accounts, cards, KYC. Your usage is linked to identity. Builders lose users at signup. Users lose privacy at checkout.
- Custodial choke points: Centralized billing concentrates risk and gatekeeping. If you’re outside “supported regions,” you’re out of luck.
The fix (what Routstr is)
Routstr is a decentralized network of nodes that sit between your app and any OpenAI-compatible provider. It turns AI usage into a sats-denominated, pay-as-you-go flow using the Cashu eCash protocol.
- Pay with eCash (Cashu): Send bearer tokens backed by Bitcoin (via Lightning mints). It’s instant, private, and made for tiny payments.
- Drop-in for OpenAI clients: Keep your SDKs. Just change
base_urlto a Routstr node and pass a key/token. - Permissionless supply: Anyone can run a node, set pricing, and publish presence via Nostr. Clients discover and route.
- Privacy with eCash + Tor: eCash is unlinkable. And with optional Onion endpoints you are protected. You don’t need an account to try a model.
- No vendor lock-in: The open-source protocol allows you to seamlessly switch between Routstr nodes as you don't have an account anyway.
- Protected by the Nostr social graph: Nostr allows our users to discover and find information on good and bad Routstr providers.
How it works (30 seconds)
- You get a Cashu token (think: digital cash IOU you can hand to anyone).
- Your client sends an AI request to a Routstr node with either:
- a Cashu token directly as the
Authorizationheader, or - a Routstr API key backed by a prior deposit.
- a Cashu token directly as the
- The node verifies and redeems the token with a Cashu mint, tracks your balance, forwards your request upstream, and returns the response.
- The exact cost in sats is deducted based on the model and tokens used. You can withdraw remaining balance as eCash.
Note: Per-request “send token in, get change back” headers are on the roadmap; today you can already use a Cashu token directly or a pre-funded API key.
Why eCash (Cashu)?
- Micropayments that feel like cash: No card rails, no minimums, no chargebacks.
- Instant settlement: Backed by Lightning via mints.
- Privacy: Bearer tokens are unlinkable by default.
Who is this for?
- Bitcoiners who want sats in/sats out AI.
- AI builders who hate signup funnels and want global reach and lower churn.
- Node operators/resellers who want to sell AI capacity with custom pricing and margins.
- Privacy-minded users who don’t want accounts for every experiment.
What can you connect to?
Anything that speaks the OpenAI API format (chat completions today; more endpoints expanding). Routstr forwards the request, tracks usage, and handles billing. Models and pricing are configurable and can auto-update.
Using it (keep your existing client)
Python example (works with the official OpenAI SDK):
from openai import OpenAI
client = OpenAI(
api_key="cashuAeyJ0..." or "sk-...", # Cashu token or Routstr API key
base_url="https://api.routstr.com/v1" # or any other node url
)
resp = client.chat.completions.create(
model="qwen/qwen3-max",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
Command-line with curl:
curl https://your-routstr-node.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cashuAeyJ0..." \
-d '{
"model": "openai/gpt-5",
"messages": [{"role": "user", "content": "Hello"}]
}'
Run your own node (become the market)
Spin up with Docker, point to your upstream provider, and choose Cashu mints:
docker run -d \
--name routstr \
-p 8000:8000 \
-e UPSTREAM_BASE_URL=https://api.openai.com/v1 \
-e UPSTREAM_API_KEY=sk-... \
-e CASHU_MINTS=https://mint.minibits.cash/Bitcoin \
-e ADMIN_PASSWORD=strong-dashboard-password \
ghcr.io/routstr/core:latest
Then check: curl http://localhost:8000/v1/info
Optional: publish your node on Nostr, enable Tor, set your own model list and pricing. See docs in docs/getting-started/.
FAQs
- Is this only for OpenAI? No. It’s for any OpenAI-compatible upstream (Anthropic via adapters, open models, etc.). You control the upstream and models.
- Do I need an account? No. You can supply a Cashu token directly as your credential. Nodes may also offer pre-funded API keys.
- How are costs calculated? Model-based token pricing (USD → sats) with transparent fees. Each response includes usage and cost headers.
- Can I withdraw? Yes. Remaining balance can be withdrawn back to eCash.
- What about per-request change? Header-based per-request flow is planned; direct token usage and pre-funded keys work today.
Try it now!
- Go to https://chat.routstr.com/ to start chatting with AI.
- Connect a public node (or run your own) and pay with sats.
- Point your existing OpenAI client to
https://<public-node>/v1, pass a Cashu token and periodically top-up here. - If you operate infra, set pricing and list your node on Nostr. Welcome to the permissionless AI marketplace.
This article is a guest post by Routstr.