Face API

The Coqnitics Face API can be integrated easily into your system, a json result will be returned. The details and sample response of the API are as below.

Check out the online demo: https://recoqnitics.com/demo/face-api


Face API can be integrated into the system to detect and analyze faces in an image. The API provides demographic and behavioral analysis of faces that are captured in the uploaded image such as age, gender, emotions and landmarks of different components of face.

Request Method


Return Values

Key Description
faces Array of detected faces with their respective position, face confidence, landmark locations and demographic details (age, gender, emotions).
faceConfidence The confidence that the detected subject is a face.
boundingBox The rectangular box position of a detected face. The returned variables are the (x,y) coordinates of the left corner and the (width, height) of the box.
age The predicted age (rounded to nearest integer) of a detected face.
gender The predicted gender of a detected face.
emotions The predicted probability for each emotion of the face detected with respective confidence score. Our model predicts 7 types of emotions: angry, disgust, fear, happy, sad, surprise and neutral.
landmarks Coordinates of facial landmarks on the face. Currently 5 landmarks are included: left eye, right eye, nose, and both sides of the lips.

Sample Response

The JSON response when the request is successful:

  "faces": [
          "faceConfidence": 0.999996542930603,
          "boundingBox": {
              "x": 296,
              "y": 60,
              "w": 89,
              "h": 115
          "age": 24,
          "gender": {
              "value": "Female",
              "confidence": 100
          "emotions": {
              "angry": 0.00012554552406072618,
              "disgust": 5.3910553106106817e-8,
              "fear": 0.00004382472950965166,
              "happy": 0.9884075164794922,
              "sad": 0.00003216653130948544,
              "surprise": 0.011180317401885987,
              "neutral": 0.00021055862307548523
          "landmarks": [
                  "type": "eyeLeft",
                  "x": 323,
                  "y": 107
                  "type": "eyeRight",
                  "x": 364,
                  "y": 108
                  "type": "nose",
                  "x": 341,
                  "y": 131
                  "type": "lipLeft",
                  "x": 320,
                  "y": 145
                  "type": "lipRight",
                  "x": 361,
                  "y": 147