# LLM JSON Repair & Schema Validator

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

Deterministically repairs malformed, truncated, or markdown-wrapped JSON from LLM outputs so multi-agent pipelines can continue without crashing.

## Facts

- Endpoint: GET https://domain-osint.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: domain-osint.agentdiet.dev
- Website: https://domain-osint.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/domain-osint-agentdiet-dev-llm-json-repair-schema-validator-544eecc4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sYTkOtVNM9rPT5S1Th3Vu

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 domain-osint-agentdiet-dev-llm-json-repair-schema-validator-544eecc4
```

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

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails to parse due to common LLM output artifacts such as trailing commas, markdown code fences, single quotes, or truncation. It is specifically designed for deterministic repair rather than probabilistic LLM-based correction, making it reliable and auditable for automated pipelines where consistency matters.

## Known failure modes

- Input is so severely malformed it cannot be deterministically repaired, returning an error or best-effort partial output
- Very long truncated JSON may have ambiguous closure, leading to incorrect structural assumptions
- Non-JSON content passed as raw_json may return an error or unpredictable output
- Payment failure (HTTP 402) if x402 micropayment is not properly attached

## 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://domain-osint.agentdiet.dev/v1/llm-json-schema-healer)

## Output

Returns a repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing and processing.

## 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/domain-osint-agentdiet-dev-llm-json-repair-schema-validator-544eecc4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from domain-osint.agentdiet.dev](https://www.zero.xyz/host/domain-osint.agentdiet.dev/llms.txt)
