Skip to main content

API Reference

Base URL: http://localhost:9000/api/v1

Collections

MethodPathDescription
GET/collectionsList all collections
POST/collectionsCreate a collection
GET/collections/:slugGet a collection
DELETE/collections/:slugDelete a collection and all its data
curl -X POST http://localhost:9000/api/v1/collections \
-H "Content-Type: application/json" \
-d '{"name": "My Docs"}'

Ingest

MethodPathDescription
POST/collections/:slug/ingestIngest a URL or file upload
# Ingest a URL
curl -X POST http://localhost:9000/api/v1/collections/my-docs/ingest \
-H "Content-Type: application/json" \
-d '{"file_uri": "https://example.com/docs/guide"}'

# Upload a file
curl -X POST http://localhost:9000/api/v1/collections/my-docs/ingest \
-F "file=@./document.pdf"

Supported sources: https://, s3://, local file paths, file uploads.
Supported formats: .txt, .md, .html, .pdf

Query

MethodPathDescription
POST/collections/:slug/querySemantic search
curl -X POST http://localhost:9000/api/v1/collections/my-docs/query \
-H "Content-Type: application/json" \
-d '{"query": "how do I configure authentication?", "top_k": 5}'

Response includes matched chunks with chunk_text, file_uri, distance, and similarity (0–100).

Documents

MethodPathDescription
GET/collections/:slug/documentsList ingested documents (paginated)
GET/collections/:slug/documents/:idGet a document
DELETE/collections/:slug/documents/:idDelete a document and its chunks
GET/collections/:slug/documents/:id/chunksList all chunks