# Delx Pretty-Print JSON

> Delx Pretty-Print JSON 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).

Reformats serialized JSON text into indented, human-readable output; returns a structured error for invalid JSON.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-pretty
- 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-pretty-print-json-f16ed365
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7Af7bESyIIfYqgzQUS17U

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-pretty-print-json-f16ed365 -d '<json body>'
```

Example prompt: Can you pretty-print this JSON for me so I can read it? Here it is: {"name":"Alice","age":30,"active":true}

## When to prefer this

Choose this endpoint when you need a deterministic, first-party JSON formatter with no API key or subscription requirements, billed only on success via x402 micropayment. Ideal for agents that need to pretty-print configs, API responses, or debug dumps before presenting them to humans, especially in pipelines where a lightweight pay-per-use formatter is preferable to bundling a local JSON library.

## Known failure modes

- Invalid JSON input returns a structured error response (not an HTTP error), with details about the parse failure
- Malformed or empty json_text field may return a validation error
- Network or payment failure via x402 may prevent the call from completing

## How this service works

Pretty-print JSON. Call before showing configs to humans or attaching readable debug dumps. Returns indented JSON text; invalid JSON returns a structured error. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.

## Output

Returns the input JSON reformatted with standard indentation and newlines, making it human-readable. If the input is not valid JSON, returns a structured error object describing the parse failure rather than throwing an exception.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json_text": {
   "type": "string",
   "description": "Serialized JSON text to inspect or reformat."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "{\n  \"agent\": \"delx\",\n  \"ready\": true\n}",
  "schema": "delx/json-pretty/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-pretty-print-json-f16ed365/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)
