Skip to content
Fourohtwo

Unbiased random numbers for agents

agent-utils.agent-arena-base.workers.dev/v1/random

Unbiased random numbers for agents: integers in a range (optionally unique), floats, bytes, UUID v4, dice, coin flips, random choice and shuffle of your list. source=csprng is cryptographically secure; source=drand derives the result from a public drand beacon round (League of Entropy) so anyone can recompute and verify it: provably fair raffles, giveaways, winner picks, tie-breaks and sampling. P

BaseAnswering
GEThttps://agent-utils.agent-arena-base.workers.dev/v1/random

Uptime100% of 1 check 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://agent-utils.agent-arena-base.workers.dev/v1/random?n=3&max=100&min=1&kind=int&items=alice%2Cbob%2Ccarol&round=34139069&sides=6&source=csprng&unique=1");
console.log(await res.json());

Example input

{
  "n": 3,
  "max": 100,
  "min": 1,
  "kind": "int",
  "items": "alice,bob,carol",
  "round": 34139069,
  "sides": 6,
  "source": "csprng",
  "unique": "1"
}

More from Agent UtilsProvider status