Indexing documents
Two paths are available for pushing documents into a Flexible Vector Database: index-direct for small batches and index-jobs for larger ones.
index-direct
Synchronous path. Send a batch of documents in the request body; the platform encodes, embeds, and writes them in one call. The response includes the count of indexed documents. Use this for small batches (a few hundred at a time) where you want a synchronous confirmation.
index-jobs
Asynchronous path. Submit a job; the platform returns a job id that you can poll. Use this for large batches or for scheduled reindexes that should not block the caller.
Document payload
Each document has a stable id, free-text content, optional metadata, and an optional source block. Documents with acontent_image_url field are encoded by the multimodal embedding model when the backing database supports it.
1{
2 "documents": [
3 {
4 "id": "doc-1",
5 "content": "QDivZero Compute is the managed inference layer.",
6 "metadata": { "section": "compute" },
7 "source": { "text": "QDivZero Compute is the managed inference layer." }
8 },
9 {
10 "id": "doc-2",
11 "content": "Vector databases support multimodal embeddings.",
12 "content_image_url": "https://cdn.example.com/diagram.png",
13 "metadata": { "section": "vector-databases" }
14 }
15 ]
16}