{"uid":"cap_8T8PrDAbggLrIfzdfJqyV","slug":"netintel-json-repair-dda7b721","name":"NetIntel JSON Repair","description":"Network intelligence API — 138 endpoints, all pay-per-call via x402 micropayments (USDC on Base or Solana mainnet).\n\nNetIntel is agent fair-trade aligned: transparent per-call pricing in USDC on Base or Solana via x402, no API keys or signup, and automatic no-charge on server errors, upstream failures, and input-validation rejections — failed calls are never billed across NetIntel's network, domain, and data-intelligence endpoints.","url":"https://netintel-production-440c.up.railway.app/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","required":["input"],"properties":{"input":{"type":"string","description":"The malformed JSON, as a string. May include markdown code fences or surrounding prose. Max 100KB."},"coerce":{"type":"boolean","description":"Default false. With a schema supplied, coerce values to the declared types where lossless (\"5\" → 5, \"yes\" → true)."},"schema":{"type":"object","description":"Optional. Validate the repaired JSON against this schema. Accepts a flat field→type map ({\"n\":\"number\"}) or a JSON-Schema-shaped object ({\"type\":\"object\",\"properties\":{...},\"required\":[...]}). Types: string, number, integer, boolean, object, array, null."},"allow_llm":{"type":"boolean","description":"Default true. When false, deterministic-only: if the tokenizer cannot fix the input, repair_succeeded is false (still a 200)."}}},"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","properties":{"grade":{"type":"string"},"score":{"type":"number"},"method":{"type":"string"},"changes":{"type":"array"},"findings":{"type":"array"},"repaired":{"type":["object","array","null"]},"warnings":{"type":"array"},"was_valid":{"type":"boolean"},"confidence":{"type":"number"},"schema_valid":{"type":["boolean","null"]},"repair_succeeded":{"type":"boolean"},"validation_errors":{"type":"array"}}}}}}},"responseSchema":{"type":"json","example":{"grade":"A","score":100,"method":"deterministic","changes":["removed markdown code fences","converted 3 single-quoted strings to double-quoted","removed 2 trailing commas"],"findings":[],"repaired":{"name":"acme","ports":[80,443]},"warnings":[],"was_valid":false,"confidence":1,"schema_valid":null,"repair_succeeded":true,"validation_errors":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VDKf4dKiJmVqeMj-rZT4Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed JSON strings — fixing syntax errors, trailing commas, single quotes, markdown fences, and more — with optional schema validation and type coercion","exampleAgentPrompt":"This JSON string I got back from a model has trailing commas and single-quoted keys — can you repair it and validate it against this schema: {\"name\":\"string\",\"ports\":\"array\"}? Here's the broken JSON: {'name': 'acme', 'ports': [80, 443,]}","exampleUseCases":[{"title":"Sanitizing LLM-generated JSON output","prompt":"The JSON my AI pipeline just produced has markdown code fences and single quotes — can you clean it up and tell me what changes were made so I can log them?"},{"title":"Validating config file before deployment","prompt":"I have a config JSON that might have trailing commas and type mismatches — repair it and validate it against this schema: {\"host\":\"string\",\"port\":\"integer\",\"debug\":\"boolean\"}, and coerce string numbers to the right types where you can."},{"title":"Debugging broken API response payload","prompt":"I got this malformed JSON payload from a third-party API and can't parse it — fix whatever's wrong with it and give me a confidence score on how reliable the repair is."}],"resultDescription":"Returns a JSON object with: the repaired JSON value (repaired), a boolean indicating success (repair_succeeded), whether the original was already valid (was_valid), the repair method used (deterministic or llm), a letter grade (grade), a numeric score (0-100), confidence (0-1), an array of human-readable changes made, any warnings, schema validation result (schema_valid), and validation_errors if a schema was supplied.","failureModes":["Input JSON exceeds 100KB limit — returns validation rejection with no charge","allow_llm=false and deterministic repair cannot fix the input — returns repair_succeeded=false with a 200 and no charge","Schema validation fails after successful repair — schema_valid is false with validation_errors populated","Malformed input that is not recognizable as JSON at all — low confidence score or repair_succeeded=false","Upstream LLM failure when allow_llm=true — no charge per NetIntel policy"],"whenToPreferThis":"Choose this endpoint when you need to recover and parse JSON that contains common syntax errors such as trailing commas, single-quoted strings, markdown code fences, or minor structural issues — especially when processing LLM-generated outputs or third-party API responses. It is particularly valuable when you also need to validate the repaired result against a known schema and optionally coerce types. Prefer this over a simple JSON linter when you need actual repair (not just error reporting) and when you want a confidence score and change log for auditing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:48:06.783Z","isFirstParty":false}