{"uid":"cap_Qe_uFkTPZIdj0UABboJ0H","slug":"json-repair-agentdiet-dev-deterministic-llm-json-repair-schema-74869f8c","name":"Deterministic LLM JSON Repair & Schema Validator","description":"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://json-repair.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://json-repair.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"raw_json":{"type":"string","minLength":1,"description":"Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.002","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UFoWNBfpoRj2nWL3r1PYG","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"json-repair.agentdiet.dev","brandSlug":"json-repair-agentdiet-dev-mpp","brandBaseUrl":"https://json-repair.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, unclosed braces) so multi-agent pipelines never crash on bad JSON.","exampleAgentPrompt":"This JSON string came back from an LLM with trailing commas, unclosed brackets, and markdown fences around it — can you repair it so it's valid JSON I can parse? Here it is: ```json {\"name\": \"Alice\", \"score\": 42, \"tags\": [\"ai\", \"agent\",] ```","exampleUseCases":[{"title":"Fix LLM output in agentic pipeline","prompt":"My AI pipeline just returned this broken JSON from the model — it has trailing commas and an unclosed array. Can you repair it so I can pass it to the next step? Here's the raw output: {\"status\": \"ok\", \"results\": [\"a\", \"b\",}"},{"title":"Strip markdown fences from model JSON","prompt":"The LLM wrapped its JSON response in triple backticks with a 'json' language tag and used single quotes instead of double quotes. Can you heal this into proper valid JSON? Here's what I got: ```json {'user': 'bob', 'active': true}```"},{"title":"Recover truncated JSON from long generation","prompt":"My language model got cut off mid-response and the JSON is incomplete — it's missing the closing braces and some values. Can you deterministically repair this truncated JSON so it's parseable? Here it is: {\"report\": {\"title\": \"Q3 Summary\", \"items\": [{\"id\": 1, \"value\": \"foo\""}],"resultDescription":"A repaired, syntactically valid JSON object corrected from the malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, truncated structures closed, and all standard JSON syntax errors fixed. The response is a JSON object containing the healed JSON.","failureModes":["Input JSON too severely corrupted to deterministically infer structure — returns error or best-effort partial repair","Empty or non-JSON input string — may return error indicating no repairable content found","Very large JSON strings may hit query parameter size limits since raw_json is passed as a GET query parameter","Network timeout on slow connections","Payment failure via x402 if USDC balance insufficient"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails to parse due to common LLM output artifacts (trailing commas, markdown code fences, single quotes, truncation, unclosed brackets). Prefer it over general-purpose JSON linters when you need deterministic, automated repair — not just validation — especially in agentic workflows where crashing on bad JSON is unacceptable. It is particularly well-suited for pipelines that need a lightweight, pay-per-call repair step without standing up their own JSON sanitization service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:11.879Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-llm-json-repair-schema-74869f8c"}