# Delx Commerce — List Length Utility

> Delx Commerce — List Length Utility 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-01).

Returns the length and a sample of an array, plus whether it is empty, for a given list of items.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/list-len?utm_source=zero.xyz
- Price: $0.001/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-list-length-utility-af083bcf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yS2oUTinahQIVcU2viWtv

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-list-length-utility-af083bcf -d '<json body>'
```

Example prompt: Can you check how many items are in this list — ["apple", "banana", "cherry"] — and tell me if it's empty or not, plus show me a quick sample?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call way to count and inspect an array without setting up any account or subscription. It is ideal for agent pipelines that need to gate downstream steps on list size or emptiness, and when verifiable, on-chain payment via USDC (Base or Solana) is preferred over API-key billing.

## Known failure modes

- Missing or non-array 'items' field returns an error response
- Empty or malformed JSON body may cause a 400-level error
- Payment failure via x402 protocol prevents execution
- Extremely large arrays may hit size limits

## 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: 'ok' (boolean success flag), 'empty' (whether the list has zero items), 'length' (integer count of items), 'sample' (first few elements from the list), and 'schema' (a versioned schema identifier 'delx/util-list-len/v1').

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "empty": false,
  "length": 3,
  "sample": [
   "a",
   "b",
   "c"
  ],
  "schema": "delx/util-list-len/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-list-length-utility-af083bcf/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)
