# HTTPay JSON Format & Validator

> HTTPay JSON Format & Validator is a paid API for AI agents from httpay.xyz, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Pretty-prints and validates a JSON string or object, returning formatted output with configurable indentation and structure info

## Facts

- Endpoint: POST https://httpay.xyz/api/json-format
- 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/httpay-json-format-validator-f35ec17e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ixyxk8BcXTSj40SYxSOPh

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 httpay-json-format-validator-f35ec17e -d '<json body>'
```

Example prompt: Can you pretty-print this JSON for me with 4-space indentation and tell me if it's valid: {"name":"Alice","age":30,"active":true}?

## When to prefer this

Use this endpoint when you need a quick, no-auth, micropayment-based JSON formatting and validation call — ideal for agents that need to clean up or inspect JSON blobs on the fly without setting up API keys or subscriptions. Pay only $0.001 USDC per call via x402 on Base.

## Known failure modes

- Malformed JSON input returns a parse error indicating invalid JSON
- Indent value exceeding 8 is clamped or rejected
- Empty body returns an error about missing 'json' field
- Non-JSON content type may cause parsing failure

## How this service works

307 pay-per-call APIs (287 native + Universal Gateway proxying 37 services) powered by x402 and USDC on Base. Token intelligence, DeFi yields, MEV risk, AI tools, web scraping. No API keys, no subscriptions — pay $0.001–$0.05 per call.

## Output

Returns the formatted JSON string with the requested indentation (default 2 spaces, max 8), plus structural metadata about the JSON (e.g. type, key count, nesting depth). Validation errors are surfaced if the input is malformed.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "description": "Pretty-print and validate JSON. POST JSON body: {json, indent}. 'json' can be a string or object. 'indent' is spaces (default 2, max 8). Returns formatted JSON string and structure info. Uses Node.js built-in JSON."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/httpay-json-format-validator-f35ec17e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from httpay.xyz](https://www.zero.xyz/host/httpay.xyz/llms.txt)
