{"uid":"cap_PBJiAGyyk50gBxVqcga1u","slug":"api-x402node-dev-1ea58b2f","name":"Cryptographically Secure Random Number Generator","description":"Random number generator, random integer, random float, dice roll, lottery numbers, coin flip, cryptographically secure random, RNG, number picker. Generate cryptographically secure random numbers in a range with optional batch count. Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/math/random","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"max":{"type":"string","description":"Max (optional)"},"min":{"type":"string","description":"Min (optional)"},"type":{"type":"string","description":"Type (optional)"},"count":{"type":"string","description":"Count (optional)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0022","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0022/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0022","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0022","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_v7O6FZUpxpWJKkhOmgWAn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0022","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates cryptographically secure random integers or floats within a specified range, with optional batch generation for dice rolls, lottery picks, coin flips, and similar use cases.","exampleAgentPrompt":"Give me 6 cryptographically secure random integers between 1 and 49 — I want to pick lottery numbers.","exampleUseCases":null,"resultDescription":"Returns one or more cryptographically secure random numbers (integer or float) within the specified min/max range. When batch count is provided, returns an array of random values. Each value is generated using a secure RNG, suitable for security-sensitive or fairness-critical applications.","failureModes":["Invalid range (min >= max) returns a 400 error","Batch count exceeds maximum allowed limit returns a 400 or 422 error","Missing required parameters (min or max) returns a 400 bad request","Non-numeric range values return a validation error","Payment not included or insufficient results in a 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need cryptographically secure (not pseudo-random) number generation, especially for security-sensitive contexts like token generation, fair draws, or lottery-style picks. Prefer this over client-side Math.random() when unpredictability and security guarantees are required. Supports batch generation so you can get multiple numbers in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:45:58.350Z","isFirstParty":false}