---
title: "POST /detect"
method: POST
path: "/detect"
---

# POST /detect

`POST /detect`

Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.

## Query parameters

- `returnFaceId` boolean
- `returnFaceLandmarks` boolean
- `returnFaceAttributes` string[]

## Parameters

- `../../../Common/Parameters.json#/components/parameters/ImageUrl` — unresolved $ref

## Response `200`

A successful call returns an array of face entries ranked by face rectangle size in descending order. An empty response indicates no faces detected.

- DetectedFace[]
  - `faceId` string, uuid
  - `faceRectangle` FaceRectangle, required — A rectangle within which a face can be found
    - `width` integer, required — The width of the rectangle, in pixels.
    - `height` integer, required — The height of the rectangle, in pixels.
    - `left` integer, required — The distance from the left edge if the image to the left edge of the rectangle, in pixels.
    - `top` integer, required — The distance from the top edge if the image to the top edge of the rectangle, in pixels.
  - `faceLandmarks` FaceLandmarks — A collection of 27-point face landmarks pointing to the important positions of face components.
    - `pupilLeft` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `pupilRight` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseTip` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `mouthLeft` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `mouthRight` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyebrowLeftOuter` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyebrowLeftInner` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeLeftOuter` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeLeftTop` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeLeftBottom` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeLeftInner` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyebrowRightInner` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyebrowRightOuter` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeRightInner` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeRightTop` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeRightBottom` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `eyeRightOuter` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseRootLeft` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseRootRight` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseLeftAlarTop` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseRightAlarTop` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseLeftAlarOutTip` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `noseRightAlarOutTip` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `upperLipTop` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `upperLipBottom` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `underLipTop` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
    - `underLipBottom` Coordinate — Coordinates within an image
      - `x` number, required — The horizontal component, in pixels.
      - `y` number, required — The vertical component, in pixels.
  - `faceAttributes` FaceAttributes — Face Attributes
    - `age` number — Age in years
    - `gender` 'male' | 'female' | 'genderless' — Possible gender of the face.
    - `smile` number — A number ranging from 0 to 1 indicating the intensity level associated with a property.
    - `facialHair` FacialHair — Properties describing facial hair attributes.
      - `moustache` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `beard` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `sideburns` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
    - `glasses` 'noGlasses' | 'readingGlasses' | 'sunglasses' | 'swimmingGoggles' — Glasses type if any of the face.
    - `headPose` HeadPose — Properties indicating head pose of the face.
      - `roll` number
      - `yaw` number
      - `pitch` number
    - `emotion` Emotion — Properties describing facial emotion in form of confidence ranging from 0 to 1.
      - `anger` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `contempt` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `disgust` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `fear` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `happiness` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `neutral` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `sadness` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `surprise` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
    - `hair` Hair — Properties describing hair attributes.
      - `bald` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
      - `invisible` boolean — A boolean value describing whether the hair is visible in the image.
      - `hairColor` HairColor[]
        - `color` 'unknown' | 'white' | 'gray' | 'blond' | 'brown' | 'red' | 'black' | 'other' — Name of the hair color.
        - `confidence` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
    - `makeup` Makeup — Properties describing present makeups on a given face.
      - `eyeMakeup` boolean — A boolean value describing whether eye makeup is present on a face.
      - `lipMakeup` boolean — A boolean value describing whether lip makeup is present on a face.
    - `occlusion` Occlusion — Properties describing occlusions on a given face.
      - `foreheadOccluded` boolean — A boolean value indicating whether forehead is occluded.
      - `eyeOccluded` boolean — A boolean value indicating whether eyes are occluded.
      - `mouthOccluded` boolean — A boolean value indicating whether the mouth is occluded.
    - `accessories` Accessory[] — Properties describing any accessories on a given face.
      - `type` 'headWear' | 'glasses' | 'mask' — Type of an accessory
      - `confidence` number — A number ranging from 0 to 1 indicating a level of confidence associated with a property.
    - `blur` Blur — Properties describing any presence of blur within the image.
      - `blurLevel` 'Low' | 'Medium' | 'High' — An enum value indicating level of blurriness.
      - `value` number — A number ranging from 0 to 1 indicating the intensity level associated with a property.
    - `exposure` Exposure — Properties describing exposure level of the image.
      - `exposureLevel` 'UnderExposure' | 'GoodExposure' | 'OverExposure' — An enum value indicating level of exposure.
      - `value` number — A number ranging from 0 to 1 indicating the intensity level associated with a property.
    - `noise` Noise — Properties describing noise level of the image.
      - `noiseLevel` 'Low' | 'Medium' | 'High' — An enum value indicating level of noise.
      - `value` number — A number ranging from 0 to 1 indicating the intensity level associated with a property.

## Other responses

- `default` — Error response.

## Changes

- **2018-01-03** `d8fb8ca6c06c` — 1 info
  - api operation id `Face_Detect` removed and replaced with `Face_DetectWithUrl`
- **2017-12-28** `e67414f9aeba` — 4 warning, 1 info
  - deleted the `query` request parameter `detectionModel`
  - deleted the `query` request parameter `faceIdTimeToLive`
  - deleted the `query` request parameter `recognitionModel`
  - deleted the `query` request parameter `returnRecognitionModel`
  - …1 more

[Change history](https://skmtc.dev/azure/apis/cognitiveservices-face/changes/detect/post.md)

---

[API](https://skmtc.dev/azure/apis/cognitiveservices-face.md) · [All operations](https://skmtc.dev/azure/apis/cognitiveservices-face/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/cognitiveservices-face/revisions/565aa12d71eb/schema)
