Semantic Chunking for Qdrant & pgvector
Ingest web pages, docs, and raw Markdown into Qdrant payloads with clean character offsets (char_start, char_end) and section headings for citation highlighting.
Why engineering teams use EdgeDocAPI
- Includes char_start, char_end, and section_heading for accurate RAG citations
- Handles raw HTML directly by cleaning to Markdown before semantic splitting
- Zero data retention — your proprietary knowledge base never touches disk
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":"# Qdrant Setup\n\nCreate a collection with cosine distance.\n\n## Filtering\n\nAttach source_url metadata.","max_tokens":256,"overlap":32,"source":{"document_id":"qdrant-docs"}}'import requests
resp = requests.post(
"https://api.docopsapi.com/v1/rag-chunk",
headers={"Authorization": "Bearer edk_live_YOUR_API_KEY"},
json={
"content": "# Qdrant Setup\n\nCreate a collection with cosine distance.\n\n## Filtering\n\nAttach source_url metadata.",
"max_tokens": 256,
"overlap": 32,
"source": {
"document_id": "qdrant-docs"
}
},
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": "# Qdrant Setup\n\nCreate a collection with cosine distance.\n\n## Filtering\n\nAttach source_url metadata.",
"max_tokens": 256,
"overlap": 32,
"source": {
"document_id": "qdrant-docs"
}
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);