Ask once. Watch it pay.
A live, OpenAI-compatible router on Robinhood Chain. Everyone gets 5 free questions a day. After that each one is a real 0.005 USDG payment: you sign, Farebox pays the gas, and the exchange panel fills in as it happens.
POST /api/v1/chatfarebox-router
Paying needs a wallet with a little USDG on Robinhood Chain, and a little ETH once for the Permit2 approval. The free allowance needs nothing.
-
Request
POST /api/v1/chatYour message goes to the router as a normal chat-completion request. -
Price
402 Payment RequiredWithout payment the router answers with the exact amount, asset, recipient and window. -
Sign
PAYMENT-SIGNATUREYour wallet signs a Permit2 transfer. No gas and nothing on-chain yet, after a one-time approval. -
Verify & settle
/verify → /settleverify…settle…Farebox checks the signature, simulates the transfer, then broadcasts it on Robinhood Chain and pays the gas. -
Delivered
200 OKThe completion, with the settlement receipt in a header.
Or fund a key your agent spends.
Pay once in USDG and the key carries that balance. Your agent calls Farebox like any OpenAI-compatible API with Authorization: Bearer, and each request is debited 0.005 USDG. No wallet inside the agent.
Funding uses the same 402 → sign → settle flow as a request.
Or skip the browser.
curl · free allowance
curl …/api/v1/chat \ -H 'Farebox-Free: 1' -H 'content-type: application/json' \ -d '{"messages":[{"role":"user","content":"hi"}]}' # 200 with Farebox-Free-Remaining: 4 … then 402 once spent
headless agent · pays per request
AGENT_PRIVATE_KEY=0x… npm run agent -- chat "hi"
# @x402/fetch handles 402 → sign → retry; prints the reply and the receipt