402 Fractal Bitcoin

FB-powered APIs for autonomous agents.

Pay-per-call API endpoints on Fractal Bitcoin. Random numbers, on-chain balances, timestamps — settled in FB, no accounts, no API keys. Built on the x402 protocol.

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

Real-time Fractal data, per call

Random numbers from block hashes, on-chain balance checks, permanent timestamps. Powered by a full Fractal node, billed in FB per request.

  • RNG — verifiable random numbers derived from block hashes
  • Balance — query any Fractal address balance instantly
  • Timestamp — permanently notarize any hash on-chain
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  // sat (FB)
  }),
  (req, res) => res.json({ out: model(req) })
);
Agent · pay automatically
import { payAndFetch } from "os-x402/sdk";

// hits 402, pays a real FB tx, retries
const r = await payAndFetch(
  "https://api.example.com/v1/inference",
  { wallet }
);
console.log(r.data, r.txid);
// 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.

Built on the x402 protocol (MIT) by The Lonely Bit. Self-host or use our gateway.