The Visual Search API is designed based on RESTful architecture, which allows for consistent and organized resource-oriented URLs. The API accepts raw application json bodies, and returns responses encoded in JSON format. In order to maintain standardization, the API follows HTTP response codes, authentication, and verbs.
Visual search uses images as the input query instead of text. It allows users to search for similar or related products, images, or information by simply uploading an image or taking a picture with their smartphone camera.
The technology behind visual search involves using advanced computer vision and machine learning algorithms to analyze and understand the visual attributes of the image, such as color, texture, shape, and patterns. The system then compares these attributes to a database of indexed images to identify the closest matches.
Visual Search enables users to discover products or information that they may not have been able to find through traditional text-based search, resulting in an enhanced user experience and improved engagement.
As a client looking to implement visual search technology, the first step is to carefully evaluate and select the most appropriate AI model for your specific product catalog. This involves understanding the unique characteristics and features of the products in your catalog, as well as the search behaviors of your target audience. By selecting the right AI model, you can ensure that your visual search solution accurately identifies and matches the visual attributes of your products, providing relevant and personalized search results to your customers. This helps to enhance their shopping experience and increase engagement with your brand.
The available search models (Contexts) you can choose to search are:
Each product assortment (store) must have a separate Visual Search Index. In order to push documents and perform searches you need one API Key for each Index.
To authorize API requests, a Bearer token must be obtained by following the authentication process. This token serves as a credential that validates the client's identity and grants access to the API. However, it is important to note that the token has an expiration time, after which subsequent API requests will be denied with a 401 response code. In such a scenario, the client must perform the authentication process again to obtain a new token that can be used to authorize future API requests. This ensures that only authorized clients can access the API and maintain the security and integrity of the system.
curl -X 'GET' \
'https://auth.apsis.ai/api-keys/authenticate' \
-H 'accept: application/json' \
-H 'x-api-Key: xxxx-xxxx-xxxx-xxxx-xxxx' \
-H 'secret: xxxxxxx'
After registering an account, the admin interface will be available, and it can be used to create API Keys:
Create a new Api Key :
Save the generated Api Key and secret in your client configuration:

Configuration | Scope | Example | Description |
|---|---|---|---|
Visual Search Auth Url | Global | https://auth.apsis.ai | The authentication endpoint. |
Visual Search Api Url | Global | https://api.apsis.ai | The search api endpoint. |
Api Key | Store(Assortment) |
| The Api Key created on your apsis.ai account. |
Api Secret | Store(Assortment) |
| The Secret created on your |
Context | Store(Assortment) | fashion | The type of Visual Search model that fits the Assortment on your current Store. |
Retrieves a Api Keys resource.
| x-api-Key | string Example: 3dfc6522-5370-4fcb-a9ff-1474eac313cb Api Key |
| secret | string Example: f87e8f3937 Api Key Secret |
{- "data": {
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZW1haWwiOiJ0ZXN0QGV4YW1wbGUudGVzdCIsImV4cCI6MTYzNzM1MjI5NCwiZXhwX2F0IjoiMjAyMS0xMS0xOSAyMjowNDo1NCJ9.L2o1d98zNoEimIPeWQLgkV7pndWOlQhLTV0wjwSaRmU"
}
}Retrieves a Api Keys resource.
| x-api-Key | string Example: 3dfc6522-5370-4fcb-a9ff-1474eac313cb Api Key |
| secret | string Example: f87e8f3937 Api Key Secret |
{- "data": [ ]
}To be eligible for indexing, the feed must be publicly available and accessible to our indexing systems. It should contain links to product images, as well as their respective internal reference or product ID. This information allows us to create an index of the products, which can then be used to power visual search and other AI-driven features.
By indexing products based on feed data, we can ensure that our search results accurately reflect the products available on the client platform. This allows for more relevant and accurate search results for users, as well as a better user experience overall.
To get started with document indexing based on feed data, clients should ensure that their feed is properly formatted and accessible to our indexing systems. This may involve working with our technical team to ensure that the feed meets our requirements and specifications. Once the feed has been properly set up, our indexing systems can begin the process of creating an index of the available products.
→ Content example:
[
{
"path":"https://example.com/media/catalog/product/w/b/wb05-red-0.jpg",
"meta":{
"id":10
}
},
{
"path":"https://example.com/media/catalog/product/w/b/wb06-red-0.jpg",
"meta":{
"id":11
}
},
{
"path":"https://example.com/media/catalog/product/w/b/wb06-red-0_alt1.jpg",
"meta":{
"id":11
}
},
{
"path":"https://example.com/media/catalog/product/w/b/wb03-purple-0.jpg",
"meta":{
"id":12
}
},
{
"path":"https://example.com/media/catalog/product/w/b/wb07-brown-0.jpg",
"meta":{
"id":13
}
},
{
"path":"https://example.com/media/catalog/product/w/b/wb04-blue-0.jpg",
"meta":{
"id":14
}
},
{
"path":"https://example.com/media/catalog/product/u/g/ug06-lb-0.jpg",
"meta":{
"id":15
}
},
{
"path":"https://example.com/media/catalog/product/u/g/ug07-bk-0.jpg",
"meta":{
"id":16
}
},
{
"path":"https://example.com/media/catalog/product/u/g/ug07-bk-0_alt1.jpg",
"meta":{
"id":16
}
},
{
"path":"https://example.com/media/catalog/product/u/g/ug04-bk-0.jpg",
"meta":{
"id":17
}
},
{
"path":"https://example.com/media/catalog/product/u/g/ug02-bk-0.jpg",
"meta":{
"id":18
}
},
{
"path":"https://example.com/media/catalog/product/u/g/ug05-gr-0.jpg",
"meta":{
"id":19
}
}
]
Use this endpoint to register a new feed or refresh existing data with an update to your Visual Search Index. In order to receive file search results, at least one feed must be successfully indexed.
Please ensure that the feed always reflects the current version of the catalog that you want to expose via Visual Search. Note that partial or incremental updates are not currently supported.
| feedUrl required | string <= 2083 characters Your publicly available catalog feed url. |
| context required | string Enum: "fashion" "furniture"
|
{- "context": "fashion"
}{- "status": "true",
- "error": "",
- "data": {
- "id": 1,
- "indexId": "601670a3-4e01-4f85-b08f-771ddbed7bdf",
- "context": "fashion"
}
}Use this endpoint to check the status and details of your feed.
| id required | integer Example: 1 Unique identifier for the object. |
{- "data": {
- "id": 1,
- "indexId": "601670a3-4e01-4f85-b08f-771ddbed7bdf",
- "status": "indexed",
- "userId": 1,
- "createdAt": "string",
- "retries": 1,
- "picturesCount": 1,
- "picturesAdded": 1,
- "picturesRemoved": 1,
- "context": "fashion",
- "failureReason": "string"
}
}Creates a Files resource.
| fileName required | string Name of the image file. |
| base64Image required | string This is a string representation of an image file that has been encoded using the Base64 encoding scheme. |
| context | string Enum: "fashion" "furniture" This parameter is required for searches on demo data. For searches authorized by an API Key, the search context will be determined by the context of your index. |
| priority | any Default: "default" Enum: "default" "shape" "color" This parameter is experimental and determines the weight given to specific attributes when comparing images for similarity. |
{- "fileName": "fileName.jpg",
- "base64Image": "V+.jTj!",
- "context": "fashion",
- "priority": "default"
}{- "data": {
- "id": "601670a3-4e01-4f85-b08f-771ddbed7bdf",
- "fileName": "fileName.jpg",
- "query": "red cotton dress",
- "status": "Received",
- "createdAt": "string",
- "uploadedAt": "string",
- "context": "fashion",
- "indexId": "601670a3-4e01-4f85-b08f-771ddbed7bdf",
- "userId": 1,
- "isShareable": true,
- "priority": "default"
}
}The data property may be empty if no results are available yet.
| id required | string <uuid> Example: 601670a3-4e01-4f85-b08f-771ddbed7bdf |
{- "data": {
- "requestId": "601670a3-4e01-4f85-b08f-771ddbed7bdf",
- "websiteId": "999",
- "platformId": "999",
- "attributes": [
- [
- "TOP",
- "TOP"
]
], - "points_of_interest": [
- {
- "coordinates": [
- 0,
- 0,
- 100,
- 100
], - "attributes": {
- "category": "string"
},
}
], - "pointsOfInterest": [
- {
- "coordinates": [
- 0,
- 0,
- 100,
- 100
], - "attributes": {
- "category": "string"
},
}
]
}
}The data property may be empty if no results are available yet.
| id required | string <uuid> Example: 601670a3-4e01-4f85-b08f-771ddbed7bdf |
| page required | integer >= 1 Default: 1 Example: 1 The page number to retrieve. |
| itemsPerPage | integer [ 1 .. 50 ] Default: 10 This parameter represents the desired number of results per page. |
| includeFavourites | integer Default: 0 Enum: 0 1 Example: includeFavourites=1 Whether to include Favourites resource details |
| poi | integer or null Example: poi=1
|
| resizeProfile | string Default: null Value: "widget"
|
{- "status": true,
- "error": "string",
- "metadata": {
- "pagination": {
- "currentPage": 1,
- "lastPage": 1,
- "numItemsPerPage": 10
}, - "attributes": [
- [
- "TOP",
- "TOP"
]
], - "pointsOfInterest": [
- {
- "coordinates": [
- 0,
- 0,
- 100,
- 100
], - "attributes": {
- "category": "string"
},
}
]
}
}