> ## Documentation Index
> Fetch the complete documentation index at: https://developers.argosidentity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Face Liveness API

> Detect liveness in facial images to prevent spoofing attacks

<ParamField body="faceImage" type="string" required>
  Face image in base64 format. Base64 encoded characters in the payload must not include the MIME type. For example, if the encoded base64 characters are "image/png;base64,/9j/2wBDABQODxIP...", then remove "image/png;base64," and send only the encoded data "/9j/2wBDABQODxIP...".
</ParamField>

<ResponseField name="apiType" type="string">
  API type identifier for the liveness detection service.
</ResponseField>

<ResponseField name="result.liveness_score" type="number">
  Liveness score indicating the probability of a live person (0-100). Higher scores indicate higher confidence that the image is from a live person.
</ResponseField>

<ResponseField name="transactionId" type="string">
  Unique identifier for each request, useful for tracking and debugging purposes.
</ResponseField>

<ResponseField name="message" type="string">
  Information message returned as part of the recognition response, providing additional context about the result.
</ResponseField>

<ResponseField name="errorCode" type="number">
  Identifies the specific error for troubleshooting. Common error codes include:

  * 1016: faceImage is required
  * 1017: Fail to analyze face
</ResponseField>


## OpenAPI

````yaml POST /liveness
openapi: 3.1.0
info:
  title: Face Liveness API
  description: API for detecting live person verification and preventing spoofing attacks
  version: 1.0.0
servers:
  - url: https://idverify-api.argosidentity.com/modules
    description: Production server
security: []
paths:
  /liveness:
    post:
      summary: Detect liveness in facial image
      description: >-
        Analyze a facial image to determine if it was captured from a live
        person, preventing fraud attempts using fake photos, videos, or other
        spoofing techniques.
      operationId: detectLiveness
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - faceImage
              properties:
                faceImage:
                  type: string
                  description: >-
                    Face image in base64 format. Base64 encoded characters in
                    the payload must not include the MIME type. For example, if
                    the encoded base64 characters are
                    "image/png;base64,/9j/2wBDABQODxIP...", then remove
                    "image/png;base64," and send only the encoded data
                    "/9j/2wBDABQODxIP...".
                  example: '{{faceImage_base64}}'
      responses:
        '200':
          description: Everything worked as expected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  apiType:
                    type: string
                    description: API type
                    example: id_live_face
                  result:
                    type: object
                    properties:
                      liveness_score:
                        type: number
                        description: >-
                          Liveness score indicating the probability of a live
                          person (0-100)
                        example: 95
                  transactionId:
                    type: string
                    description: Unique identifier for each request
                    example: e0nvom3caiis7
        '400':
          description: >-
            The request was unacceptable, often due to missing a required
            parameter.
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionId:
                    type: string
                    description: >-
                      Unique identifier for the transaction associated with the
                      recognition request.
                  message:
                    type: string
                    description: >-
                      Information message returned as part of the recognition
                      response.
                  errorCode:
                    type: number
                    description: Identifies the specific error for troubleshooting.
                    enum:
                      - 1016
                      - 1017
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key essential for authentication and access control purposes,
        required for authorization.

````