# Delx Commerce — Seeded Train/Test Split

> Delx Commerce — Seeded Train/Test Split 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-02).

Deterministically splits a list of integer items into train and test sets using a reproducible seed and a specified test fraction.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/seeded-train-test-split?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-seeded-train-test-split-a864d4b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QCiIAl4IKBdvX7w0JpuuU

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-train-test-split-a864d4b5 -d '<json body>'
```

Example prompt: Split the integer list [1, 2, 3, 4, 5] into train and test sets using seed 'my-experiment-42' and a test fraction of 0.2 — I need the result to be reproducible every time.

## When to prefer this

Choose this endpoint when you need a deterministic, reproducible, and verifiably auditable train/test split for a small integer dataset (up to 256 items) — especially in automated agent pipelines where cryptographic evidence of in-memory-only processing and no external calls matters. Prefer it over local random splits when reproducibility across machines or auditability is required and pay-per-call microtransaction economics fit your workflow.

## Known failure modes

- Invalid or missing test_fraction (e.g. outside 0-1 range) may cause a validation error
- Items array exceeding 256 elements returns a schema validation error
- Seed string exceeding 8192 characters is rejected
- Payment failure (insufficient USDC balance) returns HTTP 402
- Malformed request body returns 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 'train' and 'test' arrays of integers, the operation name, status ('pass'), and an evidence block including a SHA-256 hash of the input, a flag confirming no data was retained, and the count of external calls made — providing verifiable, auditable proof of the computation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "string",
   "maxLength": 8192,
   "description": "Seed supplied to Seeded Train Test Split; used only for this bounded calculation and processed in memory without retention."
  },
  "items": {
   "type": "array",
   "items": {
    "type": "integer"
   },
   "maxItems": 256,
   "description": "Items supplied to Seeded Train Test Split; used only for this bounded calculation and processed in memory without retention."
  },
  "test_fraction": {
   "type": "number",
   "description": "Test Fraction supplied to Seeded Train Test Split; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "test": [
    5
   ],
   "train": [
    1,
    3,
    2,
    4
   ]
  },
  "schema": "delx/util-seeded-train-test-split/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "0584495460669e5b8cdc192403f94897df5ed2ef02ef94dff1c52727c63d9fe5",
   "external_calls": 0
  },
  "operation": "seeded_decision:seeded_train_test_split"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-seeded-train-test-split-a864d4b5/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)
