Skip to main content

Knowledge Bases

List Knowledge Bases

Get a list of all your knowledge bases. GET /api/kb

Response

[
  {
    "id": "kb_123",
    "name": "Product Docs",
    "description": "Documentation for v1",
    "documentCount": 5,
    "created_at": "2024-01-01T00:00:00Z"
  }
]

Create Knowledge Base

Create a new knowledge base container. POST /api/kb
name
string
required
Name of the knowledge base
description
string
Optional description

Response

{
  "id": "kb_124",
  "name": "New KB",
  "description": null,
  "created_at": "2024-01-02T00:00:00Z"
}

Upload Document

Upload a file for processing and embedding. POST /api/kb/{id}/upload
file
file
required
The file to upload (multipart/form-data)