{"uid":"cap_pbyuKtpbW-cilgeLNFFAg","slug":"24k-labs-json-repair-0252264d","name":"24K Labs JSON Repair","description":"Fix malformed or truncated JSON (trailing commas, unquoted keys, cut-off LLM output) into valid, parseable JSON.","url":"https://api.24klabs.ai/api/json-repair","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"type":"string"}}},"responseSchema":{"type":"json","example":{"repaired":{"name":"Bob"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OeJGQ28CtEEWILUNc1AOr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed or truncated JSON (trailing commas, unquoted keys, cut-off LLM output) into valid, parseable JSON.","exampleAgentPrompt":"This JSON string from our LLM pipeline is broken — it has trailing commas and an unquoted key — can you repair it into valid, parseable JSON? Here it is: {name: \"Alice\", scores: [10, 20,]}","exampleUseCases":[{"title":"Fix truncated LLM JSON output","prompt":"The language model cut off mid-response and the JSON is incomplete — can you repair it so I can parse it? Here's the broken output: {\"name\": \"report\", \"items\": [{\"id\": 1, \"val"},{"title":"Clean up scraped JSON with syntax errors","prompt":"I scraped some data and the JSON has trailing commas and some unquoted keys — it's failing to parse. Can you fix it into valid JSON? Here it is: {name: \"ProductA\", tags: [\"sale\", \"new\",]}"},{"title":"Recover malformed config file JSON","prompt":"My config file JSON is malformed — it has a trailing comma after the last property and won't load. Please repair it: {\"host\": \"localhost\", \"port\": 5432, \"debug\": true,}"}],"resultDescription":"A valid, parseable JSON string that has been repaired from the malformed input, with syntax errors such as trailing commas, unquoted keys, and truncated structures corrected.","failureModes":["Input is too severely malformed or ambiguous to repair deterministically","Input is not JSON-like at all (e.g. plain text or XML) — may return an error or unexpected output","Truncation is too deep to infer the intended structure","API returns 4xx for missing or malformed request body","Network timeout or service unavailability (5xx)"],"whenToPreferThis":"Choose this endpoint when you have JSON that is almost valid but contains common syntax issues like trailing commas, unquoted keys, or LLM-generated truncation, and you need a fast, cheap ($0.008/call) automated fix without writing custom parser logic. Prefer it over manual string manipulation or regex patching when the JSON structure is complex or the errors are varied.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:37.538Z","isFirstParty":false}