{"openapi":"3.1.0","info":{"title":"Secure Random","version":"0.1.0","description":"Cryptographically-secure randomness — bytes, integers, strings and array sampling — unbiased.","x-guidance":"Cryptographically-secure randomness — bytes, integers, strings and array sampling — unbiased. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://random.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/bytes":{"post":{"summary":"Random bytes","description":"Generate cryptographically-secure random bytes, returned as hex, base64 or base64url. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["random bytes","secure random bytes","csprng bytes api","generate entropy","hex random data","base64 random bytes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":4096,"description":"Number of random bytes."},"encoding":{"type":"string","enum":["hex","base64","base64url"],"description":"Output encoding (hex, base64, base64url). Default hex."}},"required":["count"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ count, encoding, data }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ count, encoding, data }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate cryptographically-secure random bytes, returned as hex, base64 or base64url.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Generate cryptographically-secure random bytes, returned as hex, base64 or base64url.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate cryptographically-secure random bytes, returned as hex, base64 or base64url.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/integer":{"post":{"summary":"Random integers","description":"Generate one or more uniformly-distributed random integers in an inclusive [min, max] range. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["random integer","secure random number","random number in range","generate integers","uniform integer api","roll random values"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"min":{"type":"integer","description":"Inclusive lower bound."},"max":{"type":"integer","description":"Inclusive upper bound (>= min)."},"count":{"type":"integer","minimum":1,"maximum":1000,"description":"How many integers. Default 1."}},"required":["min","max"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ values }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ values }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate one or more uniformly-distributed random integers in an inclusive [min, max] range.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Generate one or more uniformly-distributed random integers in an inclusive [min, max] range.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate one or more uniformly-distributed random integers in an inclusive [min, max] range.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/string":{"post":{"summary":"Random string","description":"Generate a random string of a given length from a named charset (alphanumeric, alpha, lower, upper, numeric, hex, base58) or a custom alphabet. Unbiased character selection. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["random string","generate random token","secure password string","alphanumeric random","base58 random string","custom alphabet random"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"length":{"type":"integer","minimum":1,"maximum":4096,"description":"Length of the string."},"charset":{"type":"string","enum":["alphanumeric","alpha","lower","upper","numeric","hex","base58"],"description":"Named charset (alphanumeric, alpha, lower, upper, numeric, hex, base58). Default alphanumeric."},"alphabet":{"type":"string","minLength":2,"maxLength":256,"description":"Custom alphabet; overrides charset. Duplicate characters are collapsed."}},"required":["length"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ value, alphabet }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ value, alphabet }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a random string of a given length from a named charset (alphanumeric, alpha, lower, upper, numeric, hex, base58) or a custom alphabet. Unbiased character selection.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Generate a random string of a given length from a named charset (alphanumeric, alpha, lower, upper, numeric, hex, base58) or a custom alphabet. Unbiased character selection.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a random string of a given length from a named charset (alphanumeric, alpha, lower, upper, numeric, hex, base58) or a custom alphabet. Unbiased character selection.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/sample":{"post":{"summary":"Random sample","description":"Draw a random sample from a provided array — without replacement by default (a fair shuffle), or with replacement when unique is false. count defaults to 1. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["random sample array","shuffle array items","pick random item","sample without replacement","draw random subset","fair array sampling"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":10000,"description":"The pool to sample from."},"count":{"type":"integer","minimum":1,"maximum":10000,"description":"How many to draw. Default 1."},"unique":{"type":"boolean","description":"Draw without replacement. Default true."}},"required":["items"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ items }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ items }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Draw a random sample from a provided array — without replacement by default (a fair shuffle), or with replacement when unique is false. count defaults to 1.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Draw a random sample from a provided array — without replacement by default (a fair shuffle), or with replacement when unique is false. count defaults to 1.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Draw a random sample from a provided array — without replacement by default (a fair shuffle), or with replacement when unique is false. count defaults to 1.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["compute"],"docs":{"homepage":"https://random.openverbs.com","apiReference":"https://random.openverbs.com/openapi.json"}}}