# Seeded Random Sample

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

Selects a reproducible, deterministic random sample without replacement from a caller-supplied list using a seed string, returning sampled values, original indices, and a seed hash.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/seeded-random-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/seeded-random-sample-58ff5e78
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6HQ_MowKYu-hFoSxNUPEk

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 seeded-random-sample-58ff5e78 -d '<json body>'
```

Example prompt: Randomly pick 5 items from this list ['apple','banana','cherry','date','elderberry','fig','grape','honeydew'] using seed 'mission-alpha-42', so I get the same result every time I retry.

## When to prefer this

Choose this endpoint when you need a reproducible, auditable random sample that multiple agents or retries must agree on. Ideal for distributed agent workflows where consistency across runs is critical, or when you need to prove to a third party that a selection was made fairly from a fixed seed. Prefer over local PRNG when the selection must be stateless, verifiable, and consistent across different environments or machines.

## Known failure modes

- count exceeds items length — cannot sample more items than available without replacement
- count or items array exceeds maximum bounds (1000)
- seed string missing or empty — required for deterministic output
- malformed items array or non-array type
- payment not completed — x402 payment required before response is returned

## How this service works

Select a reproducible sample without replacement from a bounded caller-supplied list. Use when multiple agents or retries must reach the same selection from the same seed. Returns sampled values, original indices, and a seed hash for 0.001 USDC via x402 on Base; local-only, stateless, and no input retention.

## Output

Returns the sampled subset of values drawn from the input list, their original zero-based indices within the input array, and a hash of the seed used — enabling reproducibility verification. Sample is without replacement, deterministic for a given seed and input.

## 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/seeded-random-sample-58ff5e78/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)
