# Deterministic LLM JSON Repair & Schema Validator

> Deterministic LLM JSON Repair & Schema Validator is a paid API for AI agents from email-verify.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-28).

Repairs truncated, malformed, or markdown-wrapped JSON from LLM outputs so multi-agent pipelines can process structured data without crashing

## Facts

- Endpoint: POST https://email-verify.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Provider: email-verify.agentdiet.dev
- Website: https://email-verify.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/email-verify-agentdiet-dev-deterministic-llm-json-repair-schema-359ed827
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BiZmItJQGy6ikgf-0F2Q3

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 email-verify-agentdiet-dev-deterministic-llm-json-repair-schema-359ed827 -d '<json body>'
```

Example prompt: This JSON came back from the LLM but it has trailing commas and markdown fences and is crashing my parser — can you fix it so it's valid JSON I can use? Here it is: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair of LLM outputs rather than probabilistic LLM-based re-generation. Ideal for multi-agent pipelines where reliability and consistency are critical, especially when outputs frequently contain trailing commas, markdown code fences, or single-quoted strings. Best suited for structured data recovery in automated workflows where you cannot tolerate crashes from malformed JSON.

## Known failure modes

- Input is so severely corrupted that deterministic repair is impossible — returns error indicating unrecoverable JSON
- Input string is empty or whitespace — fails minLength validation
- JSON is structurally ambiguous after truncation and cannot be deterministically closed — may return partial repair with warning
- Non-JSON input (e.g. plain text, XML) passed as raw_json — repair attempt may fail or return unexpected output

## How this service works

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://email-verify.agentdiet.dev/v1/llm-json-schema-healer)

## Output

A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures properly closed. The response is a JSON object containing the healed data ready for downstream consumption.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "raw_json"
 ],
 "properties": {
  "raw_json": {
   "type": "string",
   "minLength": 1,
   "description": "Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/email-verify-agentdiet-dev-deterministic-llm-json-repair-schema-359ed827/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from email-verify.agentdiet.dev](https://www.zero.xyz/host/email-verify.agentdiet.dev/llms.txt)
