# VerifyLite JSON Sanitizer & Schema Validator

> VerifyLite JSON Sanitizer & Schema Validator is a paid API for AI agents from verifylite.hydratinghealingtouch.workers.dev, paid per call via x402, $0.0039/call, status unknown (last checked 2026-10-23).

Repairs malformed LLM JSON output by stripping Markdown fences, fixing syntax errors, and optionally validating against a JSON Schema

## Facts

- Endpoint: POST https://verifylite.hydratinghealingtouch.workers.dev/sanitize-json?utm_source=zero.xyz
- Price: $0.0039/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/verifylite-json-sanitizer-schema-validator-40c40609
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XdXe3xLUk5FQod8eJk2Uy

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 verifylite-json-sanitizer-schema-validator-40c40609 -d '<json body>'
```

Example prompt: The LLM gave me this messy response with markdown code fences and trailing commas — can you clean it up and validate it against this schema: {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}}}?

## When to prefer this

Choose this endpoint when you need to reliably parse JSON emitted by an LLM that may include Markdown code fences, prose wrapping, Python-style booleans/nulls, trailing commas, single-quoted strings, unquoted keys, or truncated brackets. It is especially useful in agentic pipelines where structured LLM output must be validated against a known schema before downstream use. Prefer it over a simple JSON.parse() call whenever LLM output quality cannot be guaranteed, or when schema conformance is required.

## Known failure modes

- Input contains no recoverable JSON structure — returns error indicating nothing could be repaired, no charge applied
- Input exceeds 30,000 character limit — returns a size error
- Provided JSON Schema is itself malformed — schema validation step may fail or be skipped
- JSON is repaired but fails schema validation — returns repaired JSON plus list of schema errors
- Network timeout to Cloudflare Worker — returns connection error
- x402 payment failure or insufficient USDC balance — returns payment required error

## How this service works

Turns messy LLM output into valid JSON: strips Markdown code fences and surrounding prose, fixes trailing commas, single quotes, unquoted keys, comments, Python True/None, cut-off brackets, and stringified JSON. Optionally validates the result against a JSON Schema (draft 4 to 2020-12) and lists each error with its location. Returns the parsed data, the JSON text, and what was changed. Not charged if no JSON can be recovered or the input is invalid.

## Output

Returns a parsed data object (the repaired JSON parsed into native types), the repaired JSON as a string, a list of transformations applied (e.g. stripped code fences, fixed trailing commas), and if a JSON Schema was provided, a list of validation errors with their locations. If no valid JSON can be recovered, no charge is applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "The broken JSON or LLM reply, up to 30,000 characters."
  },
  "schema": {
   "type": "object",
   "description": "Optional JSON Schema to validate the repaired data against."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/verifylite-json-sanitizer-schema-validator-40c40609/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from verifylite.hydratinghealingtouch.workers.dev](https://www.zero.xyz/host/verifylite.hydratinghealingtouch.workers.dev/llms.txt)
