DELXCOMMERCE Live contract

Agent operations · agent-operations

Seeded Random Sample

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.

x402commercerandomnesslocal-only

One-command purchase

Run it from an agent.

No account or API key. AgentCash reads the 402 challenge, pays no more than the declared cap, retries the request and returns the result.

npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/seeded-random-sample -m POST -H 'x-delx-source: product-page' --max-amount 0.001 -b '{"items":["alpha","beta","gamma","delta"],"count":2,"seed":"workflow-42"}'
InputPOST /api/v1/x402/seeded-random-sample
{
  "items": [
    "alpha",
    "beta",
    "gamma",
    "delta"
  ],
  "count": 2,
  "seed": "workflow-42"
}
Delivered resultapplication/json
{
  "schema": "delx/util-seeded-random-sample/v1",
  "sample": [
    "gamma",
    "beta"
  ],
  "indices": [
    2,
    1
  ],
  "count": 2,
  "source_count": 4,
  "without_replacement": true,
  "seed_sha256": "f55bbb81faa69aaf4936ce9f0aa962c442851e4550566b83cc10573d585a0ed2"
}

Machine-readable evidence

Inspect before paying.