Create Documents

Upload and process documents for use in collections and RAG. Supports the following content strategies: - PDF documents (with OCR fallback for scanned pages) - Word documents (docx) and spreadsheets (xlsx) - Plain text files (txt) - CSV files - Git repositories - Web pages (url) and YouTube videos - Zip archives Documents are processed asynchronously: 1. Files are uploaded and validated 2. Content is extracted and chunked 3. Embeddings are generated 4. Documents become available for collections Returns a group ID to track processing status. Each item in the `data` array must include a `strategy`, one of: `csv`, `docx`, `git`, `pdf`, `txt`, `url`, `xlsx`, `youtube`, `zip`. Descriptors are matched positionally to the uploaded `files`: the first `data` item corresponds to the first uploaded file, and so on. `target` is optional for a descriptor paired with an uploaded file. It is required only for descriptors with no corresponding uploaded file (for example, a `url` or `youtube` strategy that fetches content directly), where it must contain the source location to fetch. A descriptor paired with an uploaded file does not name the document: `title` and `description` sent in the descriptor are ignored for uploaded files. The created document's `title` is the uploaded filename and its `description` is `null`. Rename it afterwards with `POST /document/{document_id}`.

Authentication

AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

OR
AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

Path parameters

org_idstringRequiredformat: "uuid"
The unique identifier of the organization.
project_idstringRequiredformat: "uuid"
The unique identifier of the project.

Request

This endpoint expects a multipart form with multiple files.
datastringRequired
filesfilesOptional

Response

Documents accepted for processing
group_idstring
task_countinteger
taskslist of objects

Errors

400
Bad Request Error
403
Forbidden Error
422
Unprocessable Entity Error