Broken JSON & LLM Output Healer API
Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms.
Convert noisy web pages or raw HTML into clean, token-efficient Markdown for RAG. Convert raw HTML or public URLs into clean, token-efficient Markdown for LLM RAG pipelines. Strips navs, ads, scripts, and cookie banners.
{
"ok": true,
"data": {
"title": null,
"description": null,
"source_url": null,
"markdown": "# Release Notes\n\nLatency dropped by **40%**.",
"estimated_tokens": 11,
"html_chars": 147,
"markdown_chars": 44,
"cached": false
},
"meta": {
"request_id": "req_h2m_01",
"ms": 2
}
}
curl -X POST "https://api.tinplate.dev/v1/html-to-markdown" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TINPLATE_KEY" \
-d '{"html":"<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"}'import { TinplateClient } from "@tinplate/sdk";
const tinplate = new TinplateClient({
apiKey: process.env.TINPLATE_API_KEY!,
});
const { data, meta } = await tinplate.call("/v1/html-to-markdown", {
"html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/html-to-markdown",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
json={
"html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/html-to-markdown", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
body: JSON.stringify({
"html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_html_to_markdown",
"arguments": {
"html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
}
}
}POST /v1/html-to-markdown)| Parameter | Type & Constraints | Description |
|---|---|---|
url optional |
stringmaxLen: 2048 |
Public URL to fetch via private fetcher and convert to Markdown. |
html optional |
stringminLen: 1, maxLen: 262144 |
Raw HTML string to convert directly without fetching. |
base_url optional |
stringmaxLen: 2048 |
Optional base URL for resolving relative links when passing raw html. |
include_links optional |
boolean |
Preserve hyperlinks as [text](url) (default true). |
include_hidden optional |
boolean |
Include hidden DOM nodes (hidden, aria-hidden='true', display:none, font-size:0) (default false). |
cache optional |
boolean |
Allow edge KV caching for public URL fetches (defaults to true only for clean URLs without query strings or userinfo). |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
title |
string | null |
Field 'title' |
description |
string | null |
Field 'description' |
source_url |
string | null |
Field 'source_url' |
markdown |
string |
Field 'markdown' |
estimated_tokens |
integer |
Field 'estimated_tokens' |
html_chars |
integer |
Field 'html_chars' |
markdown_chars |
integer |
Field 'markdown_chars' |
cached |
boolean |
Field 'cached' |
Release: v1.0.39 ·
Verified: 16 November 2026 ·
Portfolio Median: 0.318 ms in-Worker V8 compute (add 15–65 ms HTTPS RTT) ·
See Full Portfolio Benchmarks →
Direct Polar All-Access Keys unlock all 42 APIs (49 endpoints), /v1/pipeline, and /mcp on api.tinplate.dev:
Pro ($29/mo · 120 req/min · 100k/mo · 128 KB) or Team ($79/mo · 300 req/min · 500k/mo · 256 KB).
| Plan | Monthly Price | Included Requests | Rate Limit | Max Payload | Best For |
|---|---|---|---|---|---|
| BASIC | $0.00 / mo | 500 / month | 10 req / min | 64 KB | Evaluation & CI smoke tests |
| PRO | $9.99 / mo | 15,000 / month | 60 req / min | 128 KB | Solo devs & production apps |
| ULTRA | $29.99 / mo | 100,000 / month | 300 req / min | 256 KB | Growing SaaS & multi-agent pipelines |
| MEGA | $79.99 / mo | 500,000 / month | 1,000 req / min | 256 KB | High-volume enterprise workloads |
Typical web pages see a 65% to 90% reduction in tokens after stripping scripts, inline styles, SVGs, and navigation chrome.
Yes. URL requests run through our isolated edgeguard-fetcher Worker, which blocks RFC1918, loopback, link-local, and cloud metadata IPs at every redirect hop.
Yes, pass the html field directly for in-memory conversion (typically under 5 ms in deterministic mode) with zero network calls.
Raw HTML inputs are never cached or logged. Public URL conversions may be cached briefly by URL hash in Cloudflare KV.
Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Requests via RapidAPI or Zyla traverse marketplace proxies; use a Direct Bearer Key for zero-intermediary routing.
Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms.
Estimate tokens, optimize message order for prompt caching, and calculate LLM API costs.
Audit which AI crawlers your robots.txt allows and generate a valid llms.txt file.