# Delx Seeded Stratified Split

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

Splits a labeled dataset into train and test index sets using a reproducible seed and stratified sampling to preserve label distribution.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/seeded-stratified-split
- 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/delx-seeded-stratified-split-0341b3cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eUksUHRmQt9hRyjSRi2As

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-seeded-stratified-split-0341b3cd -d '<json body>'
```

Example prompt: Split this list of labels ['cat','dog','cat','bird','dog'] into train and test sets using seed 'abc123' with a 0.3 test fraction, keeping the class distribution balanced.

## When to prefer this

Use this endpoint when you need a reproducible, stratified train/test split by index — especially when label class balance matters and you want the same partition every time given the same seed. Prefer this over random splits when debugging model pipelines, running ablations, or sharing experiment configurations with teammates. It is lightweight, stateless, and leaves no data on server (evidenced by the retained:false flag), making it safe for sensitive label sets.

## Known failure modes

- Invalid test_fraction (must be between 0 and 1 exclusive) causes a validation error
- Empty or null labels array returns an error or trivially empty split
- test_fraction so large or small that one split receives zero samples may cause an edge-case failure
- Labels array exceeding 256 items is rejected by the schema
- Malformed seed (exceeding 8192 chars) may be rejected
- Network or service unavailability returns a non-200 HTTP response

## How this service works

Seeded Stratified Split: Seeded Stratified Split splits labeled items while preserving per-label proportions from bounded caller-supplied values without an external provider. Call Seeded Stratified Split when an agent needs a reproducible decision that another run can independently replay. Returns the deterministic selection plus seed provenance, population bounds, and the operation-specific outcome for Seeded Stratified Split as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base…

## Output

Returns a JSON object containing 'test_indices' and 'train_indices' arrays (integer positions into the original labels array), a status field ('pass'), operation name, and an evidence block confirming no data retention and zero external calls, along with an input SHA-256 hash for auditability.

## 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-seeded-stratified-split-0341b3cd/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)
