# Delx Seeded Weighted Choice

> Delx Seeded Weighted Choice is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Deterministically selects one item from a weighted list using a seed string, returning the chosen item and its index.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/seeded-weighted-choice
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-seeded-weighted-choice-8a722bd6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sVCodkfDMnY6Kwm_DDgTS

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-seeded-weighted-choice-8a722bd6 -d '<json body>'
```

Example prompt: Using a seeded weighted choice, pick one option from ["fast", "slow", "medium"] with weights [0.6, 0.1, 0.3] using the seed "run-42" — I need the result to be reproducible every time.

## When to prefer this

Choose this endpoint when you need deterministic, reproducible weighted selection — i.e., the same seed must always produce the same result. It is ideal for auditable decisions (A/B testing, task routing, prize draws) where you need a verifiable input hash and guaranteed no data retention. Prefer this over pure random selection when reproducibility and auditability matter, and over client-side implementations when you want a governed, logged, off-device computation.

## Known failure modes

- Mismatched array lengths between items and weights — likely returns a validation error
- Weights summing to zero or containing negative values — undefined or error behavior
- Items or weights arrays exceeding 256 elements — rejected by maxItems constraint
- Seed string exceeding 8192 characters — rejected by maxLength constraint
- Empty items array — no item to select, likely an error response
- Invalid JSON body — HTTP 400 or parse error

## How this service works

Seeded Weighted Choice: Seeded Weighted Choice selects one item using non-negative caller weights from bounded caller-supplied values without an external provider. Call Seeded Weighted Choice when an agent needs a reproducible decision that another run can independently replay. Returns the deterministic selection plus seed provenance, population bounds, and the operation-specific outcome for Seeded Weighted Choice as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party…

## Output

Returns a JSON object containing the selected item string, its zero-based index in the input array, operational metadata including whether input was retained (always false), a SHA256 hash of the inputs for auditability, and the number of external calls made (always 0). The schema version and operation name are also included.

## 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-seeded-weighted-choice-8a722bd6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
