H

Heinrichstech · CDP Json Repair

by Heinrichstech

POSTBaseXRP Ledgerstellar:pubneteip155:1440000

$0.0001

per call · USD Coin on Base

BitBooth JSON Repair: take any almost-JSON string (LLM tool output, broken API response, etc.), fix the common errors (trailing commas, single quotes, unquoted keys, missing brackets), and optionally validate against a JSON Schema. Built for AI agents that wrap every tool call in defensive parsing. Pay 0.001 USDC per call, no API key, no subscription.

Endpoint

POST https://app.heinrichstech.com/v1/cdp/json-repair

1

Calls / 30d

1

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://app.heinrichstech.com/v1/cdp/json-repair", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "malformed": "{name: 'alice', age: 30,}",
    "schema": {
      "properties": {
        "age": {
          "type": "number"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "age"
      ],
      "type": "object"
    }
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://app.heinrichstech.com/v1/cdp/json-repair" \
  -H "Content-Type: application/json" \
  -d '{"malformed":"{name: 'alice', age: 30,}","schema":{"properties":{"age":{"type":"number"},"name":{"type":"string"}},"required":["name","age"],"type":"object"}}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "ok": true,
  "payment": {
    "network": "eip155:8453",
    "payer": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "transaction": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "repaired": {
    "age": 30,
    "name": "alice"
  },
  "service": "BitBooth /v1/cdp/json-repair",
  "validatedAgainstSchema": true,
  "validation": {
    "valid": true
  },
  "wasModified": true
}

Payment details

Pay to0xda2f35d283c42dd60b965322394bc658a5c1769f
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, XRP Ledger, stellar:pubnet, eip155:1440000
Schemesexact, onchain

Is this your API?

Pin it to the top of Other and the homepage with a featured placement.

Get featured →

More from Heinrichstech & similar services