Tinplate 42 Edge APIs

AI Data Prep Live on RapidAPI & Zyla POST /v1/json-heal

Broken JSON Healer API — Deterministically Repair Malformed LLM JSON Outputs

Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms. Fix broken JSON from LLMs in under 2 ms: strip Markdown code fences, close truncated brackets, fix trailing commas, unescaped quotes, and Python literals.

Try It Live in Your Browser · No API Key Required

1. Interactive Sandbox & Sample JSON Output

200 OK · Ready

Editable Request JSON (POST /v1/json-heal)

Live 200 OK Response Envelope

{
  "ok": true,
  "data": {
    "valid": true,
    "data": {
      "name": "Ada",
      "active": true,
      "tags": [
        "ai",
        "edge"
      ]
    },
    "healed_json": "{\"name\":\"Ada\",\"active\":true,\"tags\":[\"ai\",\"edge\"]}",
    "repairs": [
      "stripped_markdown_fence",
      "normalized_single_quotes",
      "normalized_literals",
      "removed_trailing_commas",
      "closed_truncated_containers"
    ],
    "schema_valid": null,
    "schema_errors": []
  },
  "meta": {
    "request_id": "req_jh_01",
    "ms": 1
  }
}

2. Quickstart Code Examples

Full TypeScript & Python SDK →
curl -X POST "https://api.tinplate.dev/v1/json-heal" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -d '{"raw":"Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", '\''active'\'': True, \"tags\": [\"ai\", \"edge\",]\n"}'
import { TinplateClient } from "@tinplate/sdk"; // npm install @tinplate/sdk

const tinplate = new TinplateClient({
  rapidApiKey: process.env.RAPIDAPI_KEY!,
});

const { data, meta } = await tinplate.call("/v1/json-heal", {
  "raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
});
console.log(`[${meta.ms} ms]`, data);
import requests

response = requests.post(
    "https://api.tinplate.dev/v1/json-heal",
    headers={
        "Content-Type": "application/json",
        "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    },
    json={
  "raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
}
)
print(response.json())
const response = await fetch("https://api.tinplate.dev/v1/json-heal", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
  },
  body: JSON.stringify({
  "raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
}),
});
const result = await response.json();
console.log(result);
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tinplate_json_heal",
    "arguments": {
      "raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
    }
  }
}
OpenAPI 3.0.3 Schema Contract

Request Parameters & Response Schema Reference

Request Body Parameters (POST /v1/json-heal)

Parameter Type & Constraints Description
rawrequired string
minLen: 1, maxLen: 262144
Malformed JSON or LLM output string (max 256 KB).
schemaoptional object Optional JSON Schema (draft subset) to validate the healed JSON against without eval.

Response data Object Fields (200 OK)

Field Type Description
valid boolean Field 'valid'
data any | null Field 'data'
healed_json string | null Field 'healed_json'
repairs string[] Field 'repairs'
schema_valid boolean | null Field 'schema_valid'
schema_errors string[] Field 'schema_errors'

3. What Broken JSON & LLM Output Healer API Detects & Validates

Honest Engineering Boundaries

4. Known Limitations & Test Verification

Release Version: v1.0.7 · Last Verified / Benchmarked: 14 November 2026 · Latency Note: Sub-millisecond figures measure in-Worker V8 compute time (typical client HTTPS network RTT to the nearest Cloudflare PoP is 15–65 ms) · See Full Portfolio Benchmarks & Corpora →

5. Marketplace Plans & Payload Quotas

Plan Monthly Price Included Requests Rate Limit Max Request Payload Best For
BASIC $0.00 / month 500 / month (hard limit) 10 req / min 64 KB Evaluation, local development & CI smoke tests
PRO $9.99 / month 15,000 / month 60 req / min 128 KB Solo developers & production apps
ULTRA $29.99 / month 100,000 / month 300 req / min 256 KB Growing SaaS & multi-agent pipelines
MEGA $79.99 / month 500,000 / month 1,000 req / min 256 KB High-volume enterprise workloads

6. Frequently Asked Questions

Why not just ask the LLM to retry when JSON.parse fails?

Retrying an LLM call costs 500–3,000 ms and extra token fees. JSON Healer repairs 95%+ of syntax glitches deterministically in ~1 ms.

Does it handle truncated JSON when max_tokens cuts off the response?

Yes. It tracks the open bracket/brace stack and closes unfinished strings, arrays, and objects cleanly.

Does it record which repairs were made?

Yes, the repairs array lists every transformation applied so you can audit or log repair frequency.

Zero Payload Logging

7. Data Handling, Privacy & Marketplace Proxy Disclosure

100% in-memory deterministic state machine. Zero payload logging.

Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled in configuration (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Payloads are processed strictly in volatile V8 memory and never logged or stored by Tinplate.

Marketplace Proxies vs. Direct Bearer Key: Requests sent via RapidAPI or Zyla API Hub pass through those marketplaces' proxy infrastructure (subject to their respective privacy policies). Security-sensitive workloads requiring end-to-end zero-intermediary processing can connect directly to https://api.tinplate.dev using a Direct Bearer Key (Authorization: Bearer <API_KEY>). Read our full Privacy Notice and OpenAPI 3.0.3 JSON Schema.

Related Tinplate APIs

🔧 POST /v1/tool-call-validator AI Safety & Agents

Agent Tool-Call Validator & Repairer API

Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.

📄 POST /v1/html-to-markdown Tier 1

LLM HTML-to-Markdown Cleaner API

Convert noisy web pages or raw HTML into clean, token-efficient Markdown for RAG.

🔀 POST /v1/schema-diff Developer Utilities

OpenAPI & JSON Schema Breaking-Change Diff API

Diff two OpenAPI 3.x or JSON Schemas to catch breaking changes and recommend SemVer bumps.