{"uid":"cap_cww8mFkjvJJTf9T7rdmbs","slug":"tarnak-x402-toolkit-json-repair-api-8a287ad8","name":"Tarnak x402 Toolkit — JSON Repair API","description":"Keyless pay-per-call APIs for AI agents on Base: token risk verdict, rug/honeypot report, gas estimate, URL-to-markdown and more. x402 v2, USDC, no API key or signup. 10 free verdicts per IP per day.","url":"https://api.capousd-student-tools.me/v1/repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"type":"string","description":"Malformed JSON text."}}},"responseSchema":{"type":"json","example":{"ok":true,"error":null,"value":{"a":1},"applied":["removed_trailing_comma"],"repaired":true}},"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_Cdo-wqcYRzrT1kTfpa5a0","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":"Repairs malformed JSON text by auto-detecting and fixing syntax errors (trailing commas, missing quotes, etc.) and returns the corrected value along with a list of applied fixes.","exampleAgentPrompt":"Can you repair this broken JSON for me? It has trailing commas and won't parse: {\"name\": \"Alice\", \"age\": 30,}","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The AI just returned this JSON but it has trailing commas and I can't parse it — can you repair it? {\"items\": [\"a\", \"b\",], \"count\": 2,}"},{"title":"Recover corrupted config file JSON","prompt":"My config file JSON got corrupted and now has syntax errors. Can you fix this so it's valid again? {\"host\": \"localhost\" \"port\": 8080}"},{"title":"Sanitize user-submitted JSON input","prompt":"A user submitted this JSON form data but it's malformed with extra commas and missing brackets — please repair it so I can process it: {\"email\": \"foo@bar.com\", \"tags\": [\"admin\",]}"}],"resultDescription":"Returns a JSON object with: 'ok' boolean indicating success, 'error' string or null, 'value' containing the parsed and repaired JSON value, 'applied' array listing the names of repairs that were applied (e.g. 'removed_trailing_comma'), and 'repaired' boolean indicating whether any fixes were needed.","failureModes":["JSON is too malformed to recover — returns ok:false with an error message","Input is not JSON at all (e.g. plain text or binary) — returns error","Empty input or missing 'json' field — returns validation error","Payment failure via x402 — 402 response if USDC payment not provided correctly"],"whenToPreferThis":"Use this endpoint when you have a JSON string that fails to parse due to common syntax issues like trailing commas, unquoted keys, or minor formatting errors, especially from LLM outputs or user-submitted data. It is keyless and pay-per-call via x402/USDC, making it ideal for AI agents that need lightweight, no-signup JSON cleanup without maintaining API credentials.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:30:03.884Z","isFirstParty":false,"canonicalSlug":"tarnak-x402-toolkit-json-repair-api-8a287ad8"}