{"uid":"cap_6HowJSqIy-Kb82oazMWN_","slug":"api-strale-io-cd0a195d","name":"JSON Repair API","description":"Repair broken JSON: trailing commas, single quotes, unquoted keys, truncated, comments, mixed with markdown. Returns valid JSON.","url":"https://api.strale.io/x402/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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["json"],"properties":{"json":{"type":"string","description":"Broken JSON string to repair"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"json":"{name: 'Alice', age: 30, hobbies: ['reading', 'coding',]}"}}},"response":{"json":"{\n  \"name\": \"Alice\",\n  \"age\": 30,\n  \"hobbies\": [\n    \"reading\",\n    \"coding\"\n  ]\n}","_meta":{"payment":{"method":"x402","price_usd":0.054000000000000006,"settlement_id":"0x6d5e3444bb0c99ca373c059880d3934a38fb85738e8ae2b5594e1e6d2ece5685"},"capability":"json-repair","latency_ms":0,"provenance":{"source":"algorithmic","fetched_at":"2026-06-16T01:23:53.969Z"}},"valid":true,"parsed":{"age":30,"name":"Alice","hobbies":["reading","coding"]},"fixes_applied":["Fixed quote style (single → double)","Quoted unquoted keys","Removed trailing commas"]}},"exampleRequest":{"json":"{name: 'Alice', age: 30, hobbies: ['reading', 'coding',]}"},"tags":["x402"],"displayCostAmount":"0.054001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.054001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QFDLz72TiTr8QufoqYceh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.054","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs broken or malformed JSON strings (trailing commas, single quotes, unquoted keys, truncated, comments, markdown-embedded) and returns valid JSON","exampleAgentPrompt":"This JSON is broken — it has trailing commas and unquoted keys and I can't parse it. Can you fix it for me? Here it is: {name: 'Alice', age: 30, hobbies: ['reading', 'coding',]}","exampleUseCases":null,"resultDescription":"Returns a valid, well-formed JSON string with all syntax errors corrected — trailing commas removed, single quotes replaced with double quotes, unquoted keys quoted, truncated structures closed, comments stripped, and markdown removed.","failureModes":["Input JSON is too severely corrupted to repair — returns error or best-effort partial result","Input is not JSON at all (e.g. plain text or binary) — may return unexpected result","Ambiguous structure where repair could produce multiple valid interpretations — may choose one arbitrarily","Empty input string — likely returns error or empty object"],"whenToPreferThis":"Use this endpoint when you have a JSON string that fails to parse due to common syntax issues like trailing commas, single quotes, unquoted keys, embedded comments, truncation, or markdown wrapping. Especially useful for fixing LLM-generated JSON output, API responses that deviate from the spec, or user-provided JSON that hasn't been validated.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:55:22.747Z","isFirstParty":false,"canonicalSlug":"api-strale-io-cd0a195d"}