Skip to main content
POST

Overview

Uploads one or more files, extracts their text, splits it into chunks, generates embeddings, and stores everything in the workspace’s RAG index so it can be queried via /rag/query.

Authentication

string
required
Bearer token from an authenticated Supabase session. See the note on RAG auth.

Request

Content type: multipart/form-data
File[]
required
One or more files to upload, as files[] form fields.
string
required
UUID of the workspace to associate the documents with. The workspace’s RAG index is auto-provisioned on first upload if it doesn’t already exist.

Supported File Types

Documents are split into ~1000-character chunks along sentence boundaries. CSV files are converted to structured text (with column headers preserved) before chunking.

Response

string
"success"
string
e.g. "Processed 3 files"
object
string
string
ISO 8601

Errors

Partial success is allowed — some files can fail while others succeed. Check results.details[].status for each file.