{"uid":"cap__nJ1YerXzC79jVDgLrkQX","slug":"agentjson-fix-ae7673c4","name":"AgentJSON Fix","description":"Deterministic repair of broken or LLM-style JSON into valid JSON, $0.005 per call via x402.","url":"https://agentjson-fix-km.fly.dev/v0/json/fix?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"raw":{"type":"string","description":"Malformed or LLM-ish JSON text to repair (required)"},"schema":{"type":"object","description":"Optional JSON Schema object to validate the repaired value"},"strict":{"type":"boolean","description":"If true, schema validation failures return ok:false; default false"}}},"responseSchema":{"type":"json","example":{"ok":true,"json":{"ok":true,"name":"agent"},"repairs":[{"type":"single_quotes","detail":"converted 2"},{"type":"trailing_commas","detail":"removed 1"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0mShNX-Ad7Px9A4gk4NcJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deterministically repairs malformed or LLM-style JSON strings into valid, parseable JSON, with optional schema validation.","exampleAgentPrompt":"Can you fix this broken JSON for me? It has single quotes and trailing commas: {'name': 'agent', 'ok': true,} — I need it as valid JSON.","exampleUseCases":[{"title":"Sanitize LLM chatbot output","prompt":"The AI assistant returned this JSON with single quotes and a trailing comma that's breaking my parser: {'user': 'alice', 'score': 42,} — can you repair it into valid JSON?"},{"title":"Validate fixed JSON against a schema","prompt":"Fix this malformed JSON and then check it against my schema to make sure the result has the right shape: {name: 'Bob', age: 30,} — run it in strict mode so I know right away if the schema doesn't match."},{"title":"Clean up agent pipeline output","prompt":"My automation pipeline is producing JSON like {\"items\": [1, 2, 3,], \"status\": 'ok'} that keeps crashing downstream steps — can you deterministically repair it into something parseable?"}],"resultDescription":"Returns a JSON object with an 'ok' boolean indicating success, the repaired 'json' value as a parsed object, and a 'repairs' array listing each type of fix applied (e.g. single_quotes converted, trailing_commas removed). If schema validation is enabled and strict mode is on, returns ok:false on validation failure.","failureModes":["JSON is so deeply malformed it cannot be deterministically repaired — returns ok:false","Schema validation fails in strict mode — returns ok:false with validation details","Missing required 'raw' parameter — returns an error response","Input is not a string — request rejected","Schema object itself is malformed — validation step may be skipped or error returned"],"whenToPreferThis":"Choose this endpoint when you need fast, deterministic, rule-based JSON repair without relying on another LLM call. It is especially suited for fixing LLM-generated JSON that has predictable issues like single quotes, trailing commas, or unquoted keys. Prefer it over regex hacks or manual parsing logic when you want a consistent, auditable repair log. It also supports optional JSON Schema validation in one call, making it useful in pipelines that need both repair and conformance checking.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:31:23.956Z","isFirstParty":false,"canonicalSlug":"agentjson-fix-ae7673c4"}