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
Basic and Structured take the same upload and return 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.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 page number for PDFs, otherwise null.{
"filename": "guide.md",
"file_id": "6f1c…",
"chunks": [
{
"chunk_id": "b2e4…",
"metadata": {
"filename": "guide.md",
"file_id": "6f1c…",
"chunk_number": 0,
"headings": ["Guide", "Install"],
"heading": "Guide",
"subheading": "Install",
"page": null,
"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.