# Delx Commerce — Categorical Distribution

> Delx Commerce — Categorical Distribution is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Computes a categorical frequency distribution from an array of values, returning counts, percentages, and unique category stats.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/categorical-distribution?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-categorical-distribution-171154dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1T5iDMj4AXfeYIpfNeB2D

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-categorical-distribution-171154dc -d '<json body>'
```

Example prompt: Take this list of job statuses — ['ready','ready','failed'] — and give me a categorical distribution showing how many times each status appears and what percentage it represents.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call categorical frequency breakdown with no signup overhead. Ideal for AI agents that need on-the-fly distribution analysis of discrete label arrays (e.g. statuses, categories, survey answers) within a crypto-native payment workflow using USDC on Base or Solana.

## Known failure modes

- Missing or empty values array returns an error or empty distribution
- Non-array input types cause schema validation failure
- Payment failure via x402 protocol prevents API execution
- Extremely large arrays may result in truncated output (truncated: true)

## 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 with the total count, a schema identifier, a truncated flag, a list of categories each with their value, count, and percentage, and the total unique category count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "values": {
   "type": "array",
   "description": "Input field: values."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 3,
  "schema": "delx/util-categorical-distribution/v1",
  "truncated": false,
  "categories": [
   {
    "count": 2,
    "value": "ready",
    "percent": 66.6667
   },
   {
    "count": 1,
    "value": "failed",
    "percent": 33.3333
   }
  ],
  "unique_count": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-categorical-distribution-171154dc/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)
