Get an API key
Create an API key to authenticate your requests. You’ll need an existing token (from signing in) to create your first key — use Response:Copy the
POST /v1/auth/pw/signin to get one.Once you have a token, create a key:key value — it’s only shown once. Use it as <API_KEY> in the steps below.Ingest a document
Upload a document for Knowledge Stack to process. The ingest endpoint accepts a file upload and optional metadata. Knowledge Stack chunks and indexes the document automatically.Response:The document is processed asynchronously. The Check the workflow status:Once the status is
workflow_id lets you track progress.Processing typically completes within seconds for small documents. You can poll
GET /v1/workflows/{workflow_id} to check when the status changes to completed.completed, the document’s chunks are ready to search.Search your knowledge base
Run a semantic search against your ingested documents. Knowledge Stack ranks chunks by relevance to your query.Response:Each result includes a relevance
score between 0 and 1, the chunk text, and the source document. Higher scores indicate stronger semantic matches.Create a thread and ask a question
Threads let you have a multi-turn AI conversation grounded in your documents. Create a thread, send a user message, and Knowledge Stack retrieves relevant chunks and generates a response.Create a thread:Send a message:Stream the AI response:The response streams as server-sent events. Each event contains a chunk of the AI’s reply along with citations pointing back to the source documents.
Threads maintain conversation history. You can call
POST .../user_message again to continue the conversation with follow-up questions.What’s next
You’ve completed the core Knowledge Stack workflow. From here, you can:Organize with folders
Structure your knowledge base with folders and path-based organization.
Set up permissions
Control which users and groups can access which documents.
Build workflows
Automate ingestion pipelines with custom workflow definitions.
API reference
Full reference for every endpoint, request body, and response schema.