Architecture

API Layer

REST API documentation and endpoints overview.

Base URL

Development: http://localhost:8000/api/v1

Production: https://your-domain.com/api/v1

Authentication

All endpoints (except /health) require authentication via Supabase JWT token.

Authorization: Bearer <JWT_TOKEN>

Rate Limiting

Endpoint TypeLimitWindow
Global100 requestsper minute per IP
Chat Messages20 requestsper minute per IP
Document Uploads10 requestsper hour per IP

Main Endpoints

Health Checks

  • GET /health - Full system health
  • GET /health/liveness - Liveness probe
  • GET /health/readiness - Readiness probe

Notebooks

  • GET /notebooks - List user's notebooks
  • POST /notebooks - Create notebook
  • GET /notebooks/[id] - Get notebook
  • PATCH /notebooks/[id] - Update notebook
  • DELETE /notebooks/[id] - Delete notebook

Documents

  • POST /documents/upload - Upload document
  • GET /notebooks/[id]/documents - List documents
  • GET /documents/[id] - Get document
  • DELETE /documents/[id] - Delete document

Chat

  • GET /chat/[notebook_id]/history - Get chat history
  • POST /chat/[notebook_id]/message - Send message
  • GET /chat/[notebook_id]/suggestions - Get suggestions

Content Generation

  • GET /generation/[notebook_id]/content - List generated content
  • POST /generation/[notebook_id]/podcast - Generate podcast
  • POST /generation/[notebook_id]/quiz - Generate quiz
  • POST /generation/[notebook_id]/flashcards - Generate flashcards
  • POST /generation/[notebook_id]/mindmap - Generate mind map