Data management

Image datasets

Image datasets expect Base64 encoded images or image URLs as values. The transformation from images to vectors is done internally and your application doesn't have to worry about it.

Recommended image size is 224x224px. Larger images can cause latency issues while smaller images can hurt the search performance.

Insert

POST https://api.anndb.com/v1/datasets/image/:dataset_name

Request

REST
REST
{
"image": "data:image/jpeg;base64,/9j...",
"metadata": {
"key": "value",
...
}
}

Response

REST
REST
{
"id": "2c44707c-acbf-49be-a8ef-a63028491f4c"
}

Update

PUT https://api.anndb.com/v1/datasets/image/:dataset_name/:id

Request

REST
REST
{
"image": "https://live.staticflickr.com/65535/46797499615_95a0ef171b_w_d.jpg",
"metadata": {
"key": "value",
...
}
}

Response

REST
REST
{
"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"
}

Delete

DELETE https://api.anndb.com/v1/datasets/image/:dataset_name/:id

Request

REST
REST
{}

Response

REST
REST
{
"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"
}

Vector datasets

Vector datasets allow you to store your own vectors so that they can be efficiently queried later. The length of the vector field has to match the dimension specified when creating the dataset.

Insert

POST https://api.anndb.com/v1/datasets/vector/:dataset_name

Request

REST
REST
{
"vector": [0.12, 0.34, 0.8, 0.56, ...],
"metadata": {
"key": "value",
...
}
}

Response

REST
REST
{
"id": "2c44707c-acbf-49be-a8ef-a63028491f4c"
}

Update

PUT https://api.anndb.com/v1/datasets/vector/:dataset_name/:id

Request

REST
REST
{
"vector": [0.12, 0.34, 0.8, 0.56, ...],
"metadata": {
"key": "value",
...
}
}

Response

REST
REST
{
"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"
}

Delete

DELETE https://api.anndb.com/v1/datasets/vector/:dataset_name/:id

Request

REST
REST
{}

Response

REST
REST
{
"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"
}

‚Äč