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

# 얼굴 검색 API: 1:N 얼굴 중복 제거 및 사기 조직 탐지

> Didit의 POST /v3/face-search/ API로 인증된 사용자 간 1:N 얼굴 검색을 수행하세요. 중복 계정, 사기 조직, 재인증을 탐지합니다. 추론 2s 미만, 호출당 과금, 계약 불필요.



## OpenAPI

````yaml ko/openapi-25.json POST /v3/face-search/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 신분증 인증 API입니다. x-api-key 헤더로 인증합니다.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/face-search/:
    post:
      tags:
        - Standalone APIs
      summary: 얼굴 검색
      description: >-
        얼굴 이미지를 애플리케이션의 얼굴 검색 색인(인증 세션에서 등록된 얼굴, 저장된 독립 실행형 API 호출, 직접 업로드한 사용자
        프로필 얼굴, 차단/허용 목록)과 1:N으로 검색하여 유사도 순으로 정렬된 일치 항목과 차단 목록 및 중복 경고를 반환받습니다.


        **작동 방식.** `user_image`에서 감지된 가장 큰 얼굴이 임베딩되어 애플리케이션 범위 내의 색인과 대조 검색됩니다.
        유사도 하한선 이상의 **일치 항목이 최대 5개**까지 `matches`로 반환되며, 각 항목에는
        `similarity_percentage`, 원래 세션(`session_id`, `session_number`, `status`,
        `vendor_data`), 해당 세션의 문서 인증 중 추출된 `user_details`, `is_blocklisted` /
        `is_allowlisted` 플래그, `source` 구분값(`session`, `imported` 또는
        `list_entry`)이 포함됩니다.


        - `search_type=most_similar`(기본값)는 등록된 모든 얼굴을 유사도 순으로 정렬합니다. 중복 제거 및 사기
        조직 조사에 사용하세요.

        - `search_type=blocklisted_or_approved`는 후보를 차단 목록에 등록된 얼굴, 허용 목록에 등록된
        얼굴, 승인된 세션의 얼굴, 가져온 사용자 프로필 얼굴로 제한하고 차단 목록 항목을 먼저 정렬합니다. 주요 목적이 차단 목록
        스크리닝일 때 사용하세요.


        `status`는 `FACE_IN_BLOCKLIST` 또는 `POSSIBLE_FACE_IN_BLOCKLIST` 경고가 발생할 때만
        `Declined`가 됩니다. `DUPLICATED_FACE` /
        `POSSIBLE_DUPLICATED_FACE`(`information`) 및
        `MULTIPLE_FACES_DETECTED`(`warning`)는 절대 거부되지 않습니다. 수동 라이브니스와 달리 이
        endpoint는 동일한 `vendor_data`를 가진 이전 세션을 일치 항목에서 제외하지 **않습니다**. 수동 라이브니스
        분석도 내부적으로 실행되어 영구 저장된 세션과 함께 저장되지만, 해당 결과는 이 응답에 포함되지 않습니다.


        **결제.** 각 `200` 응답은 얼굴 검색 API 크레딧 1개를 소모합니다(요금제 크레딧 또는 충전 잔액에서 차감). 잔액이
        부족하면 이미지 처리가 시작되기 전에 `403`을 반환합니다.


        **세션 영구 저장 및 얼굴 등록(`save_api_request`, 기본값 `true`).** `true`인 경우 호출은 API
        유형 세션(Business Console, 반환된 `request_id`를 통한 `GET
        /v3/session/{sessionId}/decision/`, `status.updated` webhook)으로 영구 저장되며
        검색된 얼굴은 얼굴 검색 색인에 등록됩니다. 얼굴 검색 호출로 등록된 얼굴은 향후 얼굴 검색 결과에서 제외되므로 반복된 검색이
        서로 일치하지 않습니다. `false`인 경우 호출은 1회성입니다. 아무것도 저장되지 않고, 얼굴이 등록되지 않으며,
        `match_image_url` 값은 다운로드 가능한 URL이 아닌 내부 저장소 경로가 됩니다.


        **샌드박스.** 샌드박스 API 키는 모든 처리 및 결제를 건너뜁니다. 요청 검증 후(형식이 잘못된 입력은 여전히 `400`
        반환) endpoint는 정적 `Approved` 모의 payload를 반환하며, 세션이 영구 저장되지 않고 크레딧도 소모되지
        않습니다.


        **인증.** 애플리케이션의 API 키를 `x-api-key` 헤더에 담아 전송하세요. 자격 증명이 없거나 유효하지 않으면
        `403`(`{"detail": "You do not have permission to perform this
        action."}`)을 반환합니다. 이 API는 `401`을 절대 반환하지 않습니다.


        **속도 제한.** 모든 POST/PATCH/DELETE endpoint에서 API 키당 분당 300회의 쓰기 요청 한도를
        공유합니다. 이를 초과하면 `429`를 반환합니다.
      operationId: post_v3face-search
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - user_image
              properties:
                user_image:
                  type: string
                  format: binary
                  description: >-
                    검색할 정면 얼굴 이미지입니다. 허용되는 확장자: `tiff`, `jpg`, `jpeg`, `png`,
                    `webp`. 최대 업로드 크기: **5 MB**(더 큰 파일은 `400` 오류로 거부됨). 이미지는 처리
                    전에 자동으로 ~0.5 MB로 압축되므로 매우 높은 해상도라고 해서 정확도가 향상되지는 않습니다. 이미지에는
                    감지 가능한 얼굴이 하나 이상 포함되어야 하며, 그렇지 않으면 endpoint에서 `400`을 반환합니다.
                    여러 얼굴이 있는 경우 가장 큰 얼굴이 검색되며 `MULTIPLE_FACES_DETECTED` 경고가
                    추가됩니다.
                search_type:
                  type: string
                  default: most_similar
                  enum:
                    - most_similar
                    - blocklisted_or_approved
                  description: >-
                    검색 정책. `most_similar`(기본값)는 애플리케이션에 등록된 모든 얼굴의 유사도 순위를 매깁니다.
                    `blocklisted_or_approved`는 차단 목록에 등록된 얼굴, 허용 목록에 등록된 얼굴, 승인된
                    세션의 얼굴, 가져온 사용자 프로필 얼굴로 후보를 제한하며, 차단 목록 항목이 먼저 정렬됩니다.
                  example: most_similar
                rotate_image:
                  type: boolean
                  default: false
                  description: >-
                    `true`인 경우 서비스가 입력을 90도씩 회전해 보고 최적의 얼굴 감지 결과를 제공하는 방향을
                    사용합니다. EXIF 방향 정보가 누락되었을 때 유용합니다. 지연 시간이 증가합니다.
                  example: false
                save_api_request:
                  type: boolean
                  default: true
                  description: >-
                    `true`(기본값)인 경우 호출을 API 유형의 세션으로 저장하고, `status.updated`
                    webhook을 발행하며, `match_image_url` 값을 사전 서명하고, 검색된 얼굴을 얼굴 검색
                    인덱스에 등록합니다(얼굴 검색 등록 건은 향후 검색 대상에서 제외됨). `false`인 경우 검색은
                    단발성으로 처리되어 세션이 저장되지 않고 얼굴도 등록되지 않습니다.
                  example: true
                vendor_data:
                  type: string
                  description: >-
                    저장된 세션에 저장되고 다시 반환되는 선택적 불투명 식별자(사용자 ID, 이메일, UUID 등)입니다. 검색
                    결과에서 동일 사용자의 얼굴을 제외하지는 않습니다.
                  example: user-123
                metadata:
                  type: object
                  additionalProperties: true
                  description: >-
                    세션과 함께 저장되고(`save_api_request=true`인 경우) 그대로 반환되는 선택적 JSON
                    객체입니다. multipart 요청에서는 JSON 인코딩된 문자열 필드로 전송하십시오. 객체로 파싱됩니다.
                  example:
                    flow: dedup_check
            example:
              user_image: (binary JPEG/PNG selfie)
              search_type: most_similar
              rotate_image: false
              save_api_request: true
              vendor_data: user-123
              metadata:
                flow: dedup_check
      responses:
        '200':
          description: >-
            얼굴 검색이 완료되었습니다. `face_search.matches`는 유사도 순으로 정렬된 유사한 얼굴을 최대 5개까지
            포함합니다. 빈 배열은 등록된 얼굴 중 유사도 하한을 초과한 얼굴이 없음을 의미합니다. `status`는 차단 목록에
            일치하는 경우에만 `Declined`입니다. 중복 일치만으로는 `Approved`를 반환하므로 `status`뿐만 아니라
            `matches` 및 `warnings`를 확인하십시오. `save_api_request=true`인 경우,
            `request_id`는 저장된 세션 ID입니다. 각 일치 항목에는 `source`(`session`,
            `imported`, `list_entry` 또는 `retained_template`), `vendor_user_id`,
            `biometric_template_id`가 포함됩니다. `retained_template` 일치는 소스 세션이 삭제된 후
            보관된 이미지가 없는 생체 인식 템플릿에서 비롯되며, 이 일치 항목의 세션 필드, `match_image_url`,
            `user_details`는 `null`입니다.
          content:
            application/json:
              examples:
                Blocklist hit (Declined):
                  summary: 얼굴이 차단 목록에 등록된 얼굴과 일치합니다
                  value:
                    request_id: a1b2c3d4-e5f6-7890-1234-567890abcdef
                    face_search:
                      status: Declined
                      total_matches: 1
                      matches:
                        - session_id: 882c42d5-8a4d-4d20-8080-a22f57822c86
                          session_number: 323442
                          similarity_percentage: 99.99
                          source: session
                          vendor_data: user-1
                          verification_date: '2025-01-01T00:00:00Z'
                          user_details:
                            full_name: Jane Marie Doe
                            document_type: ID
                            document_number: X1234567
                          match_image_url: https://<media-host>/face/3f6a1c2e/reference.jpg
                          status: Approved
                          is_blocklisted: true
                          is_allowlisted: false
                          api_service: null
                          vendor_user_id: 2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f
                          biometric_template_id: null
                      user_image:
                        entities:
                          - bbox:
                              - 40
                              - 40
                              - 120
                              - 120
                            confidence: 0.732973
                        best_angle: 0
                      warnings:
                        - risk: FACE_IN_BLOCKLIST
                          feature: LIVENESS
                          additional_data:
                            blocklisted_session_id: 882c42d5-8a4d-4d20-8080-a22f57822c86
                            blocklisted_session_number: 323442
                            api_service: null
                          log_type: error
                          short_description: Face in blocklist
                          long_description: >-
                            The system identified a face in the blocklist, which
                            means the face is not allowed to be verified.
                    vendor_data: user-123
                    metadata: null
                    created_at: '2026-06-12T01:04:42.763237+00:00'
                Duplicate found (Approved):
                  summary: 얼굴이 이미 다른 승인된 세션에 나타났습니다 — 정보 제공용이며, 거부되지 않습니다
                  value:
                    request_id: 5e0c3a1f-7b2d-4c8e-9f10-2a3b4c5d6e7f
                    face_search:
                      status: Approved
                      total_matches: 1
                      matches:
                        - session_id: 1f2e3d4c-5b6a-7980-1122-334455667788
                          session_number: 1024
                          similarity_percentage: 87.42
                          source: session
                          vendor_data: user-9
                          verification_date: '2025-11-20T09:15:00Z'
                          user_details: null
                          match_image_url: https://<media-host>/face/9c8b7a6d/reference.jpg
                          status: Approved
                          is_blocklisted: false
                          is_allowlisted: false
                          api_service: PASSIVE_LIVENESS
                          vendor_user_id: 2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f
                          biometric_template_id: null
                      user_image:
                        entities:
                          - bbox:
                              - 40
                              - 40
                              - 120
                              - 120
                            confidence: 0.732973
                        best_angle: 0
                      warnings:
                        - risk: DUPLICATED_FACE
                          feature: LIVENESS
                          additional_data:
                            duplicated_session_id: 1f2e3d4c-5b6a-7980-1122-334455667788
                            duplicated_session_number: 1024
                            api_service: PASSIVE_LIVENESS
                          log_type: information
                          short_description: Duplicated face from other approved session
                          long_description: >-
                            The system identified a duplicated face from another
                            approved session, requiring further investigation.
                    vendor_data: user-123
                    metadata: null
                    created_at: '2026-06-12T01:04:42.763237+00:00'
                No matches (Approved):
                  summary: 등록된 얼굴 중 유사도 하한을 초과한 얼굴이 없습니다
                  value:
                    request_id: 9d8c7b6a-5f4e-3d2c-1b0a-998877665544
                    face_search:
                      status: Approved
                      total_matches: 0
                      matches: []
                      user_image:
                        entities:
                          - bbox:
                              - 40
                              - 40
                              - 120
                              - 120
                            confidence: 0.732973
                        best_angle: 0
                      warnings: []
                    vendor_data: user-123
                    metadata: null
                    created_at: '2026-06-12T01:04:42.763237+00:00'
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    format: uuid
                    description: >-
                      `save_api_request=true`일 때 유지된 세션 ID(`GET
                      /v3/session/{sessionId}/decision/`와 함께 사용 가능), 그렇지 않으면 임시
                      상관관계 UUID입니다.
                  face_search:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - Approved
                          - Declined
                        description: >-
                          `FACE_IN_BLOCKLIST` 또는 `POSSIBLE_FACE_IN_BLOCKLIST`
                          경고가 발생한 경우에만 `Declined`. 중복 일치 및 다중 얼굴 경고는 단독으로 거부되지
                          않습니다.
                      total_matches:
                        type: integer
                        description: '`matches`의 항목 수(0–5)입니다.'
                        example: 1
                      matches:
                        type: array
                        maxItems: 5
                        description: >-
                          얼굴 검색 인덱스에서 유사도 최저 기준을 초과한 얼굴 목록으로 최대 5개까지 유사도순으로
                          정렬됩니다(`search_type=blocklisted_or_approved`인 경우 차단 목록
                          항목이 우선 순위로 정렬됨). 등록된 얼굴 중 충분히 유사한 얼굴이 없는 경우 비어 있습니다.
                        items:
                          type: object
                          properties:
                            session_id:
                              type: string
                              format: uuid
                              nullable: true
                              description: >-
                                일치하는 얼굴이 속한 인증 세션의 ID입니다. `source`가 `imported`,
                                `list_entry` 또는 `retained_template`인 경우
                                `null`입니다.
                              example: 882c42d5-8a4d-4d20-8080-a22f57822c86
                            session_number:
                              type: integer
                              nullable: true
                              description: >-
                                Business Console에 표시되는 사람이 읽기 쉬운 세션 번호입니다. 비세션
                                일치 항목의 경우 `null`입니다.
                              example: 323442
                            similarity_percentage:
                              type: number
                              format: float
                              minimum: 0
                              maximum: 100
                              description: 제출된 얼굴과 일치한 얼굴 간의 유사도(0–100)입니다.
                              example: 99.99
                            source:
                              type: string
                              enum:
                                - session
                                - imported
                                - list_entry
                                - retained_template
                              description: >-
                                일치하는 얼굴이 등록된 위치: `session` — 인증 세션 또는 저장된 독립형
                                API 호출, `imported` — 사용자 프로필에 직접 업로드된 얼굴,
                                `list_entry` — 내 목록 중 하나에 첨부된 얼굴,
                                `retained_template` — `/v3/biometric-templates/`
                                아래에 나열된 사용자에게 저장된 이미지가 없는 생체 인식 템플릿.
                            vendor_data:
                              type: string
                              nullable: true
                              description: >-
                                가져온 얼굴 및 보존된 템플릿 얼굴의 경우 일치하는 세션 또는 연결된 사용자의
                                `vendor_data`입니다.
                              example: user-1
                            vendor_user_id:
                              type: string
                              format: uuid
                              nullable: true
                              description: >-
                                연결된 User id입니다. 목록 항목 및 사용자가 없는 세션 일치 항목의 경우
                                `null`입니다.
                              example: 2f7c1a9e-4b28-4a6d-97f1-83576f80e1b4
                            biometric_template_id:
                              type: string
                              format: uuid
                              nullable: true
                              description: >-
                                보존된 생체 인식 템플릿의 ID입니다. `source`가
                                `retained_template`일 때만 설정되며, 그 외의 경우 `null`입니다.
                              example: null
                            verification_date:
                              type: string
                              format: date-time
                              nullable: true
                              description: >-
                                일치한 얼굴이 원래 캡처된 시점 또는 보존된 템플릿이 생성된
                                시점(`YYYY-MM-DDThh:mm:ssZ`)입니다. `list_entry` 일치의
                                경우 `null`입니다.
                              example: '2025-01-01T00:00:00Z'
                            user_details:
                              type: object
                              nullable: true
                              description: >-
                                일치하는 세션의 문서 검증 중 추출된 신원 데이터입니다. 일치하는 세션에 문서 데이터가
                                없는 경우(예: 라이브니스 전용 세션) `null`이며,
                                `retained_template` 일치의 경우 항상 `null`입니다.
                                `source: imported` 일치의 경우 사용자 프로필에서
                                채워집니다(`full_name` 설정됨,
                                `document_type`/`document_number`는 null).
                              properties:
                                full_name:
                                  type: string
                                  nullable: true
                                  example: Jane Marie Doe
                                document_type:
                                  type: string
                                  nullable: true
                                  example: ID
                                document_number:
                                  type: string
                                  nullable: true
                                  example: X1234567
                            match_image_url:
                              type: string
                              nullable: true
                              description: >-
                                `save_api_request=true`일 때 일치하는 얼굴의 참조 이미지에 대한
                                시간 제한 URL(`https://<media-host>/...`)입니다.
                                `save_api_request=false`인 경우 직접 다운로드할 수 없는 내부
                                스토리지 경로입니다. 보존된 템플릿에는 이미지가 포함되어 있지 않으므로
                                `retained_template` 일치의 경우 항상 `null`입니다.
                              example: https://<media-host>/face/3f6a1c2e/reference.jpg
                            status:
                              type: string
                              nullable: true
                              description: >-
                                일치하는 세션의 상태(`Approved`, `Declined`, `In Review`
                                등)입니다. `imported`/`list_entry` 일치의 경우 `null`입니다.
                              example: Approved
                            is_blocklisted:
                              type: boolean
                              description: >-
                                일치하는 얼굴이 얼굴 차단 목록에 있을 때 `true`입니다. 충분히 유사한 차단 목록
                                일치 항목이 있으면 검색이 거절됩니다.
                            is_allowlisted:
                              type: boolean
                              description: >-
                                일치하는 얼굴이 허용 목록 중 하나에 있을 때 `true`입니다. 허용 목록에 등록된
                                일치 항목은 중복 경고를 억제합니다.
                            api_service:
                              type: string
                              nullable: true
                              description: >-
                                일치한 얼굴이 독립 실행형 API 호출(예: `PASSIVE_LIVENESS`)을 통해
                                등록된 경우 설정됩니다. 일반 인증 세션 및 가져온 얼굴의 경우 `null`입니다.
                              example: null
                      user_image:
                        type: object
                        description: >-
                          제출된 이미지에 대한 얼굴 감지 결과입니다. 여기의 항목에는 `bbox` 및
                          `confidence`만 포함됩니다.
                        properties:
                          entities:
                            type: array
                            description: 감지된 얼굴당 항목 1개입니다. 가장 큰 얼굴이 검색 대상이 됩니다.
                            items:
                              type: object
                              properties:
                                bbox:
                                  type: array
                                  items:
                                    type: integer
                                  minItems: 4
                                  maxItems: 4
                                  description: >-
                                    픽셀 단위의 경계 상자 `[x_min, y_min, x_max,
                                    y_max]`입니다.
                                  example:
                                    - 40
                                    - 40
                                    - 120
                                    - 120
                                confidence:
                                  type: number
                                  format: float
                                  minimum: 0
                                  maximum: 1
                                  description: 얼굴 감지 신뢰도(0–1).
                                  example: 0.732973
                          best_angle:
                            type: integer
                            description: >-
                              가장 우수한 얼굴 감지를 생성한 회전 각도(도). `rotate_image=true`로
                              방향을 수정한 경우에만 0이 아닙니다. 이 endpoint에서는 절대 null이
                              아닙니다(모델에서 생략된 경우 기본값은 0).
                            example: 0
                      warnings:
                        type: array
                        description: >-
                          위험 신호. `FACE_IN_BLOCKLIST` /
                          `POSSIBLE_FACE_IN_BLOCKLIST`(`error`)는 검색을 거부합니다.
                          `MULTIPLE_FACES_DETECTED`(`warning`) 및
                          `DUPLICATED_FACE` /
                          `POSSIBLE_DUPLICATED_FACE`(`information`)는 참고용입니다.
                        items:
                          type: object
                          properties:
                            risk:
                              type: string
                              enum:
                                - MULTIPLE_FACES_DETECTED
                                - FACE_IN_BLOCKLIST
                                - POSSIBLE_FACE_IN_BLOCKLIST
                                - DUPLICATED_FACE
                                - POSSIBLE_DUPLICATED_FACE
                              description: 기계 판독 가능한 위험 코드입니다.
                            feature:
                              type: string
                              enum:
                                - LIVENESS
                              description: 경고를 발생시킨 기능입니다. 이 endpoint에서는 항상 `LIVENESS`입니다.
                            additional_data:
                              type: object
                              nullable: true
                              additionalProperties: true
                              description: >-
                                `MULTIPLE_FACES_DETECTED`의 경우 `null`입니다. 차단 목록
                                일치 항목에는 `{blocklisted_session_id,
                                blocklisted_session_number, api_service}`가 포함되며,
                                중복 일치 항목에는 첫 번째 일치 세션을 가리키는
                                `{duplicated_session_id,
                                duplicated_session_number, api_service}`가 포함됩니다.
                            log_type:
                              type: string
                              enum:
                                - error
                                - warning
                                - information
                              description: >-
                                심각도입니다. `error` 경고는 `status`를 `Declined`로 변경합니다.
                                `warning` 및 `information` 항목은 참고용이며 단독으로 거부되지
                                않습니다.
                            short_description:
                              type: string
                              description: 사람이 읽을 수 있는 한 줄의 위험 요약입니다.
                            long_description:
                              type: string
                              description: 위험에 대한 사람이 읽기 쉬운 설명입니다.
                  vendor_data:
                    type: string
                    nullable: true
                    description: 전송한 `vendor_data`의 에코 값 또는 `null`입니다.
                  metadata:
                    type: object
                    nullable: true
                    additionalProperties: true
                    description: 전송한 `metadata` 객체의 에코 값 또는 `null`입니다.
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      응답이 생성된 시점의 ISO 8601 타임스탬프(UTC)(예:
                      `2026-06-12T01:04:42.763237+00:00`)입니다.
        '400':
          description: >-
            유효성 검사 오류입니다. `user_image`가 누락되었거나, 5 MB를 초과하거나, 지원되지 않는 확장자이거나, 제출된
            이미지에서 **얼굴이 감지되지 않은** 경우 반환됩니다. 필드 오류는 DRF의 `{field: [messages]}`
            봉투를 사용하며, 얼굴 감지 실패는 `{"error": ...}`를 사용합니다.
          content:
            application/json:
              examples:
                No face detected:
                  summary: 이미지는 정상적으로 디코딩되지만 감지 가능한 얼굴이 포함되어 있지 않습니다.
                  value:
                    error: No face detected in the image
                Missing image:
                  summary: 폼 데이터에 `user_image`가 포함되지 않음
                  value:
                    user_image:
                      - No file was submitted.
                Unsupported file extension:
                  summary: tiff/jpg/jpeg/png/webp 이외의 파일 확장자
                  value:
                    user_image:
                      - >-
                        File extension “txt” is not allowed. Allowed extensions
                        are: tiff, jpg, jpeg, png, webp.
                File too large:
                  summary: 업로드가 5MB 제한을 초과함
                  value:
                    user_image:
                      - File size should not exceed 5 MB
        '403':
          description: >-
            권한이 거부되었습니다. `x-api-key` 헤더가 누락되었거나 호출한 조직의 잔액이 호출 비용을 충당할 수 없을 때
            반환됩니다. 잘못되었거나 취소되었거나 만료된 키는 `401`을 반환합니다. 키가 누락된 경우 `{"detail":
            ...}`과 함께 `403`을 반환하고, 잘못되었거나 취소되었거나 만료된 키는 `401`을 반환합니다. 크레딧이 부족한
            경우 어떠한 이미지 처리도 진행되기 전에 `{"error": ...}`과 함께 `403`을 반환합니다.
          content:
            application/json:
              examples:
                Missing or invalid API key:
                  summary: '`x-api-key` 헤더가 없거나, 키가 유효하지 않거나 해지되었습니다'
                  value:
                    detail: You do not have permission to perform this action.
                Not enough credits:
                  summary: 조직 잔액이 호출 비용을 충당할 수 없습니다
                  value:
                    error: >-
                      You don't have enough credits to perform this request.
                      Please top up at https://business.didit.me
        '429':
          description: >-
            속도 제한을 초과했습니다. POST/PATCH/DELETE endpoint는 API 키당 분당 300회의 쓰기 요청 한도를
            공유합니다(거래 생성 및 이벤트 수집은 별도로 600회 한도 적용). 응답에는 `X-RateLimit-Limit`,
            `X-RateLimit-Remaining`, `X-RateLimit-Reset`, `Retry-After` 헤더가
            포함됩니다.
          content:
            application/json:
              examples:
                Write rate limit exceeded:
                  summary: 현재 분 동안 300건을 초과하는 쓰기 요청 발생
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
              schema:
                type: object
                properties:
                  detail:
                    type: string
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X POST 'https://verification.didit.me/v3/face-search/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -F 'user_image=@./selfie.jpg' \
              -F 'search_type=most_similar' \
              -F 'save_api_request=true' \
              -F 'vendor_data=user-123'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.face_search.search(
                user_image=open("user_image.jpg", "rb"),
                search_type="most_similar",
                rotate_image=False,
                save_api_request=True,
                vendor_data="user-123",
                metadata={"flow": "dedup_check"},
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit, { fileFromPath } from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.faceSearch.search({
              user_image: await fileFromPath("user_image.jpg"),
              search_type: "most_similar",
              rotate_image: false,
              save_api_request: true,
              vendor_data: "user-123",
              metadata: { flow: "dedup_check" },
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FaceSearch.Search(ctx, didit.FaceSearchSearchParams{\n\tUserImage:      didit.FileFromPath(\"user_image.jpg\"),\n\tSearchType:     didit.Some(didit.FaceSearchSearchParamsSearchType(\"most_similar\")),\n\tRotateImage:    didit.Bool(false),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData:     didit.String(\"user-123\"),\n\tMetadata:       didit.Some(map[string]any{\"flow\": \"dedup_check\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.nio.file.Path;

            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.FaceSearchSearchParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.faceSearch().search(FaceSearchSearchParams.builder()
                    .userImage(Path.of("user_image.jpg"))
                    .searchType(FaceSearchSearchParams.SearchType.of("most_similar"))
                    .rotateImage(false)
                    .saveApiRequest(true)
                    .vendorData("user-123")
                    .metadata(Map.of("flow", "dedup_check"))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;
            use Didit\File;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->faceSearch->search([
                'user_image' => File::fromPath('user_image.jpg'),
                'search_type' => 'most_similar',
                'rotate_image' => false,
                'save_api_request' => true,
                'vendor_data' => 'user-123',
                'metadata' => ['flow' => 'dedup_check'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.face_search.search(
              user_image: Pathname("user_image.jpg"),
              search_type: "most_similar",
              rotate_image: false,
              save_api_request: true,
              vendor_data: "user-123",
              metadata: { flow: "dedup_check" }
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Collections.Generic;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.FaceSearch.SearchAsync(new
            FaceSearchSearchParams

            {
                UserImage = FileUpload.FromPath("user_image.jpg"),
                SearchType = new FaceSearchSearchParamsSearchType("most_similar"),
                RotateImage = false,
                SaveApiRequest = true,
                VendorData = "user-123",
                Metadata = new Dictionary<string, object> { ["flow"] = "dedup_check" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본
        키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 none, read, write 범위로 권한을 제한할 수 있으며
        특정 워크플로나 승인된 세션, IP 주소 목록, 만료일 등으로 제한할 수도 있습니다. 401은 키가 잘못되었거나 폐기되었거나
        만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스나 작업에 대한 접근 권한이 없거나, 요청이 허용된
        IP 목록 외부 주소에서 발생했음을 의미합니다. 세션 경로에서의 404는 해당 세션이 키의 허용 워크플로 또는 상태 범위를
        벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 비디오, PDF URL을 null로 수신하며, 세션 write
        권한이 없는 키는 세션 링크와 token을 null로 수신합니다.
        https://docs.didit.me/console/api-keys 를 참고하십시오.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.