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.
POST https://api.anndb.com/v1/datasets/image/:dataset_name
{"image": "data:image/jpeg;base64,/9j...","metadata": {"key": "value",...}}
{"id": "2c44707c-acbf-49be-a8ef-a63028491f4c"}
PUT https://api.anndb.com/v1/datasets/image/:dataset_name/:id
{"image": "https://live.staticflickr.com/65535/46797499615_95a0ef171b_w_d.jpg","metadata": {"key": "value",...}}
{"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"}
DELETE https://api.anndb.com/v1/datasets/image/:dataset_name/:id
{}
{"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"}
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.
POST https://api.anndb.com/v1/datasets/vector/:dataset_name
{"vector": [0.12, 0.34, 0.8, 0.56, ...],"metadata": {"key": "value",...}}
{"id": "2c44707c-acbf-49be-a8ef-a63028491f4c"}
PUT https://api.anndb.com/v1/datasets/vector/:dataset_name/:id
{"vector": [0.12, 0.34, 0.8, 0.56, ...],"metadata": {"key": "value",...}}
{"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"}
DELETE https://api.anndb.com/v1/datasets/vector/:dataset_name/:id
{}
{"id": "c6d04292-27c2-4cc2-90ca-16e2522c3217"}