{"uid":"cap_3gXb-s4Nr7b7YIIQ_x17s","slug":"pyfile-toolkit-provably-fair-winner-selection-630d69c9","name":"Pyfile Toolkit: Provably-Fair Winner Selection","description":"Provably-fair winner selection from a comma-separated list. ?candidates=a,b,c&round=1&client_seed=s&nonce=1","url":"https://pyfile-agent.taile3ff35.ts.net:10000/data/fair/pick","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":{}}}},"output":{"type":"object","properties":{"commit":{"type":"string"},"verify":{"type":"string"},"winner":{"type":"string"},"round_id":{"type":"string"},"winner_index":{"type":"integer"},"candidates_count":{"type":"integer"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hwjHtZZsg1777kIufPtun","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Selects a provably-fair winner from a comma-separated list of candidates using a committed server seed and client-supplied entropy","exampleAgentPrompt":"Pick a provably-fair winner from this list of contestants: Alice, Bob, Carol, Dave — use round 1, client seed 'myseed2024', and nonce 1.","exampleUseCases":[{"title":"Social media giveaway winner draw","prompt":"I ran a Twitter giveaway and have 5 entrants: @jack, @sarah, @mike, @lisa, @tom. Pick a provably-fair winner using round 42, client seed 'twitter-giveaway-june', nonce 1 so I can prove the draw was fair."},{"title":"Random team captain selection","prompt":"We need to pick a team captain randomly from our players: Jordan, Casey, Riley, Morgan, and Alex. Use round 1, client seed 'teamcaptain', nonce 1 and give me someone I can verify was chosen fairly."},{"title":"Prize assignment for hackathon","prompt":"Assign the grand prize to one of our hackathon finalists — TechNova, CodeCraft, BuildBot, DataDash — using round 7, client seed 'hackathon2024', nonce 1 so participants can audit the selection."}],"resultDescription":"Returns the selected winner's name, their zero-based index in the candidate list, the total number of candidates, a round ID, a commit hash (sha256 of the server seed before the draw), and a verify hash so anyone can independently confirm the draw was not manipulated.","failureModes":["Missing or empty candidates parameter returns an error","Invalid or malformed candidates list may produce unexpected results","Round ID or nonce mismatch prevents verification against a prior commit","Payment failure (402) if x402 micropayment is not included or insufficient","Network timeout if the endpoint is unreachable on the Tailscale network"],"whenToPreferThis":"Use this endpoint when you need cryptographically verifiable, auditable random selection from a discrete set of named candidates — especially for giveaways, raffles, or contests where participants need proof the draw was not manipulated. Prefer this over a simple random number generator when auditability and a provable commit-reveal scheme matter. Use the companion commit endpoint first if you want to publish the server seed hash before drawing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:43:10.584Z","isFirstParty":false}