{"uid":"cap_oxIN9umeyHAJWqCZ215he","slug":"random-choice-selector-random-preflightstack-com-14bb3302","name":"Random Choice Selector (random.preflightstack.com)","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, gambling, security tokens, or consequential decisions; outcomes are not provably fair.","url":"https://random.preflightstack.com/random-choice","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9LVY1NrDc0xkt04GszyIn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Selects one item uniformly or by weight from a list of 2–100 choices using cryptographically secure server-side randomness.","exampleAgentPrompt":"I can't decide between these three restaurants — 'Osteria Nino', 'Sakura Ramen', and 'El Rancho Grill' — can you pick one at random using cryptographically secure randomness?","exampleUseCases":[{"title":"Agent tie-breaking between equal results","prompt":"I've narrowed it down to four equally good candidates for the design contract — 'Studio A', 'Studio B', 'Studio C', and 'Studio D' — can you randomly pick one to move forward with?"},{"title":"Weighted random task assignment","prompt":"Assign today's on-call duty randomly among our three engineers, but make it twice as likely to land on Alice since she volunteered — the options are Alice, Bob, and Carol."},{"title":"Random sampling for A/B testing","prompt":"I have five marketing headlines I want to test: 'Save Big Today', 'Deals You Love', 'Shop Smarter', 'Unbeatable Prices', and 'Your Best Deal Yet' — pick one at random to use as the control group headline."}],"resultDescription":"Returns the single randomly selected item from the provided list, chosen via cryptographically secure server-side randomness. The selection is uniformly distributed unless optional weights are provided, in which case items are sampled proportionally.","failureModes":["Fewer than 2 or more than 100 choices provided — request rejected with validation error","Weights array length does not match choices array — mismatch error returned","Negative or zero weights provided — invalid input error","Network timeout or server error — no selection returned, should retry","Malformed request body — 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need verifiably unbiased, cryptographically secure random selection — especially in agentic tie-breaking scenarios where fairness or auditability matters. Prefer this over client-side random() calls when the randomness source must be server-authoritative or when weighted sampling between 2–100 options is needed. Not suited for bulk/batch random draws or generating random numbers outside a choice context.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:32:37.682Z","isFirstParty":false}