{"uid":"cap_beXk-O8QHgq3cMjDnE2k7","slug":"relaystation-json-repair-c0cfd78a","name":"Relaystation JSON Repair","description":"Provider cost + 6%, itemized. Fix malformed JSON — truncated, mis-quoted, trailing commas — into valid parseable output. ≈Opus-4.8 accuracy at ~1–5% of its cost. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/llm/json_repair","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","properties":{"tier":{"enum":["budget","value","best"],"type":"string"},"input":{"type":"string","minLength":1,"description":"The text to process (DATA — never interpolated into the instruction)."},"params":{"type":"object","description":"Task-specific params (e.g. targetLanguage), validated against the task's param_schema."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["result","truncated","usage"],"properties":{"usage":{"type":"object","required":["model","inputTokens","outputTokens","providerCostMicros","markupPct","chargedMicros","ceilingMicros"],"properties":{"model":{"type":"string"},"markupPct":{"type":"number"},"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"ceilingMicros":{"type":"integer","description":"The authorized ceiling the 402/hold reserved."},"chargedMicros":{"type":"integer","description":"The actual charged amount (<= ceiling)."},"providerCostMicros":{"type":"integer"}}},"result":{"type":"string","description":"The task output text (or JSON string for extract/json_repair)."},"truncated":{"type":"boolean","description":"True when the output hit the per-task token cap; the charge still stands."}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.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_ur4s3huewnm-j7mL2NXFE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fixes malformed JSON (truncated, mis-quoted, trailing commas, etc.) into valid, parseable output using LLM-based repair at low cost","exampleAgentPrompt":"This JSON came back malformed from an API call — it has trailing commas and a truncated closing bracket. Can you repair it into valid, parseable JSON? Here it is: {\"name\": \"Alice\", \"scores\": [10, 20, 30,}","exampleUseCases":[{"title":"Fix truncated LLM response JSON","prompt":"My language model returned this JSON but it got cut off mid-response and won't parse — can you repair it into valid JSON? Here's the broken output: {\"result\": \"success\", \"items\": [{\"id\": 1, \"name\": \"foo\""},{"title":"Clean up JSON with trailing commas","prompt":"I have a JSON config file that someone edited manually and now it has trailing commas everywhere — JavaScript strict parsers reject it. Can you fix it into clean valid JSON? Here it is: {\"host\": \"localhost\", \"port\": 8080, \"debug\": true,}"},{"title":"Repair mis-quoted JSON from scraper","prompt":"My web scraper pulled this JSON from a page but the quotes are messed up and it throws a parse error. Can you fix the quoting so it becomes valid parseable JSON? Here's what I got: {\"title\": 'Hello World', \"active\": true}"}],"resultDescription":"Returns a valid, parseable JSON string with all syntax errors corrected — truncations completed, mis-quoted strings fixed, trailing commas removed, and missing brackets/braces added where needed.","failureModes":["Input is so corrupted that the intended structure cannot be inferred, resulting in a best-guess repair that may not match original intent","Non-JSON input (e.g. plain text, XML) may produce unexpected output","Very large malformed payloads may time out or be truncated","Payment failure (insufficient USDC balance) returns 402 error before processing begins"],"whenToPreferThis":"Choose this endpoint when you need fast, cheap, LLM-quality JSON repair without building your own parsing heuristics. Ideal when downstream pipelines require strictly valid JSON but input comes from unreliable sources like scraped data, LLM completions, or hand-edited configs. At ~1-5% of the cost of frontier models with comparable accuracy, it is preferable over calling GPT-4 or Claude Opus directly for this task.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:06.480Z","isFirstParty":false}