# JSON Pretty Printer

> JSON Pretty Printer is a paid API for AI agents from agent-utility-network.frosty-sound-4560.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Formats a raw JSON string into human-readable, indented pretty-printed JSON output.

## Facts

- Endpoint: POST https://agent-utility-network.frosty-sound-4560.workers.dev/v1/paid/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/json-pretty-printer-e081bc2f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pWZEeSSP8hxdh-nAjJTBJ

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-pretty-printer-e081bc2f -d '<json body>'
```

Example prompt: Can you pretty-print this JSON for me so it's readable? Here's the input: {"a":1,"b":{"c":2,"d":[3,4,5]}}

## When to prefer this

Choose this endpoint when you have a valid but compact or minified JSON string and need it formatted for readability — for display, logging, debugging, or documentation purposes. If your JSON is malformed or broken, use the sibling JSON-repair endpoint first. This endpoint is purpose-built for formatting only and is ideal for agents that need to present structured data in a human-friendly way.

## Known failure modes

- Invalid or malformed JSON input returns an error (for malformed JSON, consider the sibling JSON-repair endpoint first)
- Input exceeding 100,000 characters is rejected
- Empty string input is rejected (minLength: 1)
- Payment failure via x402/Base USDC causes request to be denied

## How this service works

Quality-scored paid utility APIs for AI agents over x402 on Base USDC.

## Output

Returns a JSON object with a `result.formatted` field containing the input JSON re-serialized with standard 2-space indentation and newlines, making nested structures human-readable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 100000,
   "minLength": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "formatted": "{\n  \"a\": 1\n}"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-pretty-printer-e081bc2f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-utility-network.frosty-sound-4560.workers.dev](https://www.zero.xyz/host/agent-utility-network.frosty-sound-4560.workers.dev/llms.txt)
