# Delx Array Compact

> Delx Array Compact 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-14).

Removes null and empty values from an input array and returns the compacted list along with counts of remaining and removed items.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/arr-compact
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-array-compact-401029cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IZIV9SiOq8HS9N6yDF6Sj

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-array-compact-401029cd -d '<json body>'
```

Example prompt: Clean up this array by removing all null and empty values before I serialize it: ["apple", null, "", "banana", null, "cherry"].

## When to prefer this

Use this endpoint when you need a lightweight, stateless, zero-retention way to strip null and empty values from an array before serialization or downstream processing — especially in agent pipelines where clean JSON is required. Prefer this over writing inline filtering logic when you want a consistent, cost-predictable microservice call at $0.001 USDC.

## Known failure modes

- Missing or malformed 'items' field returns an error
- Non-array input for items field may cause a validation error
- Payment failure via x402 protocol blocks processing
- Empty input array returns an empty compacted array with zero removed

## How this service works

Drop null/empty values from a list. Call when you clean agent arrays before serialization. Returns compacted items, count, removed for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object containing: the compacted array with all null and empty values removed, the count of remaining items, and the count of removed items.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-array-compact-401029cd/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)
