MxFace MxFace

API Reference

Human Detection API

Detect people in an image and get back the total headcount plus a confidence score for every person found.

Select version

Download document

Overview

Detect people in an image and return the total headcount along with a confidence score for each person found. Useful for occupancy, safety and zone analytics.

Headcount

Total people in frame

Per-person score

Confidence array

Optional boxes

Bounding boxes on request

Details

Request URL

https://faceapi.mxface.ai/api/v3/Face/PeopleDetection

Method type

POST

Headers

Content-Type : application/json

Subscriptionkey : xxxxxxxxxxx

Request body

{
  "encoded_image": "/9j/4AAQSkZJRgABAQAAAQA......"
}

Request parameters

encoded_image YesString

base64 encoded string

returnImage Optionalbool

If true the API returns bounding boxes for the people in the image. If false only the score and count are returned.

Response body

{
  "peopleCount": 1,
  "score": [
    0.9452115297317505
  ]
}

Response parameters

peopleCount int

Total number of people detected in the image.

score float

Quality score for each detected person, returned as an array.

Errors

200

Success

400

Invalid request. Please pass valid json with all required parameters.
Not valid biometric data or invalid format.
The input is not a valid Base-64 string.

401

Access denied due to an invalid subscription key or the wrong API endpoint. Make sure to provide a valid key for an active subscription.

500

Something went wrong, please try again later.

Try it on your own images

Free trial key unlocks every model.

Get API key
MxFace, powered by Mantra Softech ↗

© 2026 MxFace. All rights reserved.

Verify to continue

Enter the code to download

Captcha does not match. Please try again.