{"uid":"cap_xnW9LHJP10nc5d8ju3Tfh","slug":"delx-commerce-seeded-weighted-sample-07717a5c","name":"Delx Commerce — Seeded Weighted Sample","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/seeded-weighted-sample?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"string","maxLength":8192,"description":"Seed supplied to Seeded Weighted Sample; used only for this bounded calculation and processed in memory without retention."},"count":{"type":"integer","description":"Count supplied to Seeded Weighted Sample; used only for this bounded calculation and processed in memory without retention."},"items":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Items supplied to Seeded Weighted Sample; used only for this bounded calculation and processed in memory without retention."},"weights":{"type":"array","items":{"type":"integer"},"maxItems":256,"description":"Weights supplied to Seeded Weighted Sample; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"count":2,"items":["a","c"]},"schema":"delx/util-seeded-weighted-sample/v1","status":"pass","evidence":{"retained":false,"input_sha256":"4b94fab1aa6acc04be7b55390f0c8075b8e83c859b6ceaccfd3469af77bb03fd","external_calls":0},"operation":"seeded_decision:seeded_weighted_sample"}},"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_hsY8e5tjKrPEQ3pAjD6wr","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":"Performs a reproducible weighted random selection of N items from a list using a deterministic seed, returning verifiable results with no data retention.","exampleAgentPrompt":"Using a seed of 'launch2025', pick 3 items from the list ['alpha','beta','gamma','delta','epsilon'] with weights [10,5,20,15,50].","exampleUseCases":[{"title":"Weighted A/B variant assignment","prompt":"I need to assign a user to one of three feature variants — 'control', 'variantA', 'variantB' — with weights 60, 25, 15. Use seed 'user-id-8821' so the assignment is reproducible and verifiable."},{"title":"Reproducible prize draw for a campaign","prompt":"We have 5 prize tiers with weights [100,50,20,5,1]. Draw 2 winners from ['bronze','silver','gold','platinum','diamond'] using seed 'campaign-oct-2024' so anyone can verify the result."},{"title":"Probabilistic task routing for an agent fleet","prompt":"Route an incoming job to one of our agents — ['agent1','agent2','agent3'] — based on their capacity weights [3,5,2]. Use seed 'job-id-4492' so the routing decision is auditable."}],"resultDescription":"Returns a JSON object containing the sampled items array and count, a schema identifier, a 'pass' status, an evidence block with retained=false, the SHA-256 hash of the input, external_calls count (always 0), and an operation label — allowing the caller to verify correctness and confirm no data was stored.","failureModes":["Mismatched items/weights array lengths may cause a validation error","Count exceeding the number of available items may return an error or empty result","Weights array containing non-integer values will fail schema validation","Items array exceeding 256 entries will be rejected","Missing required fields (items or weights) will produce a 400-level error"],"whenToPreferThis":"Use this endpoint when you need a reproducible, verifiable, weighted random selection that can be audited — particularly in agentic workflows where fairness, transparency, or replayability matter. Prefer it over in-process random sampling when you need cryptographic evidence of the draw (via input SHA-256), guaranteed no data retention, and deterministic replay from the same seed. At $0.001 USDC per call with no signup required, it is ideal for lightweight decision steps in automated agent pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:42.742Z","isFirstParty":false,"canonicalSlug":"delx-commerce-seeded-weighted-sample-07717a5c"}