{"uid":"cap_FHDgO_ZXXLI2m3Bs1Ngkr","slug":"delx-commerce-seeded-weighted-choice-ee4e0741","name":"Delx Commerce — Seeded Weighted Choice","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-choice?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"string","maxLength":8192,"description":"Seed supplied to Seeded Weighted Choice; 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 Choice; used only for this bounded calculation and processed in memory without retention."},"weights":{"type":"array","items":{"type":"number"},"maxItems":256,"description":"Weights supplied to Seeded Weighted Choice; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"index":0,"selected":"fast"},"schema":"delx/util-seeded-weighted-choice/v1","status":"pass","evidence":{"retained":false,"input_sha256":"c6638a85aa14e9c05d911356c0a5fbd65272dc5841db91ed4d836ca7d4bf523b","external_calls":0},"operation":"seeded_decision:seeded_weighted_choice"}},"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_-xzdR8bzmei-MtUduQmkW","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":"Deterministically selects one item from a weighted list using a seed, returning the chosen item's index and value with verifiable evidence.","exampleAgentPrompt":"Pick one of these three deployment targets — 'us-east', 'eu-west', 'ap-south' — using weights 5, 3, 2 and seed 'deploy-run-42', and give me the result with proof it wasn't stored.","exampleUseCases":[{"title":"Reproducible A/B variant assignment","prompt":"Assign this user to one of two variants — 'control' or 'treatment' — using weights 70 and 30 and the seed 'user-session-8821', and confirm no data was retained."},{"title":"Weighted winner selection for a campaign","prompt":"Pick one winner from this list — 'Alice', 'Bob', 'Carol', 'Dave' — with weights 10, 5, 3, 2 using the seed 'promo-draw-2025', and give me the selected name and its index."},{"title":"Probabilistic task routing for an agent fleet","prompt":"Route this job to one of three agents — 'agent-alpha', 'agent-beta', 'agent-gamma' — weighted at 60, 25, 15 using seed 'job-id-99123', and show me which one was chosen."}],"resultDescription":"Returns a JSON object containing the selected item's value and its zero-based index, a pass/fail status, the operation schema identifier ('delx/util-seeded-weighted-choice/v1'), and an evidence block confirming no data was retained, the SHA-256 hash of the input, and that zero external calls were made.","failureModes":["Mismatched array lengths between items and weights — likely returns a validation error","Seed string exceeds 8192 characters — rejected by schema","Items or weights array exceeds 256 elements — rejected","All weights are zero — undefined selection behavior","Malformed JSON body — HTTP 400 or payment not triggered"],"whenToPreferThis":"Choose this endpoint when you need a verifiable, reproducible weighted random selection — especially in agentic workflows where auditability matters (e.g. lotteries, A/B routing, task assignment) and you need cryptographic proof that no input data was stored. It is ideal when determinism from a seed is required, unlike true-random endpoints. At $0.001 USDC per call with no signup, it suits high-frequency agent pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:38:31.393Z","isFirstParty":false,"canonicalSlug":"delx-commerce-seeded-weighted-choice-ee4e0741"}