Image Recognition API Documentation


This method of the Image Recognition API sends an image recognition request from a client application (such as mobile apps or your own server).

  • token: the Token of the collection to be searched.
  • image: the query image, as binary image file in jpeg or png (without transparency) format.
  • (optional) bboxes: the response will include bounding boxes. By default it’s false.
  • (optional) embed_custom: the response custom data will be embedded. Otherwise, it will be sent as an url. By default it’s false. Note that embedding the custom data results in an additional latency. If you need to minimize response times we recommend getting just URLs (i.e. no embedding) and caching the data.

Note that the parameters must use multipart/form-data encoding.

Request examples

The example uses query image query.jpg and collection token afe34dbe14890fac

Curl example
Python example

Response fields

The response contains a JSON dictionary with recognized items (objects) ordered by their scores, i.e. the first item has the highest score.

The JSON dictionary has the following fields:

  • results: result list. If no items are recognized, this will be an empty JSON array.
    • item: the recognized item:
      • uuid: the item id.
      • name: the item name.
      • (optional) url: the item url (if it exists).
      • (optional) custom: the item custom data (if it exists).
      • (optional) tracking: the tracking data (if it exists)
      • (optional) content: the content (if it exists)
    • image: the best matching reference image among all images representing the item:
      • uuid: the image id.
      • thumb_120: a thumbnail of the image, 120×120 pixels.
    • score: the recognition score, representing the similarity between the query image and the matched reference image.
    • (optional) bbox: the bounding box (if exists).

In case of an error, in addition to an appropriate HTTP status code, the service will also return a much more specific and informative error codes in the JSON response. Check the documentation on Error codes in the recognition API for more detailed information.

Response examples