# Delx Commerce — Seeded Weighted Choice

> Delx Commerce — Seeded Weighted 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).

Deterministically selects one item from a weighted list using a seed, returning the chosen item's index and value with verifiable evidence.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/seeded-weighted-choice?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-seeded-weighted-choice-ee4e0741
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FHDgO_ZXXLI2m3Bs1Ngkr

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-commerce-seeded-weighted-choice-ee4e0741 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-seeded-weighted-choice-ee4e0741/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
