Document Management and Chunking
Document management and chunking endpoints in MariaDB AI RAG handle file upload, listing, retrieval, and deletion, and provide recursive, sentence, token, and semantic chunking options.
Document Management Endpoints
Upload Documents
POST /documents/ingestcurl -X POST "http://localhost:8000/documents/ingest" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "files=@/path/to/document.pdf" \
-F 'document_processing={"processor_type": "layout_aware_standard", "enable_ocr": {
"message": "2 documents have been queued for ingestion.",
"documents": [
{
"id": 42,
"source": "/uploaded_files/example1.pdf",
"filename": "example1.pdf",
"status": "pending",
"content": null,
"error_message": null,
"created_at": "2025-10-20T12:00:00.123456",
"updated_at": null
},
{
"id": 43,
"source": "/uploaded_files/example2.docx",
"filename": "example2.docx",
"status": "pending",
"content": null,
"error_message": null,
"created_at": "2025-10-20T12:00:00.234567",
"updated_at": null
}
]
}List Documents
Retrieve Document
Delete Documents
Chunking Endpoints
Chunk Documents (Batch)
Chunk All Documents
Filter/Retrieve Chunks
Last updated
Was this helpful?

