---
name: rng.sociologic.ai
description: rng.sociologic.ai provides cryptographically secure random value generation via three endpoints: UUID v4 identifiers, random floats in [0,1), and random integers within a caller-specified range. Each endpoint returns entropy proof (raw bytes and hex) alongside the generated value(s), enabling auditability of the randomness source. Pricing is per-call, with UUID generation priced at $0.01 per UUID.
host: rng.sociologic.ai
---

# rng.sociologic.ai

This host serves agents and applications that require verifiable, cryptographically secure randomness on demand. It covers three common primitive types — unique identifiers, floating-point values, and bounded integers — each generated via rejection sampling to eliminate bias. It is not a streaming or subscription randomness service; it is a stateless, per-request API suited for discrete randomness needs with an audit trail.

## When to use this host

Use this host when an agent needs cryptographically secure, auditable random primitives — specifically UUID v4 identifiers, bounded integers, or floats in [0,1) — and requires entropy proof for each value. Do not use it for UUID versions other than v4, random byte arrays, random strings, or values outside the supported output types; those require a different host. It is not suitable for high-frequency or bulk randomness (beyond 100 UUIDs per request) due to per-call pricing, and it offers no streaming or subscription mode. For non-cryptographic pseudorandom needs where cost or throughput matters more than auditability, a local PRNG library is a better fit.

## Capabilities

### Unique Identifier Generation

Produces one or more UUID v4 values backed by cryptographic entropy, suitable for record keys, session tokens, and correlation IDs.

- **`generate-uuid-v4`** — Generates one or more cryptographically secure UUID v4 values with raw entropy bytes via a single GET request, priced at $0.01 per UUID.

### Cryptographic Random Primitives

Generates unbiased random floats in [0,1) and random integers within a caller-defined inclusive range, both with entropy proof via rejection sampling.

- **`fetch-random-float`** — Returns one or more cryptographically secure random floats in [0, 1) with entropy proof, generated via rejection sampling.
- **`fetch-random-integer`** — Returns a cryptographically secure random integer within a caller-specified inclusive range, with entropy proof, via rejection sampling to eliminate modulo bias.

## Workflows

### Seeded Lottery or Weighted Sampling

*Use when an agent needs to select a random item from a list by first picking a random index and optionally validating the draw with a float-based probability check.*

1. **`fetch-random-integer`** — Generate an unbiased random index within [0, list_length-1] to select an item from a collection.
2. **`fetch-random-float`** — Generate a random float to apply a probability threshold check (e.g., acceptance/rejection in weighted sampling or Monte Carlo validation).

## Skill reference

### `generate-uuid-v4`

**Sociologic UUID Generator** — Generates one or more cryptographically secure UUID v4 values with raw entropy bytes via a single GET request, priced at $0.01 per UUID.

*Use when:* Use when an agent needs one or more cryptographically secure UUID v4 identifiers on demand, including entropy proof (raw bytes and hex), for tasks such as record creation, session tokens, or unique key generation.

*Not for:* Do not use for UUID versions other than v4, or for bulk generation beyond 100 UUIDs per request. Not suitable as a streaming or subscription-based randomness source.

**Inputs:**

- `count` (integer) — Number of UUID v4 values to generate. Default is 1, minimum is 1, maximum is 100. Price scales at $0.01 per UUID.

**Returns:** Returns a JSON object with a single UUID v4 string in 'value', type 'uuid', version 4, and an entropy object containing raw integer and hex byte arrays.

**Example:** `GET https://rng.sociologic.ai/uuid?count=1`

---

### `fetch-random-float`

**Sociologic Random Float** — Returns one or more cryptographically secure random floats in [0, 1) with entropy proof, generated via rejection sampling.

*Use when:* Use when an agent needs one or more unpredictable random float values for simulations, games, statistical sampling, testing, or any use case requiring verifiable randomness with an entropy audit trail.

*Not for:* Do not use for random integers, random strings, or random values outside the [0, 1) range — transform the output yourself or use a different endpoint for those types.

**Inputs:**

- `count` (integer) — Number of random float values to generate. Default is 1, minimum is 1, maximum is 100. Price scales at $0.01 per value.

**Returns:** Returns a JSON object with a random float value in [0,1), type='float', range=[0,1], and an entropy object containing the raw integer and hex representation of the entropy source.

**Example:** `GET https://rng.sociologic.ai/random?count=1`

---

### `fetch-random-integer`

**Sociologic RandomInt** — Returns a cryptographically secure random integer within a caller-specified inclusive range, with entropy proof, via rejection sampling to eliminate modulo bias.

*Use when:* Use when an agent or application needs an unbiased random integer within a defined range, such as for lotteries, sampling, game mechanics, or smart contract seeding.

*Not for:* Do not use for generating random floats, UUIDs, or byte arrays; use a dedicated random-float or random-bytes endpoint instead. Not suitable for high-frequency bulk randomness due to per-call cost.

**Inputs:**

- `min` (integer) — Minimum value (inclusive). Defaults to 0.
- `max` (integer) — Maximum value (inclusive). Defaults to 100.

**Returns:** Returns a JSON object with the random integer value, type string, echoed range array, and entropy object containing raw integer and hex string.

**Example:** `GET https://rng.sociologic.ai/random/int?min=1&max=1000`

---
