Microsoft Azure AI Foundry DetectLivenessWithVerify Sessions API

The DetectLivenessWithVerify Sessions API from Microsoft Azure AI Foundry — 2 operation(s) for detectlivenesswithverify sessions.

GitHub OpenAPI

Operations 3

POST /detectLivenessWithVerify-sessions Create a new liveness session with verify. #
GET /detectLivenessWithVerify-sessions/{sessionId} Liveness session operations get liveness with verify session result #
DELETE /detectLivenessWithVerify-sessions/{sessionId} Delete all session related information for matching the specified session id #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/azure-ai-foundry:azure-ai-foundry-detectlivenesswithverify-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

azure-ai-foundry-detectlivenesswithverify-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure AI Face DetectLivenessWithVerify Sessions API
  version: v1.2
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
security:
- KeyAuth: []
- AADToken:
  - https://cognitiveservices.azure.com/.default
tags:
- name: DetectLivenessWithVerify Sessions
paths:
  /detectLivenessWithVerify-sessions:
    post:
      operationId: LivenessSessionOperations_CreateLivenessWithVerifySession
      summary: Create a new liveness session with verify.
      description: '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.'
      responses:
        '200':
          description: 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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LivenessWithVerifySession'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FaceErrorResponse'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                livenessOperationMode:
                  type: string
                  enum:
                  - Passive
                  - PassiveActive
                  description: Type of liveness mode the client should follow.
                deviceCorrelationIdSetInClient:
                  type: boolean
                  description: Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body.
                enableSessionImage:
                  type: boolean
                  description: Whether or not store the session image.
                livenessModelVersion:
                  type: string
                  enum:
                  - '2024-11-15'
                  description: The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen
                returnVerifyImageHash:
                  type: boolean
                  description: Whether or not return the verify image hash.
                verifyConfidenceThreshold:
                  type: number
                  format: float
                  maximum: 1
                  minimum: 0
                  description: Threshold for confidence of the face verification. Please refer to the documentation for more details. https://learn.microsoft.com/legal/cognitive-services/face/characteristics-and-limitations?context=%2Fazure%2Fai-services%2Fcomputer-vision%2Fcontext%2Fcontext#recognition-confidence-score
                verifyImage:
                  type: string
                  description: The image stream for verify. Content-Disposition header field for this part must have filename.
                  format: binary
                deviceCorrelationId:
                  type: string
                  description: Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null.
                authTokenTimeToLiveInSeconds:
                  type: integer
                  format: int32
                  maximum: 86400
                  minimum: 60
                  description: Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600.
              required:
              - livenessOperationMode
              - verifyImage
      tags:
      - DetectLivenessWithVerify Sessions
  /detectLivenessWithVerify-sessions/{sessionId}:
    get:
      operationId: LivenessSessionOperations_GetLivenessWithVerifySessionResult
      description: Get session result of detectLivenessWithVerify/singleModal call.
      parameters:
      - name: sessionId
        in: path
        description: The unique ID to reference this session.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LivenessWithVerifySession'
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FaceErrorResponse'
      tags:
      - DetectLivenessWithVerify Sessions
      summary: Liveness session operations get liveness with verify session result
      x-summary-source: derived
    delete:
      operationId: LivenessSessionOperations_DeleteLivenessWithVerifySession
      summary: Delete all session related information for matching the specified session id
      description: '> [!NOTE]

        > Deleting a session deactivates the Session Auth Token by blocking future API calls made with that Auth Token. While this can be used to remove any access for that token, those requests will still count towards overall resource rate limits. It''s best to leverage TokenTTL to limit length of tokens in the case that it is misused.'
      parameters:
      - name: sessionId
        in: path
        description: The unique ID to reference this session.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted session and all correlated data.
        default:
          description: An unexpected error response.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FaceErrorResponse'
      tags:
      - DetectLivenessWithVerify Sessions
components:
  schemas:
    LivenessWithVerifyReference:
      type: object
      description: The detail of face for verification.
      properties:
        referenceType:
          $ref: '#/components/schemas/ImageType'
          description: The image type which contains the face rectangle where the liveness classification was made on.
        faceRectangle:
          $ref: '#/components/schemas/FaceRectangle'
          description: The face region where the comparison image's classification was made.
        qualityForRecognition:
          $ref: '#/components/schemas/QualityForRecognition'
          description: Quality of face image for recognition.
      required:
      - referenceType
      - faceRectangle
      - qualityForRecognition
    QualityForRecognition:
      type: string
      description: Indicates quality of image for recognition.
      enum:
      - low
      - medium
      - high
      x-ms-enum:
        name: QualityForRecognition
        modelAsString: true
        values:
        - name: low
          value: low
          description: Low quality.
        - name: medium
          value: medium
          description: Medium quality.
        - name: high
          value: high
          description: High quality.
    FaceError:
      type: object
      description: 'The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.'
      properties:
        code:
          type: string
          description: One of a server-defined set of error codes.
        message:
          type: string
          description: A human-readable representation of the error.
      required:
      - code
      - message
    LivenessWithVerifySession:
      type: object
      description: Session result of detect liveness with verify.
      properties:
        sessionId:
          type: string
          description: The unique ID to reference this session.
          readOnly: true
        authToken:
          type: string
          description: 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:
          $ref: '#/components/schemas/Azure.Core.Foundations.OperationState'
          description: The current status of the session.
        modelVersion:
          $ref: '#/components/schemas/LivenessModel'
          description: The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen
        results:
          $ref: '#/components/schemas/LivenessWithVerifySessionResults'
          description: The results of the liveness with verify session.
      required:
      - sessionId
      - authToken
      - status
      - results
    LivenessDecision:
      type: string
      description: The outcome of the liveness classification.
      enum:
      - uncertain
      - realface
      - spoofface
      x-ms-enum:
        name: LivenessDecision
        modelAsString: true
        values:
        - name: uncertain
          value: uncertain
          description: The algorithm could not classify the target face as either real or spoof.
        - name: realFace
          value: realface
          description: The algorithm has classified the target face as real.
        - name: spoofFace
          value: spoofface
          description: The algorithm has classified the target face as a spoof.
    LivenessWithVerifySessionResults:
      type: object
      description: The results of the liveness with verify session.
      properties:
        verifyReferences:
          type: array
          description: The references used for face verification.
          items:
            $ref: '#/components/schemas/LivenessWithVerifyReference'
        attempts:
          type: array
          description: The attempts data of underlying liveness with verify call with the session.
          items:
            $ref: '#/components/schemas/LivenessWithVerifySessionAttempt'
      required:
      - verifyReferences
      - attempts
    LivenessWithVerifySessionAttempt:
      type: object
      description: The liveness with verify session attempt.
      properties:
        attemptId:
          type: integer
          format: int32
          description: The attempt ID, start from 1.
        attemptStatus:
          $ref: '#/components/schemas/Azure.Core.Foundations.OperationState'
          description: The status of the attempt.
        result:
          $ref: '#/components/schemas/LivenessWithVerifyResult'
          description: The result of the liveness with verify call, will be null if there is error.
        error:
          $ref: '#/components/schemas/LivenessError'
          description: The error of the liveness with verify call, will be null if there is result.
      required:
      - attemptId
      - attemptStatus
    LivenessError:
      type: object
      description: The error of the liveness classification.
      properties:
        code:
          type: string
          description: The error code.
        message:
          type: string
          description: The error message.
        targets:
          $ref: '#/components/schemas/LivenessDecisionTargets'
          description: Targets used for liveness classification.
      required:
      - code
      - message
      - targets
    LivenessColorDecisionTarget:
      type: object
      description: The target from color image used for liveness classification.
      properties:
        faceRectangle:
          $ref: '#/components/schemas/FaceRectangle'
          description: The face region where the liveness classification was made on.
      required:
      - faceRectangle
    FaceErrorResponse:
      type: object
      description: A response containing error details.
      properties:
        error:
          $ref: '#/components/schemas/FaceError'
          description: The error object.
      required:
      - error
    LivenessWithVerifyOutputs:
      type: object
      description: The face verification output.
      properties:
        matchConfidence:
          type: number
          format: float
          description: The target face liveness face and comparison image face verification confidence.
          minimum: 0
          maximum: 1
        isIdentical:
          type: boolean
          description: Whether the target liveness face and comparison image face match.
      required:
      - matchConfidence
      - isIdentical
    ImageType:
      type: string
      description: The type of image.
      enum:
      - Color
      - Infrared
      - Depth
      x-ms-enum:
        name: ImageType
        modelAsString: true
        values:
        - name: Color
          value: Color
          description: Color image.
        - name: Infrared
          value: Infrared
          description: Infrared image.
        - name: Depth
          value: Depth
          description: Depth image.
    Azure.Core.Foundations.OperationState:
      type: string
      description: Enum describing allowed operation states.
      enum:
      - NotStarted
      - Running
      - Succeeded
      - Failed
      - Canceled
      x-ms-enum:
        name: OperationState
        modelAsString: true
        values:
        - name: NotStarted
          value: NotStarted
          description: The operation has not started.
        - name: Running
          value: Running
          description: The operation is in progress.
        - name: Succeeded
          value: Succeeded
          description: The operation has completed successfully.
        - name: Failed
          value: Failed
          description: The operation has failed.
        - name: Canceled
          value: Canceled
          description: The operation has been canceled by the user.
    LivenessDecisionTargets:
      type: object
      description: The targets used for liveness classification.
      properties:
        color:
          $ref: '#/components/schemas/LivenessColorDecisionTarget'
          description: The target from color image used for liveness classification.
      required:
      - color
    FaceRectangle:
      type: object
      description: A rectangle within which a face can be found.
      properties:
        top:
          type: integer
          format: int32
          description: The distance from the top edge if the image to the top edge of the rectangle, in pixels.
        left:
          type: integer
          format: int32
          description: The distance from the left edge if the image to the left edge of the rectangle, in pixels.
        width:
          type: integer
          format: int32
          description: The width of the rectangle, in pixels.
        height:
          type: integer
          format: int32
          description: The height of the rectangle, in pixels.
      required:
      - top
      - left
      - width
      - height
    LivenessModel:
      type: string
      description: The model version used for liveness classification.
      enum:
      - '2024-11-15'
      x-ms-enum:
        name: LivenessModel
        modelAsString: true
        values:
        - name: v2024_11_15
          value: '2024-11-15'
    LivenessWithVerifyResult:
      type: object
      description: The results of the liveness with verify call.
      properties:
        livenessDecision:
          $ref: '#/components/schemas/LivenessDecision'
          description: The liveness classification for the target face.
        targets:
          $ref: '#/components/schemas/LivenessDecisionTargets'
          description: Targets used for liveness classification.
        digest:
          type: string
          description: 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:
          type: string
          description: The image ID of the session request.
        verifyResult:
          $ref: '#/components/schemas/LivenessWithVerifyOutputs'
          description: The face verification output. Only available when the request is liveness with verify.
        verifyImageHash:
          type: string
          description: The sha256 hash of the verify-image in the request.
      required:
      - targets
      - digest
  securitySchemes:
    AADToken:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            https://cognitiveservices.azure.com/.default: ''
          authorizationUrl: https://api.example.com/oauth2/authorize
          tokenUrl: https://api.example.com/oauth2/token
      description: The Azure Active Directory OAuth2 Flow
    KeyAuth:
      type: apiKey
      description: The secret key for your Azure AI Face subscription.
      name: Ocp-Apim-Subscription-Key
      in: header
x-ms-parameterized-host:
  hostTemplate: '{endpoint}/face/{apiVersion}'
  useSchemePrefix: false
  parameters:
  - name: endpoint
    in: path
    description: 'Supported Cognitive Services endpoints (protocol and hostname, for example:

      https://{resource-name}.cognitiveservices.azure.com).'
    required: true
    type: string
    format: uri
    x-ms-skip-url-encoding: true


# --- truncated at 32 KB (75 KB total) ---
# Full source: https://artifacts.apis.io/azure-ai-foundry/openapi/azure-ai-foundry-detectlivenesswithverify-sessions-api-openapi.yml