RailPay
DocsOpen app
Open app

AI compute

Pay for AI computeper request, in USDG.

Agents pay for inference, GPU and data APIs one call at a time over x402, inside the limits you set. Providers charge per call, with no accounts or cards for their buyers, and get paid in USDG on Robinhood Chain.

Illustrative · example.com host
research-botAgent wallet · its own policy
Per-request maxDaily capAllowed hosts
→ POST /v1/generate
inference.example.comModel API · createPaywall
InferenceGPUUSDG · eip155:4663
x402 v2 · exact · eip155:4663
  • →POST /v1/generate

Two sides, one rail

Agents buy compute.Providers sell it per call.

Any API that answers 402 with an x402 v2 exact requirement for USDG on eip155:4663 can be paid this way. RailPay is the payment rail; it does not run the API.

Live

For agents: pay per request

  • Pay any x402 API (AI inference, GPU compute, data) in USDG from the agent wallet.
  • The policy is checked before anything is signed: per-request max, daily cap, allowed hosts and allowed recipients.
  • No ETH needed for x402 payments: the provider or its facilitator pays the gas.
  • Every attempt is logged, including the ones the policy blocked.
agent.ts · pays any x402 API that accepts USDG on eip155:4663
import { RailPay, withPayment } from "railpay-sdk";

const railpay = new RailPay({ apiKey: process.env.RAILPAY_AGENT_KEY });
const paidFetch = withPayment(railpay, { maxAmount: "0.05" });

// The 402 is answered from the agent wallet, inside its policy.
// POST bodies are kept and sent again on the retry.
const res = await paidFetch("https://inference.example.com/v1/generate", {
  method: "POST",
  body: JSON.stringify({ prompt: "Summarize this filing" }),
});
Live

For providers: charge per call

  • Wrap your endpoint with createPaywall from the open-source railpay-sdk. You set the price, from 0.001 USDG.
  • No accounts or cards for your buyers. The payment rides on the request.
  • Settlement is read back from the chain before your handler runs.
  • USDG goes straight to your wallet.
worker.ts · your model, your price
import { createPaywall } from "railpay-sdk";

const paywall = createPaywall({
  payTo: "0xYourWallet",
  price: "0.01", // you set it, in USDG per call (at least 0.001)
  description: "Model inference",
});

// The handler runs only after the USDG transfer is read back from the chain.
export default {
  fetch: (request: Request) => paywall.handle(request, () => runInference(request)),
};

One call, start to finish.Same x402 flow as any paid resource.

  1. 1

    Call the model API

    The agent sends its request. Without a payment the API answers 402 with its price in USDG.

  2. 2

    Policy, then signature

    RailPay checks the agent's policy and, if it passes, signs an EIP-3009 authorization for exactly that price.

  3. 3

    Settle

    The agent retries with the signature. The provider settles it on Robinhood Chain through an x402 facilitator.

  4. 4

    Serve

    The provider reads the transfer back from the chain, runs the job and returns the output with the transaction.

Planned

Metered billing for long jobs.Not built yet.

x402 today is one payment per request. Per-second or streaming billing for long GPU jobs is part of recurring and streaming payments (utility 11), which is planned and not in the app or the SDK.

See the roadmap
Planned

Recurring and streaming payments

Subscriptions and per-second streaming, such as metered billing for long GPU jobs. No date.

What RailPay is,and what it is not.

Not a compute provider
RailPay does not run GPUs or models. It moves the USDG between the agent and whoever runs the API.
No marketplace or listings
There is no catalog of providers. An agent pays the APIs you point it at, and allowed hosts can pin that list.
Your price, your wallet
Providers set their own price per call. RailPay charges no fee today; pricing is TBD.
Agent wallets are custodial
RailPay keeps agent keys, encrypted, to enforce the policy. Keep only what the agent needs in it.
One chain, one asset
USDG on Robinhood Chain (chain id 4663). Other chains and stablecoins are TBD.
Open source
The SDK and MCP server are MIT licensed. See Developers.

Let your agents buy compute.One request at a time.

Settled in USDG on Robinhood Chain. Every payment is its own transaction, open on the explorer.