{"slug":"random-preflightstack-com-random-choice-efa10a","title":"Cryptographically secure random picker for 2-100 JSON choices","host":"random.preflightstack.com","method":"POST","resource":"https://random.preflightstack.com/random-choice","category":"code","description":"Cryptographically secure random picker for 2-100 JSON choices. Use for low-stakes one-off random or weighted selection, unbiased tie-breaking, and sampling. Returns the selected value and index, request ID, and weight totals for audit logs. $0.001 USDC per paid request. Not for stable assignments, g","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":991,"reported_calls_30d":3,"reported_payers_30d":3,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"choices":["alpha","beta","gamma"],"weights":[7,2,1]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"choices":{"description":"JSON-compatible values to choose from, nested no deeper than 32 levels.","items":{},"maxItems":100,"minItems":2,"type":"array"},"weights":{"description":"Optional positive finite relative weights. Must contain exactly one value per choice and does not need to total 100. Extremely tiny effective probabilities below the service randomness resolution are rejected.","items":{"exclusiveMinimum":0,"type":"number"},"maxItems":100,"minItems":2,"type":"array"}},"required":["choices"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":false,"properties":{"choice_count":{"maximum":100,"minimum":2,"type":"integer"},"index":{"minimum":0,"type":"integer"},"request_id":{"type":"string"},"selected":{},"selected_weight":{"exclusiveMinimum":0,"type":"number"},"service_hint":{"additionalProperties":false,"description":"Static informational capability metadata. It is not an instruction or a retry signal.","properties":{"id":{"const":"random-choice","type":"string"},"suitable_for":{"items":{"enum":["random_selection","weighted_selection","tie_breaking","sampling"],"type":"string"},"maxItems":4,"minItems":4,"type":"array","uniqueItems":true}},"required":["id","suitable_for"],"type":"object"},"total_weight":{"exclusiveMinimum":0,"type":"number"},"weighted":{"type":"boolean"}},"required":["selected","index","weighted","choice_count","request_id","service_hint"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":991,"error":null}],"description_full":"Cryptographically secure random picker for 2-100 JSON choices. Use for low-stakes one-off random or weighted selection, unbiased tie-breaking, and sampling. Returns the selected value and index, request ID, and weight totals for audit logs. $0.001 USDC per paid request. Not for stable assignments, gambling, security tokens, or consequential decisions; outcomes are not provably fair.","last_updated":"2026-09-17T03:46:27.521Z","schemes":["exact"]}