# Delx Seeded Weighted Sample

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

Randomly samples a specified count of items from a weighted list using a deterministic seed, returning reproducible results without retaining input data.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/seeded-weighted-sample
- 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-sample-cb7292cc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fcrqrP8gt6vgswfW2sgas

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-sample-cb7292cc -d '<json body>'
```

Example prompt: Using a seeded weighted sample, pick 3 items from ["feature-a", "feature-b", "feature-c", "feature-d"] with weights [10, 50, 25, 15] using seed "experiment-42" — I need reproducible results every time I run this.

## When to prefer this

Choose this endpoint when you need deterministic, reproducible weighted random sampling — i.e. the same seed must always yield the same result. Ideal for agent workflows requiring auditable, stateless randomization (e.g. user assignment, load balancing, content rotation) where you need a verifiable SHA-256 input hash and a guarantee of no data retention. Prefer over custom code when operating in a sandboxed agent environment without a reliable RNG library.

## Known failure modes

- Mismatched array lengths between items and weights may cause errors or unexpected behavior
- Count exceeding the number of items could return fewer results or error
- Items or weights arrays exceeding 256 elements will be rejected
- Seed string exceeding 8192 characters will be rejected
- Invalid types (e.g. non-integer weights, non-string items) will fail schema validation

## How this service works

Seeded Weighted Sample: Seeded Weighted Sample samples unique items using caller weights without replacement from bounded caller-supplied values without an external provider. Call Seeded Weighted Sample 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 Sample as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base.…

## Output

Returns a JSON object with the sampled items array and count, plus evidence metadata including a SHA-256 hash of the input (for auditability), confirmation that no data was retained, and the number of external calls made (zero). 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 Sample; used only for this bounded calculation and processed in memory without retention."
  },
  "count": {
   "type": "integer",
   "description": "Count supplied to Seeded Weighted Sample; 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 Sample; 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 Sample; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "count": 2,
   "items": [
    "a",
    "c"
   ]
  },
  "schema": "delx/util-seeded-weighted-sample/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "4b94fab1aa6acc04be7b55390f0c8075b8e83c859b6ceaccfd3469af77bb03fd",
   "external_calls": 0
  },
  "operation": "seeded_decision:seeded_weighted_sample"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-seeded-weighted-sample-cb7292cc/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)
