얼굴 검출
얼굴 검출은 검출 엔진의 별칭인 POST /v2/face-recognition/face-validation입니다. image는 필수입니다. 생략하면 이 경로가 min_score를 0.5로, search_mode를 FAST로 넣습니다. 실제 페이로드는 face_count, faces(score와 bbox), imageDimensions, engine입니다.
응답에 포함되는 값
face_countfaces[].score와faces[].bboximageDimensions와engine
사용 사례
- 라이브니스 전에 얼굴 수를 셉니다.
- 주 얼굴의 상자를 읽습니다.
- 이미지만 있으면 기본 점수와 모드를 씁니다.
API 레퍼런스
Endpoint
POST https://api.verifik.co/v2/face-recognition/face-validation
먼저 face_count를 읽습니다. faces의 각 항목에는 score와 bbox가 있습니다. imageDimensions는 디코드된 너비와 높이입니다. engine은 검출기 이름입니다.
Headers
| 이름 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json | 요청 형식 |
| Accept | application/json | 응답 형식 |
| Authorization | Bearer <token> | 클라이언트 JWT |
Parameters
| 이름 | 유형 | 필수 | 예시 | 설명 |
|---|---|---|---|---|
image | string | 예 | data:image/jpeg;base64,AAAA | base64 또는 data URI 얼굴 이미지. 필수. |
min_score | number | 아니오 | 0.5 | 선택. 이 경로는 기본값 0.5를 넣습니다. |
search_mode | string | 아니오 | FAST | 선택. 이 경로는 기본값 FAST를 넣습니다. 다른 값은 ACCURATE입니다. |
Request
- Node.js / JavaScript
- Python
- cURL
import axios from "axios";
const options = {
method: "POST",
url: "https://api.verifik.co/v2/face-recognition/face-validation",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer <your_token>",
},
data: {
"image": "data:image/jpeg;base64,AAAA"
},
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error.response ? error.response.data : error.message);
}
import requests
url = "https://api.verifik.co/v2/face-recognition/face-validation"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <your_token>",
}
payload = {
"image": "data:image/jpeg;base64,AAAA",
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
curl -X POST "https://api.verifik.co/v2/face-recognition/face-validation" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <your_token>" \
-d '{"image":"data:image/jpeg;base64,AAAA"}'
Response
- 200 (레코드 있음)
- 409 (파라미터 누락)
- 404 (없음)
- 401 (인증 실패)
- 500 (원천 사용 불가)
{
"data": {
"face_count": 1,
"faces": [
{
"score": 0.97,
"bbox": [
80,
60,
280,
320
]
}
],
"imageDimensions": {
"width": 640,
"height": 480
},
"engine": "insightface"
},
"signature": {
"dateTime": "November 27, 2026 12:00 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "MissingParameter",
"message": "\"image\" is required"
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
{
"code": "InternalServerError",
"message": "The official source is temporarily unavailable. Please retry shortly."
}
참고
image만 필수입니다.- 생략한
min_score는0.5, 생략한search_mode는FAST가 됩니다. - 응답은 별도 랜드마크가 아니라
bbox를 씁니다. Authorization헤더에 Bearer JWT를 보냅니다.- JSON 예시는 필드 모양입니다. 실제 호출은 보낸 값의 레코드를 반환합니다.
- 캐시 우회 플래그는 보내지 않습니다. 이 페이지는 클라이언트 파라미터만 설명합니다.
샌드박스
| 시나리오 | 파라미터 | 결과 |
|---|---|---|
| 원천에 기록 있음 | image only | face_count, faces, imageDimensions, engine이 있는 200. |
| 필수 값 누락 | Omit image | 409 MissingParameter. |
| 알 수 없는 값 | min_score: 0.8, search_mode: "ACCURATE" | 보낸 점수와 모드로 200. |
401 when the bearer token is missing or rejected.