개발자용 API
신분증 사진과 지금 찍은 셀피를 보내면 같은 사람일 가능성을 0~1 점수와 판정, 높음·보통·낮음 구간으로 돌려줍니다. 비대면 가입·계좌 개설·대여 서비스의 본인 확인 단계에 바로 붙이세요.
서비스·시스템에 연동하는 기업·개발자를 위한 API입니다. 인증키로 호출하고 사용한 만큼 포인트가 차감됩니다.
인증키는 Authorization: Bearer 헤더로 보냅니다. 서버에서만 호출하고 인증키를 브라우저·앱에 넣지 마세요.
curl -X POST "https://apick.app/rest/face_similarity" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@./id_card.jpg" \
-F "compare_image=@./selfie.jpg"
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("image", new Blob([await readFile("./id_card.jpg")]), "id_card.jpg");
form.append("compare_image", new Blob([await readFile("./selfie.jpg")]), "selfie.jpg");
const response = await fetch("https://apick.app/rest/face_similarity", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.APICK_API_KEY },
body: form,
});
const { data, api } = await response.json();
if (data.error) throw new Error(data.error); // 실패는 과금되지 않습니다
console.log(data, api.cost);
{
"data": {
"similarity": 0.6213,
"is_match": true,
"level": "높음",
"threshold": 0.4,
"best_index": 1,
"base_face": {
"face_count": 1,
"face_crop": [
[
288.4,
61.2
],
[
370.9,
168.7
]
],
"det_score": 0.7762
},
"results": [
{
"index": 1,
"face_found": true,
"similarity": 0.6213,
"is_match": true,
"level": "높음",
"face": {
"face_count": 1,
"face_crop": [
[
402.1,
188.6
],
[
611.5,
455
]
],
"det_score": 0.8921
}
}
],
"success": 1
},
"api": {
"success": true,
"cost": 10,
"ms": 812
}
}
예시 값입니다. 점수 구간과 판정 기준(threshold) 조절 방법은 개발 문서에 있습니다.
HTTP 상태 → api.success → data.error → api.cost 순서로 확인하세요. 실패 응답은 과금되지 않습니다.
기준 이미지에서 얼굴을 찾지 못했습니다.HTTP 422얼굴이 정면으로 크게 나온 사진으로 바꿔 보내세요. 과금되지 않습니다.
비교 이미지에서 얼굴을 찾지 못했습니다.HTTP 422보낸 비교 사진 모두에서 얼굴이 없을 때입니다. 셀피를 다시 찍게 하세요. 과금되지 않습니다.
판정 기준(threshold)은 0.2 ~ 0.8 사이 숫자여야 합니다.HTTP 400threshold를 범위 안 숫자로 보내거나 생략하세요.
유효하지 않은 API키 입니다.HTTP 401Authorization: Bearer 헤더의 인증키를 확인하세요. 인증키는 마이페이지에서 확인합니다.
허용되지 않은 IP주소 입니다.HTTP 401마이페이지의 허용 IP 설정과 요청을 보내는 서버 IP를 확인하세요.
사용 가능한 포인트이 부족합니다.HTTP 200HTTP 200이어도 data.error가 있으면 실패입니다. 포인트를 충전한 뒤 다시 요청하세요. 이 응답은 과금되지 않습니다.
전체 응답 항목과 오류 코드는 개발 문서에 있습니다.