---
title: "Multi-mode CSPRNG generator (number, string, word, picker, team, dice, coin, country, UUID)"
method: POST
path: "/random-gen.php"
tags: ["data"]
---

# Multi-mode CSPRNG generator (number, string, word, picker, team, dice, coin, country, UUID)

`POST /random-gen.php`

## Request

- Base URL: `https://mate.tools/api/v1`
- URL: `https://mate.tools/api/v1/random-gen.php`
- Auth: none declared

Cryptographically random generation. Set mode to: number (min/max integer), string (configurable charset and length), word (English word list), picker (sample from a list), team (balance a list into N teams), dice (NdM rolls + total), coin (heads/tails), country (random country name), uuid (v4 or v7). All randomness uses PHP random_int / random_bytes.

## Request body

- object
  - `mode` 'number' | 'string' | 'word' | 'picker' | 'team' | 'dice' | 'coin' | 'country' | 'uuid', required

## Response `200`

Success

## Other responses

- `400`: Malformed request
- `429`: Rate limit exceeded (60/min, 600/hour per IP). Includes Retry-After header.

---

[API](https://skmtc.dev/mate/apis/mate-tools-api.md) · [All operations](https://skmtc.dev/mate/apis/mate-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mate/apis/mate-tools-api/revisions/874670b78962?raw)
