API & MCP

Everything a person can do on Random Generator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Random Generator

Generates random whole or decimal numbers (optionally unique), dice rolls such as 3d6+2, coin flips, picks from a list, shuffles, balanced teams (by optional skill), random dates, strings and UUID v4/v7. Uses cryptographic randomness by default; with a seed the output is reproducible so others can verify a draw.

Inputs of Random Generator
FieldTypeDefaultDescription
modeselect (integers, floats, dice, coins, pick, shuffle, teams, dates, strings, uuid4, uuid7)"integers"Generate
countinteger10How many. Numbers, rolls, flips, picks, dates, strings or UUIDs.
minnumber1Minimum
maxnumber100Maximum
uniquebooleanfalseNo repeats (numbers and picks)
decimalsinteger2Decimal places
dicetext"3d6"Dice notation. NdS±M, e.g. 2d20, 4d6+2, d100.
itemslist—List (one per line; "name, skill" for teams)
teamsinteger2Number of teams
dateFromdate"2026-01-01"Earliest date
dateTodate"2026-12-31"Latest date
lengthinteger16String length
charsetselect (alnum, unambiguous, lower, upper, digits, hex, symbols)"alnum"Characters
seedtext—Seed (optional, for reproducible results). Empty = cryptographic randomness, different every time. With a seed, the same settings always give the same result — never use seeded output for passwords or keys.
uuidTimedatetime—UUID v7 timestamp (optional). Default: now (UTC). Set it together with a seed for reproducible v7 UUIDs.

Example request

Lottery 6 of 49 (seeded)

curl -X POST https://randomgenerator.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"integers","count":6,"min":1,"max":49,"unique":true,"seed":"draw-2026-10-18"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "random-generator": { "type": "http", "url": "https://randomgenerator.usefulweb.site/mcp" }
  }
}