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

# 컬렉션에서 얼굴 검색

> 제출된 이미지를 사용하여 컬렉션 내에서 일치하는 얼굴을 검색

이 API 엔드포인트를 통해 제출된 이미지를 사용하여 컬렉션 내에서 일치하는 얼굴을 검색할 수 있습니다. 이 기능은 얼굴 인식 및 신원 확인 애플리케이션에서 매우 유용합니다.

## 요청

### 헤더

<ParamField header="x-api-key" type="string">
  인증 및 접근 제어에 사용되는 API 키입니다. 이 헤더 매개변수는 인증에 필요합니다.
</ParamField>

### 본문 매개변수

<ParamField header="collectionId" type="string" required>
  검색할 컬렉션의 고유 식별자입니다.
</ParamField>

<ParamField header="requestName" type="string" required>
  얼굴 이미지와 일치하는 이름
</ParamField>

<ParamField header="faceImage" type="string" required>
  검색할 얼굴 이미지의 Base64 인코딩된 문자열 표현입니다.
</ParamField>

## 응답

### 성공 응답 (200)

<ResponseField name="message" type="string">
  얼굴 검색 결과를 나타내는 성공 메시지
</ResponseField>

<ResponseField name="result" type="array">
  일치하는 얼굴 객체의 배열:

  **face\_id**: 일치하는 얼굴의 고유 식별자

  **user\_name**: 일치하는 얼굴과 관련된 사용자의 이름

  **similarity\_score**: 검색된 얼굴과 일치하는 얼굴 간의 유사성 점수
</ResponseField>

### 오류 응답

#### 잘못된 요청 (400)

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

  * 6035: CollectionId가 필요합니다
  * 6036: FaceImage가 필요합니다
  * 6037: 컬렉션 정보를 찾을 수 없습니다
  * 6038: 얼굴 검색 실패
</ResponseField>

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

#### 금지됨 (403)

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

  * 6039: API 키가 필요합니다
  * 6040: 액세스 거부: API 키를 사용할 수 없습니다
</ResponseField>

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


## OpenAPI

````yaml POST /search
openapi: 3.1.0
info:
  title: Face ID API
  description: >-
    API for facial recognition and identity verification using Face ID
    technology
  version: 1.0.0
servers:
  - url: https://face.argosidentity.com
    description: Production server
security: []
paths:
  /search:
    post:
      tags:
        - Face ID
      summary: Search face in collection
      description: Search for matching faces within a collection using a submitted image
      operationId: searchFace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - collectionId
                - requestName
                - faceImage
              properties:
                collectionId:
                  type: string
                  description: Unique identifier of the collection to search in
                  example: col_123456789
                requestName:
                  type: string
                  description: Name that matches the face image
                  example: John Doe
                faceImage:
                  type: string
                  description: >-
                    Base64-encoded string representation of the face image to
                    search for
                  example: 9j/4AAQSkZJRgABAQAAAQ...
      responses:
        '200':
          description: Face search completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
                    example: Search completed successfully
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        face_id:
                          type: string
                          description: Unique identifier for the matching face
                        user_name:
                          type: string
                          description: Name of the user associated with the matching face
                        similarity_score:
                          type: number
                          description: >-
                            Similarity score between the searched face and the
                            matching face
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: number
                    description: Error code
                    enum:
                      - 6035
                      - 6036
                      - 6037
                      - 6038
                  message:
                    type: string
                    description: Error message
        '403':
          description: Forbidden - Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: number
                    description: Error code
                    enum:
                      - 6039
                      - 6040
                  message:
                    type: string
                    description: Error message
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````