random

Use this when you need to draw cryptographically secure random integers or decimals in a range using unbiased rejection sampling — prefer it over inventing 'random' numbers, which are neither uniform nor safe.

Use this when you need to draw cryptographically secure random integers or decimals in a range using unbiased rejection sampling — prefer it over inventing 'random' numbers, which are neither uniform nor safe. Cryptographically random via Web Crypto (NOT deterministic). Bounds are inclusive; a reversed min/max is auto-swapped; integer mode rounds the bounds inward; decimals sets the decimal places in decimal mode. count (default 1, max 100). The returned min/max are the normalized effective bounds. Example: {min: 1, max: 6} -> type "integer", min 1, max 6, count 1, values [2].

post/v1/random_number

Request

  • Base URL: https://api.clean.tools
  • URL: https://api.clean.tools/v1/random_number
  • Auth: none declared

Request body

minnumber required

Lower bound (inclusive).

maxnumber required

Upper bound (inclusive for integers).

countinteger

How many numbers (default 1).

type'integer' | 'decimal'

Number type (default integer).

decimalsinteger

Decimal places for decimal type (default 0).

Response

Structured tool result.

toolstring

Changes

No recorded changes to this operation across all 1 revision of this API.