Download OpenAPI specification:Download
No fuss vector database for AI
This API provides a way to interact with a vector database, which is a type of database that stores data as high-dimensional vectors. Vectors are mathematical representations of features or attributes, and each vector has a certain number of dimensions, which can range from tens to thousands. Vector databases are used for a variety of tasks, such as similarity search, recommendation systems, and anomaly detection. They are particularly well-suited for tasks involving unstructured data, such as text, images, and audio.
A collection is a group of points that share the same search space. For example, a collection could be a group of images, where each image is represented as a vector. The collection would be the search space for similarity search, and each image would be a point in that search space.
Creates a new collection if it does not already exist. The maximum number of collections per user is restricted based on the plan. Before you can insert and search points, you must create a collection.
The collection to create
id | string (CollectionId) ^[a-z0-9]{3,24}$ The unique identifier of the collection |
object (IndexSchema) non-empty The schema for the collection, each property can be indexed with a different type of index. |
A sample collection to create with id mycollection, vector size 2 and euclidean distance.
{- "id": "mycollection",
- "indexSchema": {
- "myvector": {
- "type": "vectorVamana",
- "vectorVamana": {
- "vectorSize": 2,
- "distanceMetric": "euclidean",
- "searchSize": 75,
- "degreeBound": 64,
- "alpha": 1.2
}
}
}
}
The operation was successful
{- "message": "success"
}
Returns a list of all collections for the current user. The list is not sorted by any value and the order may change between requests.
A sample collection list with one collection
{- "collections": [
- {
- "id": "mycollection"
}, - {
- "id": "anothercollection"
}
]
}
This endpoint attempts to also list the shards currently available in the collection. Some shards may be temporarily unavailable. In that case, you can retry at a future time.
collectionId required | string (Collection Id) ^[a-z0-9]{3,24}$ Example: mycollection The unique identifier of the collection |
A sample collection with shard information
{- "id": "mycollection",
- "indexSchema": {
- "myvector": {
- "type": "vectorVamana",
- "vectorVamana": {
- "vectorSize": 2,
- "distanceMetric": "euclidean",
- "searchSize": 75,
- "degreeBound": 64,
- "alpha": 1.2
}
}
}, - "shards": [
- {
- "id": "fff3a226-b9f8-4375-8dbd-1a240e000705",
- "pointCount": 42
}
]
}
Deletes a collection and all of its points. This operation is irreversible. If you want to delete only some points, use the bulk delete endpoint. If some shards are temporarily unavailable, the operation will still succeed, but some of the data will be deleted in the future.
collectionId required | string (Collection Id) ^[a-z0-9]{3,24}$ Example: mycollection The unique identifier of the collection |
The operation was successful
{- "message": "success"
}
A point is a vector with a unique identifier. It can also contain any JSON serialisable metadata such as an external ID, document title or image URL.
This endpoint assumes all points to be inserted are new points and does not check for duplication. It is important to ensure consistency of the database you do not insert duplicate points. If you are unsure if a point exists, you can leave the id field blank and the database will assign a new id. For cosine distance, you must normalise the vectors prior to inserting them.
collectionId required | string (Collection Id) ^[a-z0-9]{3,24}$ Example: mycollection The unique identifier of the collection |
Points to insert
required | Array of objects (PointAsObject) <= 10000 items |
A sample list of points to insert
{- "points": [
- {
- "myvector": [
- 4.2,
- 2.4
]
}, - {
- "myvector": [
- 1.2,
- 3.4
], - "foo": "bar",
- "externalId": 42
}, - {
- "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- "myvector": [
- 3.4,
- 2.4
], - "externalId": 43
}
]
}
A sample response indicating full success
{- "message": "success",
- "failedRanges": [ ]
}
This endpoint allows updating point vectors and metadata. It does not allow updating the point id. If you want to update the id, you must delete the point and insert a new point. The points are required to exist before you can update them. You can check the failedPoints to see which points failed to update and potentially why.
collectionId required | string (Collection Id) ^[a-z0-9]{3,24}$ Example: mycollection The unique identifier of the collection |
Points to update
required | Array of objects (PointAsObject) <= 100 items |
A sample list of points to update
{- "points": [
- {
- "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- "myvector": [
- 4.2,
- 2.4
], - "wizard": "harry"
}
]
}
A sample response indicating full success
{- "message": "success",
- "failedPoints": [ ]
}
Bulk delete points based on id. This endpoint does not check if the points exist. If you attempt to delete a point that does not exist, it will be ignored and included in the failedPoints list.
collectionId required | string (Collection Id) ^[a-z0-9]{3,24}$ Example: mycollection The unique identifier of the collection |
Point IDs to delete
ids required | Array of strings <uuid> <= 100 items [ items <uuid > ] |
A sample list of point ids to delete
{- "ids": [
- "3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
A sample response indicating full success
{- "message": "success",
- "failedPoints": [ ]
}
This endpoint allows searching for points in a collection using the index. The search is based on the index schema of the collection.
collectionId required | string (Collection Id) ^[a-z0-9]{3,24}$ Example: mycollection The unique identifier of the collection |
Search request
required | object (Query) A query object that can be used to perform search. The query object can contain multiple filters, each with a property and a value. Use _and and _or to combine queries. |
select | Array of strings A list of properties to return in the search results. If not provided, all properties are returned. |
Array of objects (SortOption) <= 10 items A list of sort options for the search results. The search results are sorted by the first sort option, then the second, and so on. | |
offset | number >= 0 Default: 0 The number of points to skip in the search results |
limit required | number [ 1 .. 100 ] Default: 10 Maximum number of points to return |
A sample vector to search with default limit
{- "query": {
- "property": "myvector",
- "vectorVamana": {
- "vector": [
- 4.2,
- 2.4
], - "operator": "near",
- "searchSize": 75,
- "limit": 10
}
}, - "limit": 10
}
A sample response with two points
{- "points": [
- {
- "_id": "faefe2b1-cf85-48db-9621-94b833ee9cc9",
- "_distance": 0,
- "_hybridScore": "-0,",
- "description": "A product",
- "price": 100
}, - {
- "_id": "d2e3ebb5-149a-46e4-8b3f-cd6c38530da3",
- "_distance": "314402.94,",
- "_hybridScore": -314402.94,
- "description": "Another product",
- "price": 200
}
]
}