Humans and AI agents pay your API per request, in stablecoins. Speaks x402 and MPP. Your coding agent integrates it from one prompt.
$ npx goldrail dev
Built by 🟠 Goldsky
Payments verify locally and debit a prepaid balance. Facilitators only see real money moving.
demo runs ~8 requests per settle so you can see it — production is ~1,000
Same wire protocol either way — payers never change anything.
Plain x402: every request settles through your facilitator. Works with any x402 client, nothing to configure.
rails = ["per-request"]
One settle funds a balance; the next ~1,000 requests verify locally and debit it. No facilitator in your hot path.
rails = ["credit", "per-request"]
List both and Goldrail prefers credit, falling back to per-request whenever a balance can't cover the call.
One engine, four shapes. Same behaviour, same config, same panel.
Zero code. Put it in front of anything that speaks HTTP.
goldrail serve
Same pod, localhost hop. Nothing leaves the box unpriced.
goldrail serve --port 4402
In-process middleware. No extra hop, no extra service.
app.use(goldrail())
Keep your gateway. It asks Goldrail per request.
ext_authz · auth_request
Verify locally, debit a balance. Per-request settle stays the default.
x402 and MPP in one 402. New chains and facilitators plug in.
Throttled facilitator reroutes. A lying one gets benched.
Versioned config in your DB. Apply from CI, roll back instantly.
Shadow mode prices traffic before charging. Fail-open per route.
Atomic units, reconciled against the facilitator. Per-payer statements.
Discovery endpoints, built-in MCP, spend-capped payer tools.
Prometheus, OTel traces, Grafana packs included.
SSO, RBAC, tamper-evident audit chain, one-command audit pack.
Ships in the binary. Change a price, flip a rail, roll back — no deploy.
Your coding agent integrates Goldrail — shadow mode on, you flip the switch. Or do it by hand.
The full brief your agent follows: goldrail.dev/integrate.md — wallets, pricing, safe rollout, go-live runbook.
| Coinbase middleware | Cloudflare gateway | Goldrail | |
|---|---|---|---|
| model | embed the protocol | rent the gateway | own the layer |
| protocols | x402 only | x402 only | x402 + MPP |
| funding | settle every request | settle every request | prepaid credit |
| price changes | redeploy | their dashboard | live, versioned |
| ledger | none | their analytics | built in |
| runs where | in your app | their edge | anywhere |
| lock-in | facilitator | platform | none |
Full comparison in docs/comparison.md.
Goldrail runs Goldsky's edge — ~1M paid requests a day. The scars are the spec.