# JSON Validate/Format

> JSON Validate/Format is a paid API for AI agents from conclavex402.pythonanywhere.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-18).

Validates JSON for correctness, pretty-prints it with configurable indentation (0–8 spaces), or minifies it into compact form.

## Facts

- Endpoint: POST https://conclavex402.pythonanywhere.com/u/json?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-validate-format-63db5c8a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Al9xG1mbiZBToIoqB_PWE

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-validate-format-63db5c8a -d '<json body>'
```

Example prompt: Can you check if this JSON is valid and pretty-print it with 4 spaces of indentation: {"name":"Alice","age":30,"active":true}?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call JSON validation or formatting step inside an automated pipeline without standing up your own JSON tooling. Ideal for agents that need to verify third-party data payloads before processing them, or to normalize JSON formatting for human review or downstream storage. Its low per-call cost ($0.005 USDC) makes it practical for high-frequency formatting tasks.

## Known failure modes

- Malformed input JSON causes validation failure with an error message rather than a formatted result
- Missing required 'input' field returns a 400-level error
- Indentation level outside 0–8 range may be rejected or clamped
- Non-JSON body type may cause deserialization errors
- Payment failure or insufficient funds returns a 402 Payment Required

## How this service works

Validate, pretty-print (0-8 spaces), or minify JSON — json formatter/validator.

## Output

Returns a JSON object with a 'valid' boolean indicating whether the input is valid JSON, and a 'formatted' string containing the pretty-printed or minified result. If invalid, an error description is typically included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-validate-format-63db5c8a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from conclavex402.pythonanywhere.com](https://www.zero.xyz/host/conclavex402.pythonanywhere.com/llms.txt)
