Skip to main content
Quark is a self-hosted RAG document-chat system. All API endpoints are served from your local instance. Base URL: http://localhost:3000/api/v1
All endpoints require a Bearer token in the Authorization header, except GET /api/v1/health. See Authentication for details.

Health check

GET /api/v1/health
Returns the string "up" with no authentication required. Use this to verify your instance is running.

Content type

All request and response bodies use JSON. Set the following header on every request:
Content-Type: application/json

Endpoint reference

MethodPathDescription
GET/api/v1/healthHealth check — returns "up"
POST/api/v1/ingest/upload/urlGet a presigned S3 URL for direct file upload
POST/api/v1/ingest/processIngest and chunk a document into the vector store
POST/api/v1/chat/completionsQuery documents in a session and receive an answer
GET/api/v1/chat/history/:sessionIdRetrieve paginated chat history for a session
DELETE/api/v1/chat/:sessionIdDelete all chat messages for a session
GET/api/v1/session/List all sessions for the authenticated user
POST/api/v1/session/Create a new session
PATCH/api/v1/session/:sessionIdRename a session
DELETE/api/v1/session/:sessionIdDelete a session

Explore endpoints

Get upload URL

Request a presigned S3 URL to upload a document directly to object storage.

Ingest document

Process an uploaded document into chunks and store embeddings.

Chat

Query your documents, retrieve chat history, and delete conversations.

Sessions

Create, list, rename, and delete chat sessions.

Build docs developers (and LLMs) love