# JSON Null Prune

> JSON Null 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-15).

Removes all null-valued top-level keys from a JSON object and returns the pruned object with counts and a versioned result contract

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-null-prune
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-null-prune-70626d17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A_dChzTwrjQmJTw8DNFGz

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-null-prune-70626d17 -d '<json body>'
```

Example prompt: Clean up this JSON object by removing any top-level keys that have null values before I pass it to the next tool: {"user_id": 42, "name": null, "email": "test@example.com", "phone": null}.

## When to prefer this

Use this endpoint when an agent needs to clean a JSON object of null top-level keys before passing it to a downstream tool with a strict or null-intolerant schema contract. Prefer it over manual filtering logic when you need a versioned, auditable, deterministic result with key counts. It is lightweight ($0.001 USDC), in-memory with no retention, and purpose-built for agentic pipeline hygiene.

## Known failure modes

- Input object exceeds 128 top-level properties — rejected with validation error
- Input is not a valid JSON object (e.g. array or primitive) — returns schema error
- Network or payment failure via x402 protocol — returns HTTP 402 or connection error
- Empty object input — returns empty pruned object with zero counts

## How this service works

JSON Null Prune: JSON Null Prune removes null-valued top-level keys from a JSON object from bounded caller-supplied values without an external provider. Call JSON Null 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 Null Prune as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party,…

## Output

Returns a versioned deterministic JSON object containing the pruned input object (all null top-level keys removed), a count of keys removed, a count of keys retained, and normalized values — all within a versioned result contract envelope.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "object": {
   "type": "object",
   "description": "Object supplied to JSON Null 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": {
    "a": 1,
    "c": 0
   },
   "removed_keys": [
    "b"
   ]
  },
  "schema": "delx/util-json-null-prune/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "87c8df8571467e64e55b273ef3bf9c2fffef2d81ad0cab8581f5a7d7a6236c39",
   "external_calls": 0
  },
  "operation": "data_batch:json_null_prune"
 }
}
```

## More

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