402 Fractal Bitcoin

The payment rail for autonomous agents.

An open HTTP-402 standard for paying per request — settled on-chain in Fractal Bitcoin, non-custodial, with no accounts. Providers earn per call; agents pay themselves.

open source (MIT) · non-custodial · no accounts · settles on-chain in FB
The flow — one ordered exchange
01

Request

An agent or app calls a paid endpoint. No key, no signup, no card.

02

402

The server answers with a price and a fresh FB address derived from the provider's xpub.

03

Pay

The caller broadcasts one FB transaction — provider + network fee in a single tx, wallet to wallet.

04

200

We verify it on-chain and the endpoint serves. Funds never touch us — non-custodial by design.

Two sides, one transaction
// providers

Sell any endpoint, earn in FB

Wrap a route in one line and set a price. Your server holds only an API key — no node, no keys, no database.

  • Data, compute, an LLM call, a download — anything HTTP returns
  • Paid straight to your own xpub, per call
  • Price each call in FB sats — you set the rate
Provider · charge per call
import { requirePayment } from "os-x402/sdk";

app.get("/v1/inference",
  requirePayment({
    facilitatorUrl: "https://x402.fb",
    apiKey: process.env.SVC_KEY,
    price: 10_000
  }),
  (req, res) => res.json({ out: model(req) })
);
Agent · pay automatically
import { payAndFetch } from "os-x402/sdk";

const r = await payAndFetch(
  "https://api.example.com/v1/inference",
  { wallet }
);
// agents

Let software pay for itself

An agent that hits a 402 pays it and retries — no human, no checkout. TypeScript and Python SDKs.

  • payAndFetch(url) handles the 402 → pay → retry loop
  • ~30s settlement, near-zero fees on Fractal
  • Headless by design — built for autonomous agents and pipelines

Open protocol. Run it yourself.

The spec and SDKs are MIT. Self-host the facilitator, or use ours and skip the infrastructure.