RentAnLLM

Rent open LLMs running on people's own machines. AI agents pay per request in USDC.

RentAnLLM

Created At

ETHGlobal Mumbai

Project Description

RentAnLLM is an inference market for AI agents. Anyone can sell an open model (Llama, FLUX and others) running on their own machine, and agents buy it one request at a time, paying the seller directly in USDC on Hedera over x402. No account, no API key, no subscription.

How a request works:

  1. A seller runs our node agent next to Ollama and lists a model with a price.
  2. An agent calls our OpenAI-compatible endpoint and gets back an HTTP 402 quoting the cheapest online seller.
  3. The agent signs a USDC transfer to that seller and sends the request again.
  4. The seller's machine answers, the payment settles on Hedera, and the answer comes back with the transaction ID as a receipt. If the seller fails, nothing is charged.

You can use it from any OpenAI client, from a fully autonomous CLI agent, or from Claude Desktop / Claude Code / Cursor through our hosted MCP connector, which gives each user their own agent wallet.

Why you can trust it:

  • Spending limits (daily budget, max per request, per-seller limits, allowlist, pause) are enforced by the gateway before any money moves.
  • Small payments go through on their own, and anything above a threshold needs the human behind the agent to approve it with World ID.
  • Every payment is logged to a Hedera Consensus Service topic that anyone can audit.
  • Sellers have an onchain identity and an uptime/latency reputation (ERC-8004 on Hedera) that they can't write themselves.
  • Live offers and receipts are public on Arkiv, and the market reads them from there.

Live at rentanllm.xyz. Example settled payment: https://hashscan.io/testnet/transaction/0.0.9185802%401793922799.072231068

How it's Made

TypeScript monorepo on Bun, with almost all the backend written in Effect. Five apps:

  • Gateway (Docker on a VPS): the x402 market. OpenAI-compatible chat and image endpoints, pricing, verify/settle through the x402.org facilitator, and a WebSocket tunnel to seller machines, so a seller behind home NAT never opens a port.
  • Node agent: runs beside Ollama or stable-diffusion.cpp on the seller's machine. Our demo seller is an RTX 3090 serving llama3.1:8b and FLUX.2.
  • API (Vercel): seller accounts (SIWE), listings, budgets, and a remote MCP server with OAuth 2.1. On first connect it creates a Hedera account for the user and stores the key encrypted.
  • MCP client + autonomous buyer: signs payments with @x402/hedera.
  • Web (Next.js): market, seller console, budgets. Designed in Paper first. Postgres (Drizzle) and Redis underneath, Grafana/Loki/Tempo for tracing paid requests.

How we used each partner:

  • Hedera: HTS USDC for the payments themselves. The facilitator pays the HBAR fee, so agents only ever need USDC, and money goes buyer → seller without us holding it. HCS topic 0.0.11332573 is the spend audit log. ERC-8004 registries on Hedera EVM plus an HCS-14 agent ID give sellers identity, and a separate monitor wallet posts their reputation every 6 hours. The mirror node checks a seller can actually receive USDC before they list.
  • World ID: the OIDC device flow, with the ID token validated on our server. Each approval is tied to one exact amount and payee and works only once. The npm SDK was out of date, so we ported its logic onto oauth4webapi + jose.
  • Arkiv: the gateway writes offers every 3 minutes and one receipt per sale, and the homepage, /v1/models and Claude's list_models all read from Arkiv instead of our db.

Hacky bits and things that bit us:

  • Pay only on delivery. Our first version settled before serving, so when our image server ran out of GPU memory the buyer paid for nothing. Now we verify up front and settle the moment the seller starts answering, before any output is sent. A seller failure costs nothing, and a failed settlement returns no output.
  • Images pretend to be text: one image is billed as a million output tokens, so receipts, budgets and Arkiv reuse the chat code untouched.
  • Anyone can write a fake "rentanllm.offer" on Arkiv, so every reader only trusts entities owned by our writer wallet (ownedBy).
  • Circle's faucet silently dropped our first claim because the wallet wasn't associated with USDC yet, and the 2-hour limit blocked a retry. Sellers hit the same trap, so the console now checks and offers one-click association.
  • Paying needs only USDC, but registering as an ERC-8004 seller needs HBAR, so a new seller holding only USDC fails. Still on our list.
background image mobile

Join the mailing list

Get the latest news and updates

RentAnLLM | ETHGlobal