1. Home
  2. Docs
  3. Detection & Identification API document
  4. Sentry Face Recognition API
  5. Recognize API

Recognize API

The recognize API will detect the faces present in an image and associate labels with them. The return data will contain the Labels and bounding boxes of any faces found. The API returns labels that are generated sequentially, i.e, such as “Person 0”, “Person 1” ..etc. The Face Recognition algorithm associates this generated label with a specific face. Any further images of the same person will get the same label. 

Endpoint URL: https://icof49shn9.execute-api.us-west-2.amazonaws.com/v1/recognize
Request Type: POST

"content-type": "application/json", 
"x-api-key": "<API Key>", 
"cache-control": "no-cache"

X-api-key: Get your API key from Sentry.

Request Body:
"body": {
		"Site_Id": "string",
		"Camera_Name": "string",
		"Image_Bytes": "string"

ParameterDescriptionData Type
Site_IdUniquely identifies the site where camera is hosted. You can get this ID from Sentry.string
Camera_NameName for the camera.string
Image_BytesImage byte stream in base64 encoded format.Base64 encoded


Here is an example of a successful response, containing the Labels and Bounding Boxes.

200 Response
'image_id': 'Site-Id_Camera-Name_timestamp', 
'Labels': ['Person1', 'Person3'], 
'BoundingBoxes': '[[94, 184, 327, 419], [185, 535, 323, 630]]', 
'Status Messages': "['OK']"

The bounding boxes are ordered [top, left, bottom, right] in pixels. 

On errors, the “Status Message” field will contain a description for the error.

Was this article helpful to you? Yes No

How can we help?