{"uid":"cap_iaMuaGMPzvQsG0uqxYwZ8","slug":"lordevo-json-repair-for-llm-16d47bd1","name":"Lordevo JSON Repair for LLM","description":"JSON repair for LLM output (fences, quotes, commas, truncation): Turns malformed or LLM-style JSON into valid JSON: removes code fences and leading text, fixes trailing commas, single or smart quotes, unquoted keys, comments, Python constants and truncated endings, and lists the problem types found.","url":"https://shop.lordevo.com/api/quick/json-repair?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["json"],"properties":{"json":{"type":"string","description":"JSON text, up to 1 MB (a JSON value is also accepted in a POST body or MCP arguments)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["tool","repaired","fixes"],"properties":{"tool":{"type":"string"},"fixes":{"type":"array","items":{"type":"string"}},"changed":{"type":"boolean"},"repaired":{"type":"string"},"input_was_valid":{"type":"boolean"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","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":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bp4QhGnkBGvmksqqlrtez","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed or LLM-generated JSON by fixing fences, quotes, commas, unquoted keys, and truncation, returning valid JSON and a list of problems found.","exampleAgentPrompt":"The LLM returned a JSON blob with code fences, single quotes, and a trailing comma — can you run it through JSON repair and give me the fixed, valid JSON along with a list of what was wrong?","exampleUseCases":[{"title":"Fix LLM pipeline output","prompt":"My language model returned this JSON but it has markdown fences and trailing commas that break my parser — can you repair it and tell me exactly what was fixed?"},{"title":"Normalize Python-style JSON constants","prompt":"The model output has Python-style True, False, and None instead of valid JSON booleans and null — please repair it so it's proper JSON I can parse."},{"title":"Recover truncated LLM response","prompt":"The API response got cut off mid-JSON and now it won't parse — can you attempt to repair the truncated JSON and return the best valid version you can reconstruct?"}],"resultDescription":"Returns a JSON object containing: 'repaired' (the corrected JSON string), 'fixes' (array of strings naming each problem type that was corrected, e.g. 'trailing_comma', 'code_fence', 'single_quotes'), 'changed' (boolean indicating whether any changes were made), 'input_was_valid' (boolean indicating if the input was already valid), and 'tool' (identifier string).","failureModes":["Input JSON exceeds 1 MB limit — returns error","Input is so malformed it cannot be meaningfully repaired — may return partially repaired result","Missing required 'json' query parameter — returns validation error","Network timeout for very large payloads"],"whenToPreferThis":"Choose this endpoint when you need to programmatically fix LLM-generated JSON that suffers from common LLM formatting errors like markdown code fences, Python boolean constants, smart quotes, trailing commas, unquoted keys, or truncation. Ideal for AI pipelines where model output must be reliably parsed as JSON before downstream processing. Prefer this over manual parsing heuristics or home-grown fixers when you need a maintained, enumerated list of what was actually repaired.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:16.599Z","isFirstParty":false,"canonicalSlug":"lordevo-json-repair-for-llm-16d47bd1"}