Run a Provider.
Resell 0G Compute or Groq inference behind a stake-backed x402 paywall. Stake HBAR, register on Hedera testnet, and earn USDC for every request the exchange routes to you — from any box, no GPU of your own required.
How Providers Earn
List your inference
- check_circleRun the provider service on any box — VPS, cloud, or your laptop behind a tunnel.
- check_circlePoint it at 0G Compute (the recommended default), Groq, or run without a key for canned demo answers.
- check_circleAdvertise the model you serve and a price in USDC per request.
Stake & register
- check_circleBoot stakes 50 ℏ into the escrow account as a quality bond.
- check_circleRegistration is posted automatically to the HCS registry topic.
- check_circleThe exchange discovers you from Mirror Node and adds you to routing.
Serve & earn
- check_circleCheapest live provider for a model wins the request.
- check_circlex402 settles the payment in USDC before you return the completion.
- check_circleEvery settlement is an on-chain Hedera transaction — no invoicing.
What You Need
Any box — no GPU required. A 0G Compute key (recommended) or a Groq key serves real models; without one, canned answers keep you live.
50 ℏ staked to escrow — slashed if you serve a cheaper model than you advertise.
A testnet account ID + key per provider. The service registers your HCS-14 identity on boot.
Set PROVIDER_PUBLIC_URL to a tunnel or VPS so the exchange can route requests to you.
Let an agent do it.
Onboarding is agent-native. The repo ships a Claude Code skill that walks the setup with you and checks every claim on-chain, and an MCP server that exposes the Hedera work — account, stake, HCS registration, liveness — as callable tools.
Both live in the repo under .claude/ — no marketplace install. Clone it and open it in Claude Code: the onboarding-a-provider skill loads automatically (just invoke it and ask to run a provider), and the MCP server activates once you approve it in /mcp (config below). Other agents: point them at .claude/skills/onboarding-a-provider/SKILL.md.
The tools don't replace pnpm provider — your service still stakes and registers itself on boot. They create the account beforehand and confirm you're routable afterwards. Every tool is idempotent, so a re-run repairs rather than duplicates.
{ "mcpServers": { "agentrouter-provider": {
"command": "pnpm",
"args": ["-s", "--filter", "@agentrouter/provider-mcp", "start"]
} } }
provision_provider({
name: "Acme Inference", backend: "0g", model: "0gm-1.0-35b-a3b",
price: 0.08, publicUrl: "https://acme.example.com"
})
alreadyStaked: true · alreadyRegistered: true
every step links to a Hashscan transaction
MCP Tools
| Tool | What it does |
|---|---|
| create_provider_account | Creates and funds a Hedera Testnet account, writes it to .env |
| stake_collateral | Moves the 50 ℏ quality bond to the escrow account |
| register_provider | Publishes the HCS-14 registration to the registry topic |
| deploy_provider | Health-checks your running endpoint and records its public URL |
| verify_provider_live | Polls the routing table until your wallet shows live |
| provision_provider | Runs all of the above from one config — idempotent, resumable |
Configuration
| Variable | Default | Purpose |
|---|---|---|
| PROVIDER_NAME | Custom Provider | Display name shown in the routing table. |
| PROVIDER_MODEL | 0gm-1.0-35b-a3b | The model you advertise — and must actually serve (0G default; llama-3.3-70b-versatile on groq). |
| PROVIDER_PRICE | 0.10 | Your price per request, in USDC. |
| HEDERA_PROVIDER_ID / _KEY | from pnpm setup-hedera | Account that stakes, registers, and receives payment. |
| PROVIDER_PUBLIC_URL | http://localhost:4025 | Public address the exchange routes to. |
| PROVIDER_BACKEND | 0g | Supply backend: 0g (recommended) | groq | canned. |
| ZEROG_API_KEY | — | 0G Compute inference (recommended). Omitted → canned fallback answers. |
| GROQ_API_KEY | — | Alternative backend (PROVIDER_BACKEND=groq). Omitted → canned fallback. |
| STAKE_HBAR | 50 | Boot-time stake posted to escrow. |
Provider Endpoints
| Method | Path | Returns |
|---|---|---|
| GET | /info | name, model, price, wallet, agentId, url |
| GET | /healthz | liveness probe used by the exchange |
| POST | /v1/chat/completions | 402-gated inference — pay in USDC, receive the completion |
The verifier replays sampled prompts against a witness provider. Serve a cheaper model than you advertise and the divergence is caught — your 50 ℏ stake is seized to the treasury and you're dropped from routing.
Ready to run a provider?
Join as a provider, or clone the repo and run pnpm provider right now.