Developer Utilities
Tier 2 Ready
POST /v1/rag-chunker
Split Markdown into token-budgeted RAG chunks with heading breadcrumbs and intact code/tables. Split Markdown and technical docs into token-budgeted RAG chunks while keeping fenced code blocks and tables intact, injecting heading breadcrumbs, and generating deterministic chunk IDs.
POST /v1/rag-chunker){
"ok": true,
"data": {
"chunk_count": 2,
"total_chars": 188,
"total_estimated_tokens": 68,
"avg_chunk_tokens": 34,
"preserved_code_blocks": 1,
"preserved_tables": 1,
"chunks": [
{
"index": 0,
"chunk_id": "chk_2296f0a18a703ee7",
"text": "[Context: Gateway Manual > Authentication]\n\n# Gateway Manual\n\n## Authentication\n\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```",
"raw_text": "# Gateway Manual\n\n## Authentication\n\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```",
"heading_path": [
"Gateway Manual",
"Authentication"
],
"block_types": [
"heading",
"prose",
"code"
],
"char_count": 175,
"estimated_tokens": 44,
"start_line": 1,
"end_line": 8
},
{
"index": 1,
"chunk_id": "chk_664daeea150dbc83",
"text": "[Context: Gateway Manual > Quotas]\n\n## Quotas\n\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |",
"raw_text": "## Quotas\n\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |",
"heading_path": [
"Gateway Manual",
"Quotas"
],
"block_types": [
"heading",
"table"
],
"char_count": 93,
"estimated_tokens": 24,
"start_line": 10,
"end_line": 13
}
]
},
"meta": {
"request_id": "req_chk_01",
"ms": 1
}
}
curl -X POST "https://api.tinplate.dev/v1/rag-chunker" \
-H "Content-Type: application/json" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-d '{"text":"# Gateway Manual\n\n## Authentication\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```\n\n## Quotas\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |","max_tokens":128,"overlap_tokens":16,"prepend_breadcrumbs":true}'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/rag-chunker", {
"text": "# Gateway Manual\n\n## Authentication\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```\n\n## Quotas\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |",
"max_tokens": 128,
"overlap_tokens": 16,
"prepend_breadcrumbs": true
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/rag-chunker",
headers={
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
},
json={
"text": "# Gateway Manual\n\n## Authentication\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```\n\n## Quotas\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |",
"max_tokens": 128,
"overlap_tokens": 16,
"prepend_breadcrumbs": true
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/rag-chunker", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
},
body: JSON.stringify({
"text": "# Gateway Manual\n\n## Authentication\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```\n\n## Quotas\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |",
"max_tokens": 128,
"overlap_tokens": 16,
"prepend_breadcrumbs": true
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_rag_chunker",
"arguments": {
"text": "# Gateway Manual\n\n## Authentication\nPass your proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```\n\n## Quotas\n| Plan | Calls |\n| --- | --- |\n| Basic | 500 |",
"max_tokens": 128,
"overlap_tokens": 16,
"prepend_breadcrumbs": true
}
}
}POST /v1/rag-chunker)| Parameter | Type & Constraints | Description |
|---|---|---|
textrequired |
stringminLen: 1, maxLen: 200000 |
Raw Markdown, technical documentation, or prose document to split into semantic RAG chunks. |
max_tokensoptional |
integermin: 32, max: 8192, default: 256 |
Target maximum token budget per chunk (default: 256). |
overlap_tokensoptional |
integermin: 0, max: 1024, default: 24 |
Approximate trailing token overlap carried into the next chunk within the same section (default: 24). |
prepend_breadcrumbsoptional |
booleandefault: true |
Prepend the active Markdown heading breadcrumb path (e.g. '[Context: Guide > Auth]') to each chunk's 'text' field for embedding context. |
split_on_heading_leveloptional |
integermin: 1, max: 6, default: 2 |
Always start a new chunk when encountering a heading at or above this level (1 = H1, 2 = H1/H2). |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
chunk_count |
integer |
Field 'chunk_count' |
total_chars |
integer |
Field 'total_chars' |
total_estimated_tokens |
integer |
Field 'total_estimated_tokens' |
avg_chunk_tokens |
number |
Field 'avg_chunk_tokens' |
preserved_code_blocks |
integer |
Field 'preserved_code_blocks' |
preserved_tables |
integer |
Field 'preserved_tables' |
chunks |
object[] |
Field 'chunks' |
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 →
| 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 |
Use 04-html-to-markdown to clean raw web pages into Markdown, 35-rag-chunker to split that Markdown into context-enriched vector chunks, and 14-hallucination-diff to verify LLM answers against the retrieved chunks.
A chunk that only says 'Rate limit is 60 req/min' loses what product or tier it belongs to. Prepending '[Context: Gateway Manual > Pricing > PRO Tier]' dramatically improves retrieval precision.
Yes, chunk_id is a deterministic hash of the chunk index and normalized text, making vector DB re-indexing idempotent.
Documents are chunked in memory with zero payload logging or storage.
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.
POST /v1/html-to-markdown
Tier 1
Convert noisy web pages or raw HTML into clean, token-efficient Markdown for RAG.
POST /v1/prompt-cache-budgeter
AI Safety & Agents
Estimate tokens, optimize message order for prompt caching, and calculate LLM API costs.
POST /v1/hallucination-diff
AI Safety & Agents
Fast first filter to catch unsupported numbers, dates, and names in LLM answers vs RAG sources.