{"uid":"cap_k8LLFkaG9g1wPrNdCcAH8","slug":"json-repair-endpoint-2c33d8fe","name":"JSON Repair Endpoint","description":"Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.","url":"https://x402-gateway-production-1f21.up.railway.app/json/repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":250000}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"status":"ready"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Lch0cHSnKYFzHAGcYPwFA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs and validates malformed JSON text, returning a corrected, well-formed JSON structure","exampleAgentPrompt":"Can you repair this broken JSON for me? It has some missing quotes and a trailing comma: {name: 'Alice', age: 30,}","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The AI model returned this JSON but it's broken and won't parse — can you fix it so I can use it in my pipeline? Here's the text: {\"user\":\"bob\", \"score\": 42, \"tags\": [\"a\", \"b\",]}"},{"title":"Recover corrupted config file","prompt":"I have a config file that got corrupted and the JSON is invalid — missing a closing bracket and some unquoted keys. Can you repair this JSON text so it's valid again: {server: 'localhost', port: 8080, debug: true"},{"title":"Sanitize API response with bad JSON","prompt":"An external API is returning malformed JSON with single quotes instead of double quotes and some extra commas. Can you clean up and repair this JSON string so I can actually parse it: {'status': 'ok', 'data': [1, 2, 3,],}"}],"resultDescription":"Returns a JSON object with a status field (e.g. 'ready') and the repaired, well-formed JSON output derived from the provided malformed input text, suitable for downstream parsing and processing.","failureModes":["Input text too long (exceeds 250,000 character limit) — returns validation error","Input text is so severely malformed that meaningful repair is impossible — may return partial result or error","Missing required 'text' field in body — returns schema validation error","Non-JSON input that cannot be interpreted as JSON at all — may fail or return empty result"],"whenToPreferThis":"Choose this endpoint when you need a machine-payable, low-cost ($0.001 USDC) microservice to programmatically repair malformed JSON at scale — particularly useful in agentic pipelines where LLM outputs, scraped data, or external API responses frequently produce invalid JSON that needs automated correction before further processing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:38:12.696Z","isFirstParty":false,"canonicalSlug":"json-repair-endpoint-2c33d8fe"}