> ## 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.

# ID Liveness API

> ID 문서의 진위 여부를 확인하기 위해 이미지를 분석하여 변조나 위조 여부를 검증합니다

ID Liveness API 섹션을 통해 사용자는 제공된 이미지를 분석하여 변조나 위조의 흔적을 찾아 ID 문서의 진위 여부를 확인할 수 있습니다. 사용자는 다양한 파이프라인을 활용하여 화면 캡처, 인쇄된 복사본, 초상화 교체를 감지하여 ID 문서의 무결성을 보장할 수 있습니다. 완료 시 사용자는 인식 결과와 거래 정보를 받게 되어 안전한 신원 확인 프로세스를 원활하게 진행할 수 있습니다.

<Warning>
  **Notes**<br />
  이미지를 정상적으로 진위 여부를 확인하기 위해서는, 반드시 이미지에 공백이 필요합니다.<br />
  신분증이 이미지에서 일정부분 공백없이 가득 찬 상태에서는 정상 값이 도출되지 않을 수 있습니다.<br />
  예시 이미지:

  <Frame>
    <img src="https://mintcdn.com/argosidentity/5SYhN-ygFsvuliHf/images/verify/id_livness_guidline.png?fit=max&auto=format&n=5SYhN-ygFsvuliHf&q=85&s=5210079f5e4b1562108a4a8b202fc0be" style={{ borderRadius: '0.5rem' }} width="2592" height="1469" data-path="images/verify/id_livness_guidline.png" />
  </Frame>
</Warning>

## 응답 속성

<ResponseField name="transactionId" type="string">
  인식 요청과 관련된 거래의 고유 식별자입니다.
</ResponseField>

<ResponseField name="result" type="string">
  각 파이프라인에 대한 감지 점수를 반환합니다.

  **파이프라인 값:**

  * `screenReplay` - liveness\_score
  * `paperPrinted` - liveness\_score
  * `replacePortraits` - liveness\_score
</ResponseField>

<ResponseField name="errorCode" type="string">
  문제 해결을 위한 특정 오류를 식별합니다.

  **오류 코드 값:**

  * `1001` - Workspace is unavailable | 워크스페이스를 사용할 수 없습니다
  * `1003` - Fail to process data | 데이터 처리에 실패했습니다
  * `1005` - idImage is required | idImage가 필요합니다
  * `1007` - pipelines is required | pipelines가 필요합니다
  * `1008` - invalid pipelines format | 잘못된 pipelines 형식입니다
  * `1009` - Fail to analyze document | 문서 분석에 실패했습니다
  * `1010` - callbackUrl is required | callbackUrl이 필요합니다
</ResponseField>

<ResponseField name="message" type="string">
  오류에 대한 간단한 설명입니다. 자세한 내용은 오류 코드를 참조하세요.
</ResponseField>


## OpenAPI

````yaml POST /document
openapi: 3.1.0
info:
  title: ID Liveness API
  description: >-
    Verify the liveness of ID documents by detecting whether the provided
    document is a live capture or a static image/photo of a document
  version: 1.0.0
servers:
  - url: https://idverify-api.argosidentity.com/modules
    description: Production server
security: []
paths:
  /document:
    post:
      tags:
        - ID Liveness
      summary: ID Liveness Detection
      description: >-
        Analyze an ID document image to determine if it's a live capture or a
        static photo, helping prevent spoofing attacks with printed or digital
        copies of documents.
      operationId: idLivenessDetection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - idImage
                - pipelines
              properties:
                idImage:
                  type: string
                  description: >-
                    Base64 encoded ID document image to analyze for liveness
                    detection. The image should contain a clear view of the ID
                    document.
                  format: base64
                pipelines:
                  type: object
                  required:
                    - sr
                    - pc
                    - ps
                  description: Forgery detection options object
                  properties:
                    sr:
                      type: boolean
                      description: >-
                        Pipeline - Screen Replay: Verify if the image is a
                        screen capture
                    pc:
                      type: boolean
                      description: >-
                        Pipeline - Paper Printed: Verify if the ID is a printed
                        or photocopied copy
                    ps:
                      type: boolean
                      description: >-
                        Pipeline - Replace Portraits: Verify if the face image
                        has been tampered with
                useUpcomingVersion:
                  type: boolean
                  description: Use the upcoming version of the liveness engine
                  default: 'False'
                callbackUrl:
                  type: string
                  description: >-
                    Optional callback URL where the liveness detection results
                    will be sent upon completion. If provided, the process works
                    asynchronously.
                  format: uri
                  example: https://your-domain.com/callback
            examples:
              synchronous:
                summary: Synchronous request
                value:
                  idImage: base64_encoded_id_document_image
                  pipelines:
                    sr: true
                    pc: true
                    ps: true
                  useUpcomingVersion: true
                  callbackUrl: https://your-domain.com/callback
      responses:
        '200':
          description: Successful liveness detection analysis
          content:
            application/json:
              schema:
                type: object
                properties:
                  apiType:
                    type: string
                    example: id_live_doc
                  transactionId:
                    type: string
                    description: Unique transaction identifier
                    example: txn_123456789
                  engineVersion:
                    type: string
                    description: Liveness Engine's version for each request
                    example: id_liveness@3.4.2
                  result:
                    type: object
                    properties:
                      screenReplay:
                        type: object
                        properties:
                          liveness_score:
                            type: number
                            description: Screen replay detection score
                            example: 99
                      paperPrinted:
                        type: object
                        properties:
                          liveness_score:
                            type: number
                            description: Paper printed detection score
                            example: 82
                      replacePortraits:
                        type: object
                        properties:
                          liveness_score:
                            type: number
                            description: Portrait replacement detection score
                            example: 100
        '201':
          description: Asynchronous request accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionId:
                    type: string
                    description: Unique transaction identifier
                    example: txn_123456789
                  engineVersion:
                    type: string
                    description: Liveness Engine's version for each request
                    example: id_liveness@3.4.2
                  message:
                    type: string
                    description: Confirmation message for asynchronous processing
                    example: >-
                      request has been successfully received. The response will
                      be sent to your callback URL
        '400':
          description: Bad request - Invalid image data or missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      statusCode:
                        type: number
                        example: 400
                      apiType:
                        type: string
                        example: id_live_doc
                      transactionId:
                        type: string
                        description: Unique transaction identifier
                        example: txn_123456789
                      engineVersion:
                        type: string
                        description: Liveness Engine's version for each request
                        example: id_liveness@3.4.2
                      errorCode:
                        type: string
                        example: '1003'
                      message:
                        type: string
                        example: Fail to process data
        '401':
          description: Workspace is unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      transactionId:
                        type: string
                        description: Unique transaction identifier
                        example: txn_123456789
                      errorCode:
                        type: string
                        example: '1001'
                      message:
                        type: string
                        example: Workspace is unavailable
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````