# Delx Commerce — Flatten Array Utility (flatten1)

> Delx Commerce — Flatten Array Utility (flatten1) 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).

Flattens a nested array structure by one level and returns the resulting flat list with a count.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/flatten1?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-flatten-array-utility-flatten1-73f1850e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sRbieyndobAIc39W-6yeu

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-flatten-array-utility-flatten1-73f1850e -d '<json body>'
```

Example prompt: Can you flatten this nested array by one level: [[1, 2], [3, [4, 5]], 6]? I just need one level of depth removed, not fully recursive.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call, no-signup utility to flatten one level of a nested array, especially in agent pipelines using x402 micropayments on Base or Solana. Ideal for lightweight data normalization steps where spinning up a local computation is overkill or unavailable.

## Known failure modes

- Missing or empty 'items' field returns an error
- Non-array value passed as items causes a validation error
- Payment failure via x402 prevents execution
- Malformed JSON body results in a parse error

## 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 flattened array under 'items', the count of resulting elements under 'count', and a schema identifier string 'delx/util-flatten1/v1'.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 4,
  "items": [
   1,
   2,
   3,
   4
  ],
  "schema": "delx/util-flatten1/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-flatten-array-utility-flatten1-73f1850e/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)
