RagBytes API
Everything the website does is available over HTTP. Send a document, get back chunks that are ready to embed. No account or key is needed.
Loading…
Everything the website does is available over HTTP. Send a document, get back chunks that are ready to embed. No account or key is needed.
Loading…
https://api.ragbytes.com
Each tier has its own endpoint. Upload the file to it as multipart/form-data in a field called file. Pick a tier and a document below, copy the code, or send the request straight from this page.
curl -F "[email protected]" https://api.ragbytes.com/v1/chunk/basic
Each tier takes the same file upload and returns the same response. Supported file types: .pdf, .docx, .html, .htm, .md, .markdown, .txt.
Chunks come back in document order. For each one, send embed_text to your embedding model and store content and metadata next to the vector.
embed_text is the heading path, a blank line, then the chunk's text. The heading path tells the embedding model where the chunk sits in the document.metadata.title is the document's title when one heading sits above all the others, such as the name at the top of a CV. It starts the path in embed_text but is left out of headings, so heading is the section itself, such as Experience.content is the chunk's text, or base64 bytes when metadata.media_type is an image type.metadata.format is one of text, list, table, image, chart, code or complex.metadata.page is the first page this chunk touches, for PDFs, otherwise null. metadata.pages lists every page it covers, in order.metadata.topic is the short topic name when a model chose the cut, and null for the other tiers.metadata.heading_paths lists each heading path the chunk covers. A path is the outer heading first. metadata.heading and metadata.subheading stay the first path, so a chunk inside one heading matches the other tiers.{
"filename": "guide.md",
"file_id": "6f1c…",
"chunks": [
{
"chunk_id": "b2e4…",
"metadata": {
"filename": "guide.md",
"file_id": "6f1c…",
"chunk_number": 0,
"title": "Guide",
"topic": null,
"headings": ["Install"],
"heading": "Install",
"subheading": null,
"heading_paths": [["Install"]],
"page": null,
"pages": [],
"format": "text",
"media_type": null,
"details": { "start": 0, "end": 20 }
},
"embed_text": "Guide > Install\n\nInstall the package.",
"content": "Install the package."
}
]
}Errors return JSON with a detail message.