{"uid":"cap_bsWadIlhiP127SWWyhchA","slug":"x402-forgemesh-io-provably-fair-random-number-api-c2400f7a","name":"x402.forgemesh.io Provably-Fair Random Number API","description":"Provably-fair random number API: an integer in your min-max range drawn via HMAC-SHA256 over your client seed, with the server seed revealed in the response so anyone can recompute and verify the draw was fair. For games, raffles, sampling, A/B assignment, and tie-breaking between agents.","url":"https://x402.forgemesh.io/provably-fair-random","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"max":{"type":"string","description":"default 100"},"min":{"type":"string","description":"default 1"},"client_seed":{"type":"string","description":"your seed for verifiability"}}},"responseSchema":{"type":"json","example":{"proof":"HMAC-SHA256(server_seed, client_seed) first 4 bytes mod range — recompute to verify","value":4,"server_seed_revealed":"e3b1..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IXT0OJZ125VMm0e5KZKcd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a verifiable random integer in a user-specified range using HMAC-SHA256 over a client seed, returning the server seed so the result can be independently audited.","exampleAgentPrompt":"Pick a provably fair random number between 1 and 500 using my seed 'myseed42' so I can verify the draw myself afterward.","exampleUseCases":null,"resultDescription":"Returns a random integer within the specified min-max range, plus the server seed used in the HMAC-SHA256 computation, allowing any party to independently recompute and confirm the result was not manipulated.","failureModes":["Invalid min/max range (e.g. min >= max) returns an error","Missing or malformed client_seed may cause rejection","Payment of $0.002 USDC not included or invalid returns 402 Payment Required","Server-side HMAC computation failure returns 500"],"whenToPreferThis":"Choose this endpoint when you need a random number that is independently auditable — i.e. when players, participants, or auditors must be able to verify after the fact that the draw was not rigged. Ideal for games, raffles, lotteries, A/B assignment, or any context requiring trustless randomness.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:03:05.088Z","isFirstParty":false}