{"uid":"cap_6HQ_MowKYu-hFoSxNUPEk","slug":"seeded-random-sample-58ff5e78","name":"Seeded Random Sample","description":"Select a reproducible sample without replacement from a bounded caller-supplied list. Use when multiple agents or retries must reach the same selection from the same seed. Returns sampled values, original indices, and a seed hash for 0.001 USDC via x402 on Base; local-only, stateless, and no input retention.","url":"https://api.delx.ai/api/v1/x402/seeded-random-sample","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"string","maxLength":256,"minLength":1},"count":{"type":"integer","maximum":1000,"minimum":1},"items":{"type":"array","maxItems":1000}}},"responseSchema":{"type":"json","example":{"count":2,"sample":["gamma","beta"],"schema":"delx/util-seeded-random-sample/v1","indices":[2,1],"seed_sha256":"f55bbb81faa69aaf4936ce9f0aa962c442851e4550566b83cc10573d585a0ed2","source_count":4,"without_replacement":true}},"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_NtEPbtY29R9B1jm41wVIb","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":"Selects a reproducible, deterministic random sample without replacement from a caller-supplied list using a seed string, returning sampled values, original indices, and a seed hash.","exampleAgentPrompt":"Randomly pick 5 items from this list ['apple','banana','cherry','date','elderberry','fig','grape','honeydew'] using seed 'mission-alpha-42', so I get the same result every time I retry.","exampleUseCases":[{"title":"Reproducible lottery winner selection","prompt":"I need to pick 3 winners from this list of 50 entrant names in a way that's verifiable and reproducible — use seed 'contest-2024-final' so anyone can confirm the draw later."},{"title":"Consistent task assignment across agent retries","prompt":"Assign 10 tasks randomly from this pool of 200 jobs to a worker agent using seed 'batch-run-77', and make sure re-running the assignment gives the exact same 10 tasks."},{"title":"Deterministic A/B test group sampling","prompt":"From this list of 500 user IDs, sample 100 for the treatment group using seed 'experiment-cohort-3' so the same users are always selected if the experiment needs to be re-run."}],"resultDescription":"Returns the sampled subset of values drawn from the input list, their original zero-based indices within the input array, and a hash of the seed used — enabling reproducibility verification. Sample is without replacement, deterministic for a given seed and input.","failureModes":["count exceeds items length — cannot sample more items than available without replacement","count or items array exceeds maximum bounds (1000)","seed string missing or empty — required for deterministic output","malformed items array or non-array type","payment not completed — x402 payment required before response is returned"],"whenToPreferThis":"Choose this endpoint when you need a reproducible, auditable random sample that multiple agents or retries must agree on. Ideal for distributed agent workflows where consistency across runs is critical, or when you need to prove to a third party that a selection was made fairly from a fixed seed. Prefer over local PRNG when the selection must be stateless, verifiable, and consistent across different environments or machines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:59:44.847Z","isFirstParty":false}