x402-gateway.blackwoodstate8.workers.dev/v1/random
Use when you need a random number generator, dice rolls, a coin flip, a uuid or random bytes that no one can predict. Do not use for verifiable on-chain randomness (VRF) or reproducible seeded sequences. Returns JSON with cryptographically secure random values: integers in a range, dice rolls, coin flips, UUIDs or hex bytes, from the Workers Web Crypto CSPRNG for 0.005 USDC per call. Typical respo
POST
https://x402-gateway.blackwoodstate8.workers.dev/v1/randomUptime100% of 4 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://x402-gateway.blackwoodstate8.workers.dev/v1/random", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"count":2,"kind":"dice","sides":6}),
});
console.log(await res.json());Example input
{
"count": 2,
"kind": "dice",
"sides": 6
}