Uploads a file and creates an invocation to index it into the specified collection.
The first time this endpoint is called for a database, a file_upload source is created automatically; subsequent calls reuse that source. The collection is created on the first invocation if it does not already exist.
Multipart field ordering: database_name and collection_name MUST appear before file. The server uses these to authorize the request before streaming file bytes to storage.
Size limits: maximum 200 MiB per file. The declared size in x-upload-content-length is enforced.
Declared file size in bytes. Must be greater than 0 and not exceed 200 MiB (209,715,200 bytes).
1 <= x <= 209715200Database in which to index the file. Must appear before the file field.
Target collection. Created on first use. Must appear before the file field.
File content. Maximum 200 MiB. The filename in the part header is used as the document name.
Optional custom document ID. Chunk IDs become custom_id-{chunk} instead of sha256(filename)-{chunk}.
120Optional JSON object of additional metadata to merge with chunk metadata. Maximum 16 KiB. Reserved keys (e.g. chroma_*) are rejected.
Optional JSON SourceEmbeddingConfig. Defaults to Qwen3-Embedding-0.6B with generic_retrieval task and Splade sparse embeddings.
Optional JSON SourceChunkingConfig. Defaults to tree-sitter syntax-aware chunking with markdown/line-based fallbacks.
Optional MIME type override. Otherwise inferred from the file part header (if not application/octet-stream) or the filename extension.
512File accepted and invocation created
ID of the newly created invocation.