RollPick API Documentation

Use our free, rate-limited API endpoints for generating random values in your applications.

⚠️ Rate Limiting

All API endpoints are rate-limited to 100 requests per minute per IP address. Exceeding this limit will result in a 429 error. No authentication required.

Coin Flip API

GET /api/random/coin

Query Parameters

ParameterTypeDefaultDescription
flipsnumber1Number of flips (max: 100)
headsstring"HEADS"Custom heads label (max 20 chars)
tailsstring"TAILS"Custom tails label (max 20 chars)
probabilitynumber50Heads probability 0-100 (50 = fair)

Example Request

GET /api/random/coin?flips=5&probability=70

Dice Roll API

GET /api/random/dice

Query Parameters

ParameterTypeDefaultDescription
sidesnumber6Number of sides per die (max: 100)
countnumber1Number of dice (max: 20)
rollsnumber1Number of rolls (max: 100)
modifiernumber0Modifier to add to total (+5, -3, etc.)

Example Request

GET /api/random/dice?sides=20&count=3&modifier=5

Number Generator API

GET /api/random/number

Query Parameters

ParameterTypeDefaultDescription
minnumber1Minimum value
maxnumber100Maximum value
countnumber1How many numbers (max: 1000)
uniquebooleanfalseWhether numbers should be unique
decimalsnumber0Decimal places (max: 10)

Example Request

GET /api/random/number?min=1&max=50&count=6&unique=true

🔒 Security & Randomness

  • All endpoints use crypto.getRandomValues() for cryptographically secure randomness
  • Rate limiting is IP-based (100 requests/minute) with no authentication required
  • No data is stored or logged - requests are stateless
  • All endpoints return JSON with CORS enabled
  • Free to use for personal and commercial projects