High-quality randomness with verifiable entropy. Pay per use via x402 micropayments—no API keys, no subscriptions.
// x402 payment handled automatically
const response = await fetch(
"https://rng.sociologic.ai/random/int?min=1&max=100",
{
headers: {
"X-402-Payment": paymentToken
}
}
);
const data = await response.json();
// {
// "value": 42,
// "min": 1,
// "max": 100,
// "timestamp": "2026-01-20T...",
// "entropy": {
// "raw": [2847593812],
// "hex": "a9c3f5d4"
// }
// }Built for AI agents that need trustworthy randomness without the overhead of managing API keys.
Uses crypto.getRandomValues() with unbiased rejection sampling for true cryptographic security.
Every paid request returns raw entropy data (Uint32 + hex) so you can verify the randomness source.
Pay only for what you use. USDC on Base mainnet via Coinbase Developer Platform.
Edge-deployed on Cloudflare Workers for consistent low-latency responses worldwide.
Simple REST API with transparent per-call pricing.
/randomRandom float between 0 and 1
/random/int?min=0&max=100Integer within range (max 1M)
/uuidUUID v4 generation
/dice?sides=6Die roll (2-1000 sides)
/coinCoin flip (heads/tails)
/shuffleFisher-Yates shuffle (max 1000 items)
/weightedWeighted random selection
Free endpoints available: GET / (API info) and GET /health (status)
When pseudo-random isn't good enough.
When your agent needs to make random choices—A/B testing, exploration vs exploitation, sampling.
Shuffle candidates, randomize survey questions, or select winners without bias.
Monte Carlo simulations, probabilistic forecasting, and stochastic processes.
Select from options based on probability weights—persona selection, content variation.
The x402 protocol enables seamless micropayments for API calls. When you call a paid endpoint without payment, you receive a 402 response with payment instructions. Complete the USDC payment on Base, include the receipt, and get your response.
No API keys to manage. No monthly subscriptions. Just direct payment for value received.