# JSON Empty Prune

> JSON Empty Prune 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 empty string, array, and object top-level values from a caller-supplied JSON object and returns counts and normalized results

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-empty-prune
- 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/json-empty-prune-ab30605f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GMmAhnC4X3XIJZf0-0HjJ

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 json-empty-prune-ab30605f -d '<json body>'
```

Example prompt: Clean up this JSON object by pruning all empty strings, empty arrays, and empty objects from the top level before I hand it off downstream: {"name": "Alice", "tags": [], "address": "", "meta": {}, "age": 30}.

## When to prefer this

Choose this endpoint when you need a fast, deterministic, in-memory JSON cleaning step with no external dependencies before handing structured data to a downstream tool with a strict contract. It is ideal for agent pipelines where empty fields would cause downstream validation failures, and when you need an auditable count of what was removed. Prefer it over custom preprocessing logic when operating in an x402 micropayment environment at minimal cost ($0.001 USDC per call).

## Known failure modes

- Object exceeds 128 top-level properties — rejected with a validation error
- Malformed JSON or non-object input — returns a schema error
- Payment not attached or insufficient USDC — returns 402 Payment Required
- Network timeout or service unavailability — returns 5xx error

## How this service works

JSON Empty Prune: JSON Empty Prune removes selected empty string, array, and object top-level values from bounded caller-supplied values without an external provider. Call JSON Empty Prune before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Empty Prune as versioned deterministic JSON. Price: $0.001 USDC via x402 on Bas…

## Output

Returns a versioned deterministic JSON object containing the pruned input object with empty top-level values removed, counts of how many entries were removed per type (empty strings, empty arrays, empty objects), and normalized values — all as a structured result envelope with a versioned result contract.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "object": {
   "type": "object",
   "description": "Object supplied to JSON Empty Prune; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "object": {
    "d": 1
   },
   "removed_keys": [
    "a",
    "b",
    "c"
   ]
  },
  "schema": "delx/util-json-empty-prune/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "f9cf0bb18905a0dc7f01e28106ee0e0ef53cb457dc27e0691f35144835ca7c57",
   "external_calls": 0
  },
  "operation": "data_batch:json_empty_prune"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-empty-prune-ab30605f/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)
