Skip to content
Fourohtwo

Fix broken JSON from LLMs

x402-weblens-api-production.up.railway.app/v1/json-repair

Fix broken JSON from LLMs: removes code fences and comments, fixes single quotes, bare keys, trailing commas, Python literals and cut-off endings. Optionally validates the result against your JSON Schema and lists errors.

BaseAnswering
POSThttps://x402-weblens-api-production.up.railway.app/v1/json-repair

Uptime100% of 4 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://x402-weblens-api-production.up.railway.app/v1/json-repair", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"schema":{"required":["name"],"type":"object"},"text":"{name: 'Ana', tags: ['a','b',], ok: True}"}),
});
console.log(await res.json());

Example input

{
  "schema": {
    "required": [
      "name"
    ],
    "type": "object"
  },
  "text": "{name: 'Ana', tags: ['a','b',], ok: True}"
}

More from WebLensProvider status