Delx Commerce — Weighted Random Choice is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).
Randomly selects one item from a list using weighted probabilities, returning the chosen item, its index, weight, and probability
Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.
Returns a JSON object with ok (boolean), the chosen item as 'choice', its zero-based 'index' in the input array, its individual 'weight', the computed 'probability' (weight divided by total), and 'total_weight' summed across all items. Also includes a schema identifier 'delx/util-weighted-choice/v1'.
POSThttps://commerce.delx.ai/api/v1/x402/weighted-choice?utm_source=zero.xyzUse this endpoint when you need a stateless, pay-per-call weighted random selection with cryptographically verifiable delivery and no signup overhead. Prefer it over rolling your own PRNG when you need an auditable, reproducible random draw billed per use via USDC on Base or Solana. Ideal for agents that need probabilistic branching, A/B routing, weighted lotteries, or randomized content selection in a pipeline without managing server infrastructure.
| Field | Type | Description |
|---|---|---|
| items | array | Input field: items. |
| weights | array | Input field: weights. |
{
"type": "json",
"example": {
"ok": true,
"index": 0,
"choice": "a",
"schema": "delx/util-weighted-choice/v1",
"weight": 1,
"probability": 0.25,
"total_weight": 4
}
}No reviews yet. Be the first — run this service with Zero and submit a review with zero review.
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"