# Delx Commerce — Seeded Stratified Split

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

Splits a labeled dataset into reproducible train/test index sets using a seed and stratified sampling, with verifiable in-memory processing and no data retention.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/seeded-stratified-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-stratified-split-80ee7078
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_F7-alXmCz2fP8NyYg4tni

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-stratified-split-80ee7078 -d '<json body>'
```

Example prompt: Split these labels [0,1,0,1,1,0,1,0] into train and test sets using seed 'exp-42' with a 20% test fraction, and give me back the train and test indices — no data should be retained.

## When to prefer this

Prefer this endpoint when you need a reproducible, stratified train/test split without standing up any infrastructure, especially in agent workflows where verifiable no-retention processing and an audit-trail hash are important. It is ideal for one-shot, pay-per-call ML data partitioning with no signup overhead, and when class-balanced splits must be reproducible across runs via a fixed seed. It is not a substitute for full-featured ML pipeline tools when you need k-fold cross-validation or more complex sampling strategies.

## Known failure modes

- Invalid test_fraction (must be between 0 and 1 exclusive) causing a validation error
- Labels array empty or containing fewer items than required to produce both train and test splits
- Seed value exceeds 8192 character limit
- Individual label strings exceed 8192 character limit
- Labels array exceeds 256-item maximum
- Payment failure or insufficient USDC balance preventing call execution

## 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 test_indices and train_indices arrays (integer positions into the original labels array), a status field ('pass'), an operation identifier, and an evidence block confirming zero external calls, no data retention, and an SHA256 hash of the input for verifiability.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "test_indices": [
    0,
    2
   ],
   "train_indices": [
    1,
    3,
    4
   ]
  },
  "schema": "delx/util-seeded-stratified-split/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "08664b0c9a268e7fa50dce77287db1f0a1c365e4d2c6715a151b40ea08b5e4b9",
   "external_calls": 0
  },
  "operation": "seeded_decision:seeded_stratified_split"
 }
}
```

## More

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