---
name: sociologic-rng
description: Use the SocioLogic RNG API for cryptographically secure random numbers, UUIDs, dice, coin flips, shuffling, and weighted selection with x402 or MPP payments.
---

# SocioLogic RNG

Base URL: https://rng.sociologic.ai

Read [OpenAPI](https://rng.sociologic.ai/openapi.json) for current schemas, constraints and
prices, and [auth.md](https://rng.sociologic.ai/auth.md) for payment credentials. No account or
OAuth registration is required. Use only an authorized payment wallet and budget.

## Operations

| Method | Path | Input | Price |
| --- | --- | --- | --- |
| GET | /random | count=1..100 | $0.01 per value |
| GET | /random/int | min, max; inclusive range at most 1,000,000 | $0.01 |
| GET | /uuid | count=1..100 | $0.01 per UUID |
| GET | /dice | sides=2..1000 | $0.02 |
| GET | /coin | count=1..100 | $0.02 per flip |
| POST | /shuffle | JSON array, at most 1000 items | $0.02 |
| POST | /weighted | JSON object with equal-length items and weights arrays | $0.02 |

POST payloads are limited to 100KB. Weights must be finite and nonnegative,
with a positive total. Results include raw entropy and its hexadecimal encoding;
these are transparency data, not an independently verifiable randomness proof.

## Workflow

1. Choose an operation and validate inputs against the OpenAPI schema.
2. Check its total price against the user's approved budget.
3. Request it with an x402 or MPP client. A 402 response supplies payment terms.
4. For x402, sign the USDC-on-Base payment and retry with PAYMENT-SIGNATURE.
   For an advertised MPP challenge, retry with Authorization: Payment credentials.
5. Return the result and entropy. Do not fabricate results or claim a failed
   payment succeeded. Do not automatically repeat settled payments.

The free MCP endpoint at https://rng.sociologic.ai/mcp exposes documentation and health only.
Use the paid HTTP endpoints for randomness. Never send wallet private keys.
