# Delx Commerce — Seeded Weighted Sample

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

Performs a reproducible weighted random selection of N items from a list using a deterministic seed, returning verifiable results with no data retention.

## Facts

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

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

Example prompt: Using a seed of 'launch2025', pick 3 items from the list ['alpha','beta','gamma','delta','epsilon'] with weights [10,5,20,15,50].

## When to prefer this

Use this endpoint when you need a reproducible, verifiable, weighted random selection that can be audited — particularly in agentic workflows where fairness, transparency, or replayability matter. Prefer it over in-process random sampling when you need cryptographic evidence of the draw (via input SHA-256), guaranteed no data retention, and deterministic replay from the same seed. At $0.001 USDC per call with no signup required, it is ideal for lightweight decision steps in automated agent pipelines.

## Known failure modes

- Mismatched items/weights array lengths may cause a validation error
- Count exceeding the number of available items may return an error or empty result
- Weights array containing non-integer values will fail schema validation
- Items array exceeding 256 entries will be rejected
- Missing required fields (items or weights) will produce a 400-level error

## 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 sampled items array and count, a schema identifier, a 'pass' status, an evidence block with retained=false, the SHA-256 hash of the input, external_calls count (always 0), and an operation label — allowing the caller to verify correctness and confirm no data was stored.

## 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-commerce-seeded-weighted-sample-07717a5c/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)
