# LLM JSON Repair & Schema Validator

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

Deterministically repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, markdown fences) so multi-agent pipelines can continue without crashing.

## Facts

- Endpoint: GET https://shopify-intel.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: shopify-intel.agentdiet.dev
- Website: https://shopify-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/shopify-intel-agentdiet-dev-llm-json-repair-schema-validator-e2818710
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dST4eBjyrOCg8U429cpb2

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 shopify-intel-agentdiet-dev-llm-json-repair-schema-validator-e2818710
```

Example prompt: The last LLM step returned this JSON with trailing commas and markdown code fences and now my pipeline is crashing — can you clean it up and give me back valid JSON? Here's the broken output: ```json {"name": "Alice", "score": 42,} ```

## When to prefer this

Choose this endpoint when a multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common syntax issues like trailing commas, single quotes, or markdown fences, and you need a deterministic (not generative) fix rather than asking the LLM to retry. Ideal for high-throughput pipelines where reliability and cost matter at $0.002 per call.

## Known failure modes

- Input JSON is so severely malformed that deterministic repair is impossible, returning an error
- Truncation is too severe to infer the intended structure
- Ambiguous single-quote vs apostrophe usage prevents reliable repair
- Rate limiting or payment failure returns HTTP 402
- Input string is empty or missing (minLength:1 not met)

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

## Output

A repaired, valid JSON object that has had common LLM output defects corrected, including removal of markdown code fences, conversion of single quotes to double quotes, removal of trailing commas, and completion of truncated structures. The response is a JSON object ready for downstream parsing.

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