Amazon Rekognition Face Liveness API

Verify that a user is physically present during identity verification.

GitHub OpenAPI

Operations 2

POST /#CreateFaceLivenessSession Create Face Liveness Session #
POST /#GetFaceLivenessSessionResults Get Face Liveness Session Results #

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/amazon-rekognition:amazon-rekognition-face-liveness-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

amazon-rekognition-face-liveness-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Rekognition Face Liveness API
  version: '2016-06-27'
  description: Generated from AWS's published Smithy model for Amazon Rekognition. 2 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://rekognition.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#CreateFaceLivenessSession:
    post:
      operationId: CreateFaceLivenessSession
      summary: Create Face Liveness Session
      description: This API operation initiates a Face Liveness session. It returns a SessionId, which you can use to start
        streaming Face Liveness video and get the results for a Face Liveness session. You can use the OutputConfig option
        in the Settings parameter to provide an Amazon S3 bucket location. The Amazon S3 bucket stores reference images and
        audit images. If no Amazon S3 bucket is defined, raw bytes are sent instead. You can use AuditImagesLimit to limit
        the number of audit images returned when GetFaceLivenessSessionResults is called. This number is between 0 and 4.
        By default, it is set to 0. The limit is best effort and based on the duration of the selfie-video. You can use the
        ChallengePreferences option in the Settings parameter to choose between the 'FaceMovementAndLightChallenge' or FaceMovementChallenge'
        settings. See the Shared Responsibility page for details on guidance for which setting to choose between these two
        settings depending on your use case and preferences. This parameter is optional and if no parameter is provided, then
        the 'FaceMovementAndLightChallenge' settings is applied by default.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateFaceLivenessSessionResponse'
        '400':
          description: AccessDeniedException; InvalidParameterException; ProvisionedThroughputExceededException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerError; ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RekognitionService.CreateFaceLivenessSession
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateFaceLivenessSessionRequest'
      tags:
      - Face Liveness
  /#GetFaceLivenessSessionResults:
    post:
      operationId: GetFaceLivenessSessionResults
      summary: Get Face Liveness Session Results
      description: Retrieves the results of a specific Face Liveness session. It requires the sessionId as input, which was
        created using CreateFaceLivenessSession. Returns the corresponding Face Liveness confidence score, a reference image
        that includes a face bounding box, and audit images that also contain face bounding boxes. The Face Liveness confidence
        score ranges from 0 to 100. The number of audit images returned by GetFaceLivenessSessionResults is defined by the
        AuditImagesLimit paramater when calling CreateFaceLivenessSession. Reference images are always returned when possible.
        For a session that has completed, the response can also include a Feedback list describing conditions that were detected
        in the selfie-video, such as low lighting or an obstructed face, and Metadata about the client that streamed the session.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetFaceLivenessSessionResultsResponse'
        '400':
          description: AccessDeniedException; InvalidParameterException; ProvisionedThroughputExceededException; SessionNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerError; ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RekognitionService.GetFaceLivenessSessionResults
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetFaceLivenessSessionResultsRequest'
      tags:
      - Face Liveness
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: rekognition
  schemas:
    AccessDeniedException:
      type: object
      properties:
        Message:
          type: string
        Code:
          type: string
        Logref:
          type: string
          description: A universally unique identifier (UUID) for the request.
    AuditImage:
      type: object
      properties:
        Bytes:
          type: string
          format: byte
          description: The Base64-encoded bytes representing an image selected from the Face Liveness video and returned for
            audit purposes.
        S3Object:
          $ref: '#/components/schemas/S3Object'
        BoundingBox:
          $ref: '#/components/schemas/BoundingBox'
    BoundingBox:
      type: object
      properties:
        Width:
          type: number
          description: Width of the bounding box as a ratio of the overall image width.
        Height:
          type: number
          description: Height of the bounding box as a ratio of the overall image height.
        Left:
          type: number
          description: Left coordinate of the bounding box as a ratio of overall image width.
        Top:
          type: number
          description: Top coordinate of the bounding box as a ratio of overall image height.
    Challenge:
      type: object
      properties:
        Type:
          type: string
          enum:
          - FaceMovementAndLightChallenge
          - FaceMovementChallenge
          description: The type of the challenge being used for the Face Liveness session.
        Version:
          type: string
          description: The version of the challenge being used for the Face Liveness session.
      required:
      - Type
      - Version
    ChallengePreference:
      type: object
      properties:
        Type:
          type: string
          enum:
          - FaceMovementAndLightChallenge
          - FaceMovementChallenge
          description: The types of challenges that have been selected for the Face Liveness session.
        Versions:
          $ref: '#/components/schemas/Versions'
      required:
      - Type
    CreateFaceLivenessSessionRequest:
      type: object
      properties:
        KmsKeyId:
          type: string
          description: The identifier for your AWS Key Management Service key (AWS KMS key). Used to encrypt audit images
            and reference images.
        Settings:
          $ref: '#/components/schemas/CreateFaceLivenessSessionRequestSettings'
        ClientRequestToken:
          type: string
          description: Idempotent token is used to recognize the Face Liveness request. If the same token is used with multiple
            CreateFaceLivenessSession requests, the same session is returned. This token is employed to avoid unintentionally
            creating the same session multiple times.
    CreateFaceLivenessSessionRequestSettings:
      type: object
      properties:
        OutputConfig:
          $ref: '#/components/schemas/LivenessOutputConfig'
        AuditImagesLimit:
          type: integer
          description: Number of audit images to be returned back. Takes an integer between 0-4. Any integer less than 0 will
            return 0, any integer above 4 will return 4 images in the response. By default, it is set to 0. The limit is best
            effort and is based on the actual duration of the selfie-video.
        ChallengePreferences:
          type: array
          items:
            $ref: '#/components/schemas/ChallengePreference'
          description: Indicates preferred challenge types and versions for the Face Liveness session to be created.
    CreateFaceLivenessSessionResponse:
      type: object
      properties:
        SessionId:
          type: string
          description: A unique 128-bit UUID identifying a Face Liveness session. A new sessionID must be used for every Face
            Liveness check. If a given sessionID is used for subsequent Face Liveness checks, the checks will fail. Additionally,
            a SessionId expires 3 minutes after it's sent, making all Liveness data associated with the session (e.g., sessionID,
            reference image, audit images, etc.) unavailable.
      required:
      - SessionId
    FeedbackItem:
      type: object
      properties:
        Code:
          type: string
          enum:
          - FACE_NOT_VISIBLE
          - FACE_OBSTRUCTION_DETECTED
          - LOW_VIDEO_QUALITY_DETECTED
          - FACE_NOT_ALIGNED
          - EYES_CLOSED_DETECTED
          - LOW_LIGHTING_DETECTED
          - HIGH_LIGHTING_DETECTED
          description: A code identifying the condition that was detected during the Face Liveness session.
        Message:
          type: string
          description: A human-readable description of the detected condition, suitable for displaying to an end user before
            they retry a Face Liveness check. Use Code rather than this message for programmatic decisions, because the message
            text can change.
      required:
      - Code
      - Message
    GetFaceLivenessSessionResultsRequest:
      type: object
      properties:
        SessionId:
          type: string
          description: A unique 128-bit UUID. This is used to uniquely identify the session and also acts as an idempotency
            token for all operations associated with the session.
      required:
      - SessionId
    GetFaceLivenessSessionResultsResponse:
      type: object
      properties:
        SessionId:
          type: string
          description: The sessionId for which this request was called.
        Status:
          type: string
          enum:
          - CREATED
          - IN_PROGRESS
          - SUCCEEDED
          - FAILED
          - EXPIRED
          description: 'Represents a status corresponding to the state of the session. Possible statuses are: CREATED, IN_PROGRESS,
            SUCCEEDED, FAILED, EXPIRED.'
        Confidence:
          type: number
          description: Probabalistic confidence score for if the person in the given video was live, represented as a float
            value between 0 to 100.
        ReferenceImage:
          $ref: '#/components/schemas/AuditImage'
        AuditImages:
          type: array
          items:
            $ref: '#/components/schemas/AuditImage'
          description: A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding
            box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession request included
            an OutputConfig argument, the image will be uploaded to an S3Object specified in the output configuration. If
            no Amazon S3 bucket is defined, raw bytes are sent instead.
        Challenge:
          $ref: '#/components/schemas/Challenge'
        Feedback:
          type: array
          items:
            $ref: '#/components/schemas/FeedbackItem'
          description: A list of conditions that were detected in the Face Liveness video and that contributed to the returned
            Confidence score. Each item contains a code and a human-readable message. Feedback is returned only for sessions
            with a Status of SUCCEEDED, and the list is empty when no such conditions were detected.
        Metadata:
          $ref: '#/components/schemas/SessionMetadata'
      required:
      - SessionId
      - Status
    InternalServerError:
      type: object
      properties:
        Message:
          type: string
        Code:
          type: string
        Logref:
          type: string
          description: A universally unique identifier (UUID) for the request.
    LivenessOutputConfig:
      type: object
      properties:
        S3Bucket:
          type: string
          description: The path to an AWS Amazon S3 bucket used to store Face Liveness session results.
        S3KeyPrefix:
          type: string
          description: The prefix prepended to the output files for the Face Liveness session results.
      required:
      - S3Bucket
    S3Object:
      type: object
      properties:
        Bucket:
          type: string
          description: Name of the S3 bucket.
        Name:
          type: string
          description: S3 object key name.
        Version:
          type: string
          description: If the bucket is versioning enabled, you can specify the object version.
    SessionMetadata:
      type: object
      properties:
        SDKType:
          type: string
          description: The type of SDK that was used to stream the video for the Face Liveness session. This value is self-reported
            by the client that streamed the session, and Amazon Rekognition doesn't verify it. Don't rely on it for authentication,
            authorization, or any other security decision.
      required:
      - SDKType
    Versions:
      type: object
      properties:
        Minimum:
          type: string
          description: The desired minimum version for the challenge.
        Maximum:
          type: string
          description: The desired maximum version for the challenge.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/rekognition/service/2016-06-27/rekognition-2016-06-27.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)