POST to https://sync.trychroma.com/api/v1/add-file with the file and a target collection; Chroma chunks, embeds, and indexes it just like any other Sync source.
File uploads can name a target collection, which sync will get or create.
Walkthrough
Uploading via the Dashboard
There are two ways to upload files from the dashboard:- From the Add data page. Open a database, choose Add data, and select File upload. Drop or pick one or more files; Chroma chunks and embeds them into a collection named
file_upload(created on the first upload). - From a collection page. On a collection page, if the Schema is compatible with sync — an “Upload files” button will be visible. Select this button to upload files into that collection.
Uploading via the API
The endpoint is multipartPOST /api/v1/add-file. Two rules to be aware of:
- The header
x-upload-content-length(file size in bytes) is required. database_nameandcollection_namemust appear before thefilepart.
201 Created with the invocation ID:
GET /api/v1/invocations/{invocation_id} to track progress.
Multipart Fields
| Field | Required | Description |
|---|---|---|
database_name | Yes | Database in which to index the file. Must come before file. |
collection_name | Yes | Target collection. Created on first use, otherwise appended to. Must come before file. |
file | Yes | File content. Maximum 200 MiB. The filename in the part header is used as the document name. |
custom_id | No | Custom document ID (max 120 bytes). Chunk IDs become custom_id-{chunk} instead of sha256(filename)-{chunk}. |
metadata | No | JSON object of additional metadata merged with chunk metadata. Maximum 16 KiB. Keys reserved by Chroma (e.g. chroma_*) are rejected. |
embedding | No | JSON SourceEmbeddingConfig. Defaults to Qwen3-Embedding-0.6B with generic_retrieval task plus Splade sparse embeddings. |
chunking | No | JSON SourceChunkingConfig. Defaults to tree-sitter syntax-aware chunking with markdown/line-based fallbacks. |
content_type | No | MIME type override. Otherwise inferred from the file part header (if not application/octet-stream) or the filename extension. |
Limits
- Maximum file size: 200 MiB per file (enforced via
x-upload-content-length). - Concurrency: Each team has a per-tenant cap on simultaneous in-flight uploads. Excess requests return
429 Too Many Requests. - Database region: Only available for Chroma databases hosted in
aws-us-east-1. See Regions.