{"uid":"cap_b0Za9EaW_1P7o4tL10kKj","slug":"newbotlabor-json-repair-183fc8ae","name":"NewBotLabor JSON Repair","description":"Pay-per-call utilities for autonomous agents, paid with x402 (USDC on Base; no account, no API key).","url":"https://newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run/api/json/repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"possibly broken JSON text, max 200k chars"},"schema":{"type":"object","description":"optional JSON Schema to validate/coerce against"}}},"responseSchema":{"type":"json","example":{"ok":true,"json":"{\"name\":\"Bob\",\"age\":42,\"tags\":[\"a\"]}","fixes":["stripped markdown code fence","quoted unquoted keys","converted single-quoted strings","removed extra/trailing commas"],"value":{"age":42,"name":"Bob","tags":["a"]},"schema":{"valid":true,"errors":[],"coercions":["$.age: string -> number"],"validBeforeCoercion":false},"repaired":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pdipCVMQcK4nOBXPLpr85","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","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 fixing common syntax errors and optionally validates/coerces the result against a JSON Schema","exampleAgentPrompt":"Can you fix this broken JSON for me — it has single quotes and trailing commas and is wrapped in a markdown code block: ```{'name': 'Bob', 'age': '42', 'tags': ['a',]}``` — and validate it against this schema: {\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"number\"}}}?","exampleUseCases":[{"title":"Sanitize LLM-generated JSON output","prompt":"The model just returned this JSON but it's wrapped in a code fence and has single quotes everywhere — can you repair it and give me a clean parsed object? Here's the text: ```{'user': 'alice', 'score': '99', 'active': True}```"},{"title":"Validate API payload before submission","prompt":"I have this JSON string I'm about to send to an API but I'm not sure it matches the required schema — can you fix any syntax issues and check it against this schema: {\"type\":\"object\",\"required\":[\"id\",\"amount\"],\"properties\":{\"id\":{\"type\":\"string\"},\"amount\":{\"type\":\"number\"}}}? Here's my payload: {id: '123', amount: '45.00',}"},{"title":"Parse log file JSON fragments","prompt":"I've got a bunch of JSON snippets from log files that have unquoted keys and extra commas — can you repair this one and tell me what fixes were applied: {timestamp: '2024-01-15', level: error, message: 'disk full',}"}],"resultDescription":"Returns an object containing: a boolean 'ok' flag, the repaired JSON as a string, the parsed JavaScript value, a list of human-readable fix descriptions (e.g. 'stripped markdown code fence', 'quoted unquoted keys'), a 'repaired' boolean, and if a schema was provided, a schema validation sub-object with validity status, errors, coercions applied, and whether it was valid before coercion.","failureModes":["Text is so severely malformed that repair heuristics cannot produce valid JSON — returns ok:false with error details","Input text exceeds 200k character limit — rejected with size error","Schema provided is itself invalid — schema validation step may error or be skipped","Payment via x402 fails or USDC balance insufficient — HTTP 402 returned before processing"],"whenToPreferThis":"Choose this endpoint when you need to programmatically fix LLM-generated or user-supplied JSON that has common syntax errors (markdown fences, single quotes, unquoted keys, trailing commas, type mismatches) without setting up an account or API key. It is particularly well-suited for agent workflows that receive JSON from language models and need to normalize it before downstream use. It combines repair + schema validation in one call, which is more efficient than separate parse-and-validate steps. Pay only per call via x402/USDC on Base — ideal for sporadic or bursty agent workloads.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:40:50.347Z","isFirstParty":false,"canonicalSlug":"newbotlabor-json-repair-183fc8ae"}