Biointellic - API

  • Biointellic Liveness is Imageware's anti-spoofing facial recognition system designed to prevent secured system breaches through accredited biometric authentication.

  • FaceMatch is Imageware's face-authenticating system that enables users to compare two face images and determine match pass or fail.

Retrieve Auth Token (JWT)#

POST {biointellic_url}/api/authenticate

Creates a JWT token to authorize clients accessing secured Biointellic and FaceMatch functions.

The returned access_token will need to be included with all calls made to Biointellic and FaceMatch, otherwise a 401 - Unauthorized error is returned.

JWT tokens expire often and will need to be renewed frequently and automatically.

Example Request

curl --location --request POST '{{biointellic_url}}/api/authenticate' \
--header 'authorization: Basic {{base64_credentials}}'

Example Response

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOiJBRE1JTiIsImlhdCI6MTYxOTczNjM4MSwiZXhwIjoxNjE5NzM5OTgxfQ.Xx0735yNcGLFfsY514IO1VJQO9RIYcHVqwELNPTRD7s

Request Headers

Authorization: Basic {base64_creds}

Where {base64_creds} is the base64 encoding of {userId}:{password}

For example: userId = "admin" and password = "hunter2" would produce base64 creds of YWRtaW46aHVudGVyMg== thus giving a final header of,

Authorization: Basic YWRtaW46aHVudGVyMg==

Biointellic Liveness#

POST {biointellic_url}/api/liveness

Liveness calculates the likelihood that the provided face image is spoofed.

The request MUST include an Authorization header filled with Bearer {auth_token} where {auth_token} is a valid JWT.

The request MUST contain an image file uploaded as multipart/form-data

The request MAY contain a debug flag at the end of the URI. If you want Imageware to store uploaded images for debugging purposes, please set ?debug=true, as any other value will default to NOT store images.

note

This will make the request take slightly longer#

Image Requirements

Attached image files must adhere the following parameters:

  • Recommended height: 720 or 1080px; Minimum supported height: 480px
  • Image format: PNG
  • Out-of-plane rotation (face pitch and yaw) angle: -20±3 — 20±3 °
  • In-plane rotation (face roll) angle: -30±3 — 30±3 °
  • Interpupillary distance: ~90±5 px
  • Minimal face size: 224px
  • Tinted eyewear, motion blur, poor lighting, image filters, lens-altering (such as "fish eye"), and other factors can interfere with validation success

Example Request

curl -F data=@/home/user/face.jpg -H "Authorization: Bearer {auth_token}" -X POST "{biointellic_url}/api/liveness?debug=false"

Example Response (Good Image with Passing Score)

{
"id": "9d7b234a-37c2-4696-adcf-3d75d835a94d",
"service": "LIVENESS",
"result": "0.8755132",
"userId": "admin",
"pass": true
}

Example Response (Good Image with Failing Score)

{
"id": "c86a9430-d4f1-4164-93d1-209be47170ad",
"service": "LIVENESS",
"result": "0.4755132",
"userId": "admin",
"pass": false
}

Example Response (Bad Image)

{
"statusCode": 400,
"code": "FACE_TOO_SMALL",
"error": "Bad Request",
"message": "Interpupillary distance is too small"
}

With this error code and message, Imageware can help troubleshoot the image quality.

Biointellic Face Match#

POST {biointellic_url}/api/match

Performs a biometric match comparison between two face images using Imageware's patented algorithms and returns a pass or fail flag and confidence score: PASS ≥ 48.

The request MUST include an Authorization header filled with Bearer {auth_token} where {auth_token} is a valid JWT.

The request MUST contain two image files uploaded as multipart/form-data

The request MAY contain a debug flag at the end of the URI. If you want Imageware to store uploaded images for debugging purposes, please set ?debug=true, since any other value will default to NOT store images.

note

This will make the request take slightly longer#

Image Requirements

Attached image files must adhere to the following parameters:

  • Format: JPG / JPEG or PNG
  • Dimensions: Minimum 150x150; Maximum 1024x1024px
  • File size: Maximum 2MB

Example Request

curl -X POST -H "Authorization: Bearer {auth_token}" -F 'image1=@/home/user/face1.jpg' -F 'image2=@/home/user/face2.jpg' {{biointellic_url}}/api/match?debug=false

Example Response (Good Images with Passing Score)

{
"id": "7eb4e932-1d55-4bbd-a030-97f911a4d22c",
"service": "MATCH",
"result": "67.68598175048828",
"userId": "admin",
"pass": true
}

Example Response (Good Images with Failing Score)

{
"id": "8ee3f95a-03ff-4500-9414-ff45414d3493",
"service": "MATCH",
"result": "37.68598175048828",
"userId": "admin",
"pass": false
}

Example Response (Bad Images)

{
"statusCode": 400,
"code": "-3491",
"error": "Bad Request",
"message": "Plugin Face - Unable to find the face image"
}

With this error code and message, Imageware can help troubleshoot the image quality.