{"uid":"cap_Z0eqGFPaCeDuXGsVToz-V","slug":"json-repair-tool-ai-agent-utility-d74a5be2","name":"JSON Repair Tool (AI Agent Utility)","description":"Pay-per-call API for AI agents, settled in USDC on Base mainnet (eip155:8453) via the x402 protocol - no API keys, no signup, no subscription. Live crypto market data: BTC, ETH, SOL, USDC (USD Coin) prices with 24h change (source: OKX), Base mainnet chain snapshot (block height, gas price gwei), real-time USDC-on-Base transfer analytics (transfer count, volume, unique senders and recipients over recent blocks), and USDC/ETH wallet balances plus nonce for any address. Agent utility tools: deterministic JSON repair for LLM output (strip code fences, fix trailing commas, single quotes, unquoted keys, balance braces), DNS A/AAAA lookup, and URL extraction from arbitrary text. Every endpoint returns HTTP 402 with an x402 payment challenge in USDC on Base; pay with any wallet and retry with the PAYMENT-SIGNATURE header. MCP server at /mcp (streamable HTTP, 6 pay-per-call tools). Ideal for crypto portfolios, DeFi dashboards, market analysis agents, data pipelines, and LLM post-processing.","url":"https://baseusdcearn.pythonanywhere.com/ai/json-repair?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"properties":{"type":"string"}}},"responseSchema":{"type":"json","example":{"chain":{"chainId":8453,"network":"base-mainnet","blockHeight":21000000,"gasPriceGwei":0.05},"market":{"solana":{"usd":150,"usd_24h_change":-0.5},"bitcoin":{"usd":60000,"usd_24h_change":1.5},"ethereum":{"usd":3000,"usd_24h_change":2},"usd-coin":{"usd":1,"usd_24h_change":0}},"servedAt":1755430000}},"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_bspg-_BfDS1Gw-juKWjSC","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 JSON commonly produced by LLMs — stripping code fences, fixing trailing commas, single quotes, unquoted keys, and unbalanced braces","exampleAgentPrompt":"The JSON I got back from the LLM has trailing commas, single quotes instead of double quotes, and is wrapped in a markdown code block — can you repair it into valid JSON I can parse?","exampleUseCases":[{"title":"Sanitizing LLM pipeline output","prompt":"My language model keeps returning JSON wrapped in triple-backtick code fences with trailing commas — can you strip all that and give me clean parseable JSON?"},{"title":"Fixing unquoted keys in agent response","prompt":"The JSON from my AI agent uses unquoted keys and single quotes instead of double quotes, which is breaking my parser — please fix it into valid JSON."},{"title":"Recovering malformed DeFi dashboard data","prompt":"I have a JSON payload from an LLM that's supposed to describe token balances but the braces are unbalanced and there are syntax errors throughout — can you repair it so I can load it into my dashboard?"}],"resultDescription":"A valid, parseable JSON object with all common LLM formatting errors corrected: code fences stripped, trailing commas removed, single quotes converted to double quotes, unquoted keys quoted, and braces/brackets balanced.","failureModes":["Input is so severely malformed that structure cannot be inferred — returns error or best-effort partial repair","Payment not included — returns HTTP 402 with x402 USDC payment challenge on Base mainnet","Input contains no JSON-like content at all — may return empty or error response"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, deterministic JSON repair step in an AI agent pipeline and want to pay per call in USDC on Base with no API key or subscription. Ideal when LLM JSON output consistently has formatting quirks (code fences, single quotes, trailing commas) that break downstream parsers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:40:41.016Z","isFirstParty":false,"canonicalSlug":"json-repair-tool-ai-agent-utility-d74a5be2"}