DeepFellow DOCS

Create a vector store.

POST
/v1/vector_stores

Create a vector store with specified configuration parameters.

Initialize a new vector store that can be configured with file chunking strategies, expiration policies or retention strategies, and metadata. The operation involves multiple steps:

  1. Validate if the name is unique within the project.
  2. Create a document in the vector stores collection.
  3. Initialize a corresponding collection in the underlying vector database.
  4. Publish each associated file to Nightshift for processing.

Needs user bearer token in authorization header.

Authorization

headerAuthorizationBearer <token>

Header Parameters

OpenAI-Organization?|

Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.

OpenAI-Project?|

Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization

Request Body

application/json
  1. body
chunking_strategy?
Default
{  "type": "auto",  "static": {    "chunk_overlap_tokens": 400,    "max_chunk_size_tokens": 800  }}
expires_after?|null
file_ids?array<>

A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.

Default[]
image_processing_mode?ImageProcessingMode

Whether images in file_ids are described by a vision model before chunking.

Default"ignore"
Value in"ignore""description"
metadata?||null
name?VectorStoreName

The name of the vector store.

Default""
knowledge_compression?|

Knowledge compression policy: whether Nightshift stores a summary of each file as vectors in this store.

knowledge_graph?|

Knowledge graph policy: whether Nightshift ingests each processed file into the project's knowledge graph.

Response Body

Successful Response

application/json
  1. response
project_id*string

A 24-character hexadecimal MongoDB ObjectId string.

Match^[0-9a-fA-F]{24}$
object?string

The object type, which is always vector_store.

Default"vector_store"
name?VectorStoreName

The name of the vector store.

Default""
status?VectorStoreStatus

The status of the vector store.

Default"completed"
Value in"in_progress""completed""expired"
file_counts?

Detailed counts of files by status.

Default
{  "cancelled": 0,  "completed": 0,  "failed": 0,  "in_progress": 0,  "total": 0}
expires_after?|

The expiration policy for a vector store.

metadata?|

Set of key-value pairs that can be attached to an object.

Default{}
chunking_strategy?

The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.Only applicable if file_ids is non-empty.

Default
{  "type": "auto",  "static": {    "chunk_overlap_tokens": 400,    "max_chunk_size_tokens": 800  }}
knowledge_compression?|

Knowledge compression policy: whether Nightshift stores a summary of each file as vectors in this store.

knowledge_graph?|

Knowledge graph policy: whether Nightshift ingests each processed file into the project's knowledge graph.

id*string

The vector store identifier, which can be referenced in the API endpoints.

Match^[0-9a-fA-F]{24}$
last_active_at*integer

The Unix timestamp (in seconds) for when the vector store was last active.

created_at*integer

The Unix timestamp (in seconds) for when the vector store was created.

expires_at*integer

The Unix timestamp (in seconds) for when the vector store will expire.

bytes?UsageBytes

The total number of bytes used by the files in the vector store.

Range0 <= value
Default0
embedding_config*

Embedding model and size used to create vectors in this vector store.

Example Request
curl -X POST 'https://deepfellow-server-host/v1/vector_stores' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "project_id": "5eb7cf5a86d9755df3a6c593",  "object": "vector_store",  "name": "",  "status": "in_progress",  "file_counts": {    "cancelled": 0,    "completed": 0,    "failed": 0,    "in_progress": 0,    "total": 0  },  "expires_after": {    "anchor": "last_active_at",    "days": 36500  },  "metadata": {},  "chunking_strategy": {    "type": "auto",    "static": {      "chunk_overlap_tokens": 400,      "max_chunk_size_tokens": 800    }  },  "knowledge_compression": {    "enabled": false,    "options": {      "max_length": 200,      "style": "neutral",      "language": "string"    }  },  "knowledge_graph": {    "enabled": false  },  "id": "5eb7cf5a86d9755df3a6c593",  "last_active_at": 0,  "created_at": 0,  "expires_at": 0,  "bytes": 0,  "embedding_config": {    "model": "string",    "size": 0,    "max_context_size": 512  }}

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.