{"uid":"cap_4XnjaESoccZ5rKzbwJ6n5","slug":"jsonfix-malformed-json-repair-api-da9f61b1","name":"jsonfix — Malformed JSON Repair API","description":"Paid HTTP API that repairs malformed JSON. Deterministic parser + LLM fallback. Pay-per-request via x402 USDC. Zero data retention.","url":"https://ngmi--b088743456a711f1b5c3ee650bb23af1.web.val.run/repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"description":"Malformed JSON as a string, OR any JSON value to validate against `schema`. Required. Max 100,000 characters."},"schema":{"type":"object","description":"Optional JSON Schema (Ajv draft-07+). When provided, the repaired output is validated; deterministic results that fail validation fall through to the LLM."},"instructions":{"type":"string","description":"Optional natural-language hint passed to the LLM fallback. Example: 'coerce dates to ISO 8601' or 'use null for unknown fields'."}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"a":1,"name":"bob"},"model":null,"valid":true,"method":"deterministic","validationErrors":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hRFY7Jb5PjhKJa5c9JBun","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed JSON strings using a deterministic parser with LLM fallback, optionally validating output against a provided JSON Schema.","exampleAgentPrompt":"This JSON string I got back from a third-party API won't parse — can you repair it and validate it against this schema: {\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}}}? Here's the broken JSON: {name: 'Alice', age: '30',}","exampleUseCases":[{"title":"Clean up LLM-generated structured output","prompt":"The model just generated some JSON for a database record but it has syntax errors — missing quotes around keys and a trailing comma. Can you fix it and make sure it matches this schema: {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"created_at\":{\"type\":\"string\"},\"tags\":{\"type\":\"array\"}}}"},{"title":"Repair scraped data before import","prompt":"I scraped some product data from a website and got back malformed JSON with unescaped quotes and missing commas between fields. Can you fix it and validate it passes this structure: {\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"},\"price\":{\"type\":\"number\"},\"description\":{\"type\":\"string\"}}}"},{"title":"Recover broken legacy system export","prompt":"Our old system exported a JSON dump with bad formatting — lots of missing quotes, mangled escape sequences, and type mismatches. Can you repair it and check if it validates against our schema before we load it into the new database?"}],"resultDescription":"Returns a JSON object with: 'ok' (boolean success flag), 'data' (the repaired JSON value), 'model' (null if deterministic, model name if LLM was used), 'valid' (whether output passes the provided schema), 'method' ('deterministic' or 'llm'), and 'validationErrors' (array of schema violations if any).","failureModes":["Input exceeds 100,000 character limit — request rejected","JSON is so severely malformed that neither deterministic parser nor LLM can reconstruct it — ok:false returned","Provided JSON Schema is invalid or unsupported draft — validation step fails","LLM fallback unavailable or timed out — service error","Payment not fulfilled via x402 — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need reliable, pay-per-use JSON repair without storing sensitive data — especially useful when dealing with LLM-generated JSON, scraped data, or legacy system outputs that frequently produce near-valid but broken JSON. The deterministic-first approach means fast, cheap repairs for common syntax errors, with LLM fallback only when needed. Zero data retention makes it suitable for sensitive payloads.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T04:25:12.140Z","isFirstParty":false,"canonicalSlug":"jsonfix-malformed-json-repair-api-da9f61b1"}