
Freeride
Free AI inference until it runs out — then the agent pays for itself on Hedera via x402
Demo
About
Coding agents run on free inference tiers, and free tiers run out mid-task. The usual answers are a paid gateway you have to adopt, or a bare x402 meter you have to wire up yourself. FreeRide is neither. FreeRide is a local gateway that keeps the free tier working: it fans every request across OpenRouter, Groq, NVIDIA NIM, HuggingFace, Cerebras and your own Ollama, with automatic failover when one rate-limits or retires a model mid-session. When free genuinely cannot serve, the agent buys the inference it needs — itself, on Hedera, in the same terminal, with no subscription, no top-up and no human in the loop. Free stays free; paying is the escape hatch. Three parts share one wallet. The gateway runs as a local daemon. A native terminal coding agent (a fork of vercel-labs/fx) reads files, writes code and runs commands with every model call served through it — and a paid turn says what it cost right in its footer: "37s (↑22 ↓120) · 0.001 HBAR". And a set of always-on AI teammates ("Bots"), each with its own computer and browser, can buy paywalled resources mid-job: under the job's budget they pay and keep working, over it the run parks on an approval card and waits for a human. That last part is the argument. A bot that wakes you for every cent is not autonomous; one that can spend without limit is not safe. A budget with a human backstop is what makes an unattended agent trustworthy with money. The payer key never leaves the daemon, so a prompt-injected agent can ask for a payment but cannot take the wallet. A funded testnet payer ships in the package, so the whole thing works with no setup.
How it's made
The gateway is Python and FastAPI, serving five wire protocols (OpenAI, Anthropic, OpenAI Responses, Gemini, and Vercel's fx/AI-Gateway dialect) so existing tools work unmodified. The agent is Zig — a fork of vercel-labs/fx with FreeRide as its default provider. The Bots are Next.js on the eve framework. Hedera is the settlement layer. When free inference is exhausted, the daemon builds an x402 v2 PAYMENT-REQUIRED challenge, signs it with the Hedera SDK (@x402/hedera, ECDSA secp256k1) in a Node helper, and posts it to the Blocky402 facilitator's /verify then /settle. That puts a CRYPTOTRANSFER on Hedera testnet — agent wallet debited, merchant credited, facilitator covering the network fee — and only then does the paid request run. The response carries PAYMENT-RESPONSE and the transaction id. Two things worth calling out. First, the payer key is deliberately trapped in the daemon: agents POST payment requirements to a localhost endpoint and get back a ready-to-send PAYMENT-SIGNATURE, so they need no Hedera dependencies and never see the key. That endpoint enforces its own ceiling, a network check and an optional payee allowlist, because unlike the inference lane the caller now chooses both amount and payee. Second, the Bot spending policy is not bolted on — eve's approval hook is an async function with access to the tool input, so the budget check *is* the approval gate, and spend is summed from the durable activity feed rather than a counter, so the number enforced is the number you audit. Hackiest bit: free-first means the cash lane is invisible whenever free works, which made it impossible to demo without deleting your own provider keys. So there's a runtime switch — /paid on inside the agent, flipped in the daemon's memory, deliberately not persisted so an abandoned demo can't leave the wallet spending.