---
title: "Create a new liveness session with verify. Provide the verify image during session creation."
method: POST
path: "/detectLivenessWithVerify-sessions"
---

# Create a new liveness session with verify. Provide the verify image during session creation.

`POST /detectLivenessWithVerify-sessions`

A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.

Permissions includes...
>
*
  * A token lifetime of 10 minutes.

> [!NOTE]
>
> *
>   * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation.
>   * To retrieve a result, use the Get Liveness With Verify Session.
>   * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries.

## Response `200`

A successful call create a session for a client device and provide an authorization token for use by the client application for a limited purpose and time.

- LivenessWithVerifySession — Session result of detect liveness with verify.
  - `sessionId` string, required — The unique ID to reference this session.
  - `authToken` string, required — Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable.
  - `status` 'NotStarted' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled', required — Enum describing allowed operation states.
  - `modelVersion` '2024-11-15' — The model version used for liveness classification.
  - `isAbuseMonitoringEnabled` object — Denotes if the abuse monitoring feature was enabled during this session.
  - `expectedClientIpAddress` string — The expected IP address or CIDR block of the client that runs the liveness check.
  - `results` LivenessWithVerifySessionResults, required — The results of the liveness with verify session.
    - `verifyReferences` LivenessWithVerifyReference[], required — The references used for face verification.
      - `referenceType` 'Color' | 'Infrared' | 'Depth', required — The type of image.
      - `faceRectangle` FaceRectangle, required — A rectangle within which a face can be found.
        - `top` integer, required — The distance from the top edge if the image to the top edge 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.
        - `width` integer, required — The width of the rectangle, in pixels.
        - `height` integer, required — The height of the rectangle, in pixels.
      - `qualityForRecognition` 'low' | 'medium' | 'high', required — Indicates quality of image for recognition.
    - `attempts` LivenessWithVerifySessionAttempt[], required — The attempts data of underlying liveness with verify call with the session.
      - `attemptId` integer, required — The attempt ID, start from 1.
      - `attemptStatus` 'NotStarted' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled', required — Enum describing allowed operation states.
      - `result` LivenessWithVerifyResult — The results of the liveness with verify call.
        - `livenessDecision` 'uncertain' | 'realface' | 'spoofface' — The outcome of the liveness classification.
        - `targets` LivenessDecisionTargets, required — The targets used for liveness classification.
          - `color` LivenessColorDecisionTarget, required — The target from color image used for liveness classification.
            - `faceRectangle` FaceRectangle, required — A rectangle within which a face can be found.
              - …
        - `digest` string, required — The server calculated digest for this request. If the client reported digest differs from the server calculated digest, then the message integrity between the client and service has been compromised and the result should not be trusted. For more information, see how to guides on how to leverage this value to secure your end-to-end solution.
        - `sessionImageId` string — The image ID of the session request.
        - `verifyResult` LivenessWithVerifyOutputs — The face verification output.
          - `matchConfidence` number, float, required — The target face liveness face and comparison image face verification confidence.
          - `isIdentical` boolean, required — Whether the target liveness face and comparison image face match.
        - `verifyImageHash` string — The sha256 hash of the verify-image in the request.
      - `error` LivenessError — The error of the liveness classification.
        - `code` string, required — The error code.
        - `message` string, required — The error message.
        - `targets` LivenessDecisionTargets, required — The targets used for liveness classification.
          - `color` LivenessColorDecisionTarget, required — The target from color image used for liveness classification.
            - `faceRectangle` FaceRectangle, required — A rectangle within which a face can be found.
              - …
      - `clientInformation` ClientInformation[] — The client information gathered during the liveness attempt.
        - `ip` string, required — The client ip address seen during the liveness attempt.
      - `abuseMonitoringResult` AbuseMonitoringResult — The abuse monitoring result for the liveness attempt.
        - `isAbuseDetected` object, required — Denotes if abuse detection triggered during this liveness attempt.
        - `otherFlaggedSessions` OtherFlaggedSessions[], required — Denotes if abuse detection triggered during this liveness attempt.
          - `attemptId` integer, required — The attempt ID, start from 1.
          - `sessionId` string, required — The unique session ID of the flagged session.
          - `sessionImageId` string — The image ID from the flagged session.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/ai-face.md) · [All operations](https://skmtc.net/azure/apis/ai-face/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/ai-face/revisions/e9a68c525be6/schema)
