{"uid":"cap_OfK21PBLCrD6r8uQu7ubu","slug":"random-item-picker-uniform-no-replacement-80721645","name":"Random Item Picker (Uniform, No-Replacement)","description":"Pick random items from a list in one GET: count items from the items you pass, uniform, by default without replacement. Returns picked[] and the 0-based indices[], drawn with crypto.getRandomValues and rejection sampling (Fisher-Yates for unique draws). Nothing is fetched or stored. curl: GET /pick?items=alice,bob,carol&count=2 . Response: {\"picked\":[\"carol\",\"alice\"],\"indices\":[2,0],\"unique\":true,...}. items 1..100 comma/newline separated; count 1..100 (default 1); replace=false by default. An empty item, too many/over-long items, a bad count or count>items without replacement is 400 before payment. No seed and no signed beacon; each paid call returns fresh picks. No keys, no account, one GET, one delivery — 0.001 USDC. A purchase is two calls by design: this first call returns 402 with the price and the payment terms, and you then repeat the same request with the PAYMENT-SIGNATURE header to receive the 200 delivery.","url":"https://x402-catalog-history.ai-business-surface.workers.dev/pick?utm_source=zero.xyz","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"count":{"type":"string"},"items":{"type":"string"},"replace":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.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_eR3xOPDCYOY298DG--TLm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Picks a specified count of random items from a user-supplied list using cryptographically secure randomness, returning the chosen items and their 0-based indices","exampleAgentPrompt":"Randomly pick 3 winners from this list of contestants — alice, bob, carol, dave, eve, frank — without repeating any name.","exampleUseCases":[{"title":"Raffle winner selection","prompt":"I have 10 raffle entrants — anna, ben, cara, dan, ella, finn, grace, hal, ivy, jake — randomly pick 3 winners, no duplicates."},{"title":"Random team assignment","prompt":"Randomly choose 2 people from this group to lead today's standup: alice, bob, carol, dave, eve."},{"title":"Random question selection","prompt":"Pick 5 random questions from this list without repeating: 'What is your goal?', 'Describe your challenge', 'What have you tried?', 'Who is your user?', 'What is your metric?', 'What would success look like?', 'What is blocking you?', 'How long have you worked on this?'"}],"resultDescription":"A JSON object containing: `picked` (array of the randomly selected item strings), `indices` (array of 0-based positions of each picked item in the original list), and `unique` (boolean indicating whether sampling was without replacement). The selection is drawn using crypto.getRandomValues with Fisher-Yates for unique draws, ensuring cryptographic quality randomness.","failureModes":["400 if any item is empty or malformed","400 if more than 100 items are provided","400 if count exceeds number of items when replace=false","400 if count is less than 1 or greater than 100","400 if items are over the maximum allowed length","402 on first call — must repeat request with PAYMENT-SIGNATURE header to receive result","Malformed query string may result in unexpected parsing of the items list"],"whenToPreferThis":"Use this endpoint when you need a cryptographically secure, stateless, single-GET random draw from a small list (up to 100 items) without maintaining your own RNG or state. Prefer it over client-side Math.random() when auditability or reproducible fairness matters, or when you want a simple pay-per-use call with no API key setup. It is ideal for raffles, random assignment, or sampling tasks where the list fits in a query parameter and you need fresh unpredictable results each time.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:33:35.954Z","isFirstParty":false,"canonicalSlug":"random-item-picker-uniform-no-replacement-80721645"}