AI Documents
Documents are files uploaded to an AI tenant to serve as a knowledge source.
Uploading a Document
Via Dashboard
- Go to
/dashboard/ai-gateway - Select a tenant from the list
- Click Upload Document or drag a file into the upload area
- An animated progress bar shows upload progress
- A success or error toast appears on completion
Via API
POST /ai/docs?TenantId={tenantId}
Authorization: Bearer {jwt}
Content-Type: multipart/form-data
file: <your-file>Response: 200 OK
Supported File Types
Any text-based document format is supported. Common formats:
- PDF (
.pdf) - Word documents (
.docx) - Plain text (
.txt) - Markdown (
.md)
Maximum file size: 10 MB
How Documents Are Stored
- The backend receives the multipart upload
- The file is sent to Supabase object storage via
SupabaseService - The Supabase CDN URL is stored in MongoDB alongside the file metadata
- The file is served directly from Supabase’s CDN — not proxied through the backend
Listing Documents
Note: A
GET /ai/docs?TenantId={id}endpoint is planned. The dashboard will show uploaded documents per tenant once this is implemented.
Deleting Documents
Note: A
DELETE /ai/docs/{docId}endpoint is planned.
Last updated on