EdgeDocAPI
RAG Pipelines · POST /v1/rag-chunk

RAG Chunker for LangChain

Split Markdown, plain text, or raw HTML into clean, heading-aware semantic chunks ready for LangChain Document loaders and vector embeddings.

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 '{"content":"# Architecture\n\nCloudflare Workers run close to users.\n\n## Storage\n\nDurable Objects provide strong consistency.","format":"markdown","max_tokens":512,"overlap":64,"source":{"document_id":"arch-v2"}}'
import requests

resp = requests.post(
    "https://api.docopsapi.com/v1/rag-chunk",
    headers={"Authorization": "Bearer edk_live_YOUR_API_KEY"},
    json={
  "content": "# Architecture\n\nCloudflare Workers run close to users.\n\n## Storage\n\nDurable Objects provide strong consistency.",
  "format": "markdown",
  "max_tokens": 512,
  "overlap": 64,
  "source": {
    "document_id": "arch-v2"
  }
},
    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({
  "content": "# Architecture\n\nCloudflare Workers run close to users.\n\n## Storage\n\nDurable Objects provide strong consistency.",
  "format": "markdown",
  "max_tokens": 512,
  "overlap": 64,
  "source": {
    "document_id": "arch-v2"
  }
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);

Related API Guides