EdgeDocAPI
Vector Databases · POST /v1/rag-chunk

Deterministic RAG Chunking for Pinecone

Transform raw HTML or Markdown documents into Pinecone-ready JSON records complete with chunk_index, total_chunks, section_heading, and document_id metadata.

Try Live Without Signup Get Free Key (500 req/mo)

Why engineering teams use EdgeDocAPI

Copy-Paste Integration (/v1/rag-chunk)

curl -X POST https://api.docopsapi.com/v1/rag-chunk \
  -H "Authorization: Bearer edk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<article><h1>Pinecone Guide</h1><p>Index clean semantic chunks for high recall.</p></article>","max_tokens":384,"overlap":48,"source":{"document_id":"kb-101","url":"https://example.com/kb/101"}}'
import requests

resp = requests.post(
    "https://api.docopsapi.com/v1/rag-chunk",
    headers={"Authorization": "Bearer edk_live_YOUR_API_KEY"},
    json={
  "html": "<article><h1>Pinecone Guide</h1><p>Index clean semantic chunks for high recall.</p></article>",
  "max_tokens": 384,
  "overlap": 48,
  "source": {
    "document_id": "kb-101",
    "url": "https://example.com/kb/101"
  }
},
    timeout=15,
)
resp.raise_for_status()
print(resp.json())
const res = await fetch("https://api.docopsapi.com/v1/rag-chunk", {
  method: "POST",
  headers: {
    "Authorization": "Bearer edk_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "html": "<article><h1>Pinecone Guide</h1><p>Index clean semantic chunks for high recall.</p></article>",
  "max_tokens": 384,
  "overlap": 48,
  "source": {
    "document_id": "kb-101",
    "url": "https://example.com/kb/101"
  }
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);

Related API Guides