# Delx Commerce — Seeded Weighted Partition

> Delx Commerce — Seeded Weighted Partition 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 assigns a list of items to named partitions according to provided weights, using a seed for reproducible results.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/seeded-weighted-partition?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-weighted-partition-1f48e59b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t_V8mpmRbwfN3QpZ4PVSk

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-weighted-partition-1f48e59b -d '<json body>'
```

Example prompt: Using a seed of 'experiment-42', assign these 5 user IDs ['u1','u2','u3','u4','u5'] to partitions ['control','treatment'] with weights 70 and 30.

## When to prefer this

Choose this endpoint when you need deterministic, reproducible item-to-partition assignments with verifiable audit evidence (SHA-256 input hash, no-retention guarantee) — especially for A/B testing, experiment allocation, or load balancing scenarios where the same seed must always produce the same result. Prefer it over home-grown hashing when you need a verifiable, pay-per-call API with no signup friction and on-chain payment via USDC.

## Known failure modes

- Mismatched array lengths between items and weights may produce unexpected assignments
- Seed string exceeding 8192 characters will be rejected
- Items or partitions arrays exceeding 256 elements will be rejected
- Non-integer weight values will cause a validation error
- Payment failure via x402 protocol will block the request before computation

## 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 the list of partitions, an array of item-to-partition assignments, a schema identifier, a status field ('pass'), and an evidence block with a SHA-256 hash of the input, a flag confirming no data was retained, and a count of zero external calls — enabling verifiable, auditable results.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "string",
   "maxLength": 8192,
   "description": "Seed supplied to Seeded Weighted Partition; used only for this bounded calculation and processed in memory without retention."
  },
  "items": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Items supplied to Seeded Weighted Partition; used only for this bounded calculation and processed in memory without retention."
  },
  "weights": {
   "type": "array",
   "items": {
    "type": "integer"
   },
   "maxItems": 256,
   "description": "Weights supplied to Seeded Weighted Partition; used only for this bounded calculation and processed in memory without retention."
  },
  "partitions": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Partitions supplied to Seeded Weighted Partition; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "partitions": [
    "small",
    "large"
   ],
   "assignments": [
    {
     "item": "a",
     "partition": "large"
    },
    {
     "item": "b",
     "partition": "large"
    },
    {
     "item": "c",
     "partition": "large"
    },
    {
     "item": "d",
     "partition": "small"
    }
   ]
  },
  "schema": "delx/util-seeded-weighted-partition/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "bc355c9f5168958f8f9c83eb5b12ec826acd7f53dd1ff17fc75aa269842d4ca8",
   "external_calls": 0
  },
  "operation": "seeded_decision:seeded_weighted_partition"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-seeded-weighted-partition-1f48e59b/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)
