---
title: "Identify Faces and Characteristics in an Image"
method: POST
path: "/api/ai/images/v2/face-detection"
tags: ["AI Services"]
---

# Identify Faces and Characteristics in an Image

`POST /api/ai/images/v2/face-detection`

## Request

- Base URL: `https://api.worqhat.com`
- URL: `https://api.worqhat.com/api/ai/images/v2/face-detection`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/docs/api/ai/images/v2/face-detection/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint is used to identify faces and characteristics in an image. It accepts a Form Data containing the image and returns the the face detection results.

## Request body `multi-part/form-data`

- object
  - `image` string, binary: The image to be sent as input.

## Response `200`

Successful response

- object
  - `code` integer
  - `status` string
  - `data` object
    - `analysed_data` object[]
      - `age_range` object
        - `high` integer
        - `low` integer
      - `beard` object
        - `confidence` number
        - `value` boolean
      - `bounding_box` object
        - `height` number
        - `left` number
        - `top` number
        - `width` number
      - `confidence` number
      - `emotions` object[]
  - `processing_time` integer
  - `processing_id` string
  - `processing_count` integer

## Other responses

- `400`: Bad Request. This mostly happens because of invalid image sizes. Neither `height` nor `width` of the image should be less than 128px. Only one of the sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512) Maximum dimensions supported is 512x896.
- `401`: Unauthorized
- `404`: Not Found
- `406`: Not Acceptable
- `500`: Internal Server Error

## Changes

- **2023-10-20** `871850b7231f`: 1 breaking, 3 warning, 19 info
  - removed the media type `multipart/form-data` from the request body
  - removed the optional property `analysed_data` from the response with the `200` status
  - removed the optional property `id` from the response with the `200` status
  - removed the optional property `timestamp` from the response with the `200` status
  - …19 more
- **2023-08-15** `b5ffe2a9748f`: 6 breaking, 17 info
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `404`
  - …19 more
- **2023-08-04** `be85a8f8fc8c`: 6 breaking, 15 warning
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `401`
  - the response's body type changed from `object` to no type for status `404`
  - …17 more
- **2023-08-04** `d6dbf089e00d`: 1 info
  - the endpoint scheme security `bearerAuth` was removed from the API
- **2023-08-03** `87a2697d00bf`: 2 info
  - the endpoint scheme security `bearerAuth` was added to the API
  - the endpoint scheme security `ApiKeyAuth AND OrgKeyAuth` was removed from the API

[Operation history](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/changes/api/ai/images/v2/face-detection/post.md)

---

[API](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2.md) - [All operations](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/llms.txt) - [OpenAPI document](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/revisions/fc369f69a3e6?raw)
