{"uid":"cap_t_V8mpmRbwfN3QpZ4PVSk","slug":"delx-commerce-seeded-weighted-partition-1f48e59b","name":"Delx Commerce — Seeded Weighted Partition","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-partition?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"string","maxLength":8192,"description":"Seed supplied to Seeded Weighted Partition; 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 Partition; 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 Partition; used only for this bounded calculation and processed in memory without retention."},"partitions":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Partitions supplied to Seeded Weighted Partition; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"partitions":["small","large"],"assignments":[{"item":"a","partition":"large"},{"item":"b","partition":"large"},{"item":"c","partition":"large"},{"item":"d","partition":"small"}]},"schema":"delx/util-seeded-weighted-partition/v1","status":"pass","evidence":{"retained":false,"input_sha256":"bc355c9f5168958f8f9c83eb5b12ec826acd7f53dd1ff17fc75aa269842d4ca8","external_calls":0},"operation":"seeded_decision:seeded_weighted_partition"}},"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_UJ3R4AGqWMGaBoiZqetMx","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 assigns a list of items to named partitions according to provided weights, using a seed for reproducible results.","exampleAgentPrompt":"Using a seed of 'experiment-42', assign these 5 user IDs ['u1','u2','u3','u4','u5'] to partitions ['control','treatment'] with weights 70 and 30.","exampleUseCases":[{"title":"A/B experiment group assignment","prompt":"I need to split these 200 user IDs into a 'control' group and a 'treatment' group at a 80/20 ratio — use the seed 'rollout-v2' so I get the same assignments every time I run it."},{"title":"Weighted task queue distribution","prompt":"Distribute these 10 job IDs ['job-1' through 'job-10'] across three workers named 'worker-alpha', 'worker-beta', and 'worker-gamma' with weights 50, 30, and 20, using seed 'shard-run-1'."},{"title":"Reproducible raffle winner selection","prompt":"I have 8 entries ['Alice','Bob','Carol','Dave','Eve','Frank','Grace','Hank'] for a raffle with two prize tiers 'grand' and 'consolation' weighted 1 and 7 — pick using seed 'raffle-2024' so the draw is auditable."}],"resultDescription":"Returns a JSON object containing the list of partitions, an array of item-to-partition assignments, a schema identifier, a status field ('pass'), and an evidence block with a SHA-256 hash of the input, a flag confirming no data was retained, and a count of zero external calls — enabling verifiable, auditable results.","failureModes":["Mismatched array lengths between items and weights may produce unexpected assignments","Seed string exceeding 8192 characters will be rejected","Items or partitions arrays exceeding 256 elements will be rejected","Non-integer weight values will cause a validation error","Payment failure via x402 protocol will block the request before computation"],"whenToPreferThis":"Choose this endpoint when you need deterministic, reproducible item-to-partition assignments with verifiable audit evidence (SHA-256 input hash, no-retention guarantee) — especially for A/B testing, experiment allocation, or load balancing scenarios where the same seed must always produce the same result. Prefer it over home-grown hashing when you need a verifiable, pay-per-call API with no signup friction and on-chain payment via USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:56:43.270Z","isFirstParty":false,"canonicalSlug":"delx-commerce-seeded-weighted-partition-1f48e59b"}