# Delx Commerce — Seeded Random Sample

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

Returns a reproducible random sample of items from an array, deterministically driven by a seed string, with verifiable delivery paid per-call in USDC.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/seeded-random-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-random-sample-1dd89f4a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_frPQf20ln89Bo5Txk5NHC

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-random-sample-1dd89f4a -d '<json body>'
```

Example prompt: From this list of 50 contest entrants, randomly pick 3 winners using the seed 'contest-2024-finale' so the draw is reproducible and verifiable.

## When to prefer this

Choose this endpoint when you need reproducible, auditable random sampling — i.e. the same seed must always yield the same result and the draw must be verifiable via the seed hash. Ideal for lotteries, experiment group splits, or any scenario where fairness and auditability matter. Prefer over local RNG when verifiable delivery and payment-per-result accountability are required, or when running inside an agent that cannot safely maintain RNG state.

## Known failure modes

- count exceeds items array length when sampling without replacement — returns error
- seed string missing or empty — validation error
- count less than 1 or greater than 1000 — out-of-range error
- items array empty or missing — no items to sample from
- payment not included or insufficient USDC — 402 Payment Required response

## 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 with: the sampled items array, the integer indices selected from the source, the count of items returned, the total source count, a SHA-256 hash of the seed for verification, and a schema identifier confirming without-replacement sampling.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "string",
   "maxLength": 256,
   "minLength": 1
  },
  "count": {
   "type": "integer",
   "maximum": 1000,
   "minimum": 1
  },
  "items": {
   "type": "array",
   "maxItems": 1000
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "sample": [
   "gamma",
   "beta"
  ],
  "schema": "delx/util-seeded-random-sample/v1",
  "indices": [
   2,
   1
  ],
  "seed_sha256": "f55bbb81faa69aaf4936ce9f0aa962c442851e4550566b83cc10573d585a0ed2",
  "source_count": 4,
  "without_replacement": true
 }
}
```

## More

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