KnowledgeDB API

Build intelligent, RAG-powered applications with the KnowledgeDB REST API and WebSocket interface. Upload documents, create knowledge bases, search with AI, and chat in real time.

Base URLhttps://fgbpqt2pq6.execute-api.us-east-1.amazonaws.com/prod
WebSocketwss://p417pa2mu2.execute-api.us-east-1.amazonaws.com/prod

⚡ Quick Start

1

Create an account

Register via POST /auth/signup with your email, password, first and last name.

2

Authenticate

Login via POST /auth/login to receive your idToken. Use it as a Bearer token for all subsequent requests.

3

Create a Knowledge Base

Use POST /knowledgedbs to create a container for your documents.

4

Upload documents

Upload PDF, DOCX, TXT, or MD files via POST /documents/upload. They're automatically indexed by the AI.

5

Search with AI

Ask natural language questions via POST /search and get AI-generated answers grounded in your documents.

🔑 All API endpoints (except /auth/signup, /auth/login, and /health) require authentication. Include your idToken in the Authorization: Bearer <token> header. Endpoints for documents, images, knowledge bases, and search also require the x-api-key header returned from login. Tokens expire after 1 hour — use the refresh endpoint to get new ones.

â„šī¸ Responses use standard HTTP status codes. 200 for success, 201 for created, 400 for bad request, 401 for unauthorized, 404 for not found, and 500 for server errors. All responses are JSON.

GET

Health Check

/health

Simple health check endpoint to verify the API is running. Does not require authentication.

Response Fields

statusstringAlways "healthy".
// GET /health — no auth required
{
  "status": "healthy"
}