👤🪪 面部和身份证件验证,用于 KYC
1 IC每次请求
试用演示
访问我们的 API 门户,使用您自己的图片测试面部和身份证件验证 KYC API。
试用演示!
入门
面部和身份证件验证 KYC 是一项由 AI 驱动的服务,它将自拍照与身份证照片进行比较,以验证 KYC(了解您的客户)目的的身份。
示例
该服务需要两个输入:
- 身份证照片(大图)
- 身份证件持有者的自拍照(小图)
然后,它会分析并确认两张照片是否显示的是同一个人。
功能和能力
核心功能
- 自拍照与身份证照片之间的面部匹配
- 高精度验证
- 0.1 秒内快速处理
- 处理后不保留数据(符合 GDPR)
支持的字段
- 图片格式:JPG、JPEG、PNG、GIF
- 图片尺寸:600 像素宽 x 400 像素高
- 最大文件大小:每个图片 10MB
示例
面部和身份证件验证 KYC 请求
图片预览


curl --location 'https://api.iapp.co.th/v3/store/ekyc/face-and-id-card-verification' \
--header 'apikey: {{{YOUR API KEY}}}' \
--form 'file0=@"image1.png"' \
--form 'file1=@"image2.png"'
面部和身份证件验证 KYC 响应
{
"idcard": { "confidence": 66.872, "isSamePerson": "true" },
"selfie": { "confidence": 86.04, "isSamePerson": "true" },
"time_process": 0.824,
"total": { "confidence": 76.456, "isSamePerson": "true" }
}
API 端点
| 端点 | 方法 | 描述 | 费用 |
|---|---|---|---|
POST /v3/internal/ekyc/face-and-id-card-verification/v2旧版: /api/v2/ekyc | POST | 面部 + 身份证件验证 | 每次请求 1 IC |
POST /v3/store/ekyc/face-and-id-card-verification旧版: /face-verify-id2 | POST | 面部 + 身份证件验证 | 每次请求 1 IC |
POST /v3/store/ekyc/face-and-id-card-verification/front旧版: /thai-national-id-card/v3/front/kyc | POST | 面部和身份证件验证 KYC(正面) | 每页 1 IC |
POST /v3/store/ekyc/face-and-id-card-verification/back旧版: /thai-national-id-card/v3/back/kyc | POST | 面部和身份证件验证 KYC(背面) | 每页 1 IC |
API 参考
面部和身份证件验证端点
1. 面部 + 身份证件验证 (V2 API)
POST /v3/store/ekyc/face-and-id-card-verification/v2
使用 V2 API 端点验证自拍照是否与身份证照片匹配。
2. 面部 + 身份证件验证
POST /v3/store/ekyc/face-and-id-card-verification
验证自拍照是否与身份证照片匹配。
3. 面部和身份证件验证 KYC(正面)
POST /v3/store/ekyc/face-and-id-card-verification/kyc-front
处理泰国国民身份证件正面,用于 KYC 验证。
4. 面部和身份证件验证 KYC(背面)
POST /v3/store/ekyc/face-and-id-card-verification/kyc-back
处理泰国国民身份证件背面,用于 KYC 验证。
请求参数
| 名称 | 类型 | 位置 | 是否必填 | 描述 |
|---|---|---|---|---|
| apikey | String | header | 是 | API 认证密钥 |
| file0 | File | body | 是 | 身份证件图片文件 |
| file1 | File | body | 是 | 自拍照文件 |
响应
| 状态 | 描述 |
|---|---|
| 200 | 验证成功响应 |
API 错误消息
常见错误消息
| 状态码 | 状态消息 | 描述 |
|---|---|---|
| 404 | no route matched with those values. | 没有匹配到此 URL 的路由。请再次验证。 |
| 405 | the method is not allowed for the requested URL. | 请求的 URL 不允许使用此方法。 |
| 413 | file is too large, more than 10 MB. | 文件过大,超过 10MB。 |
| 415 | file extension is not allowed. | 此 URL 不允许使用此文件扩展名。 |
客户端特定错误消息
| 状态码 | 状态消息 | 描述 |
|---|---|---|
| 420 | parameter not found in request. [file0, file1] | 请求中未找到此参数。请在请求中输入参数。 |
| 421 | (face, id card, face on id card) not found in image. [file0, file1] | 在此图片中未找到身份证件或面部。 |
| 422 | face on (id card, selfie) not found in image. [file0, file1] | 在身份证件或自拍照中未找到面部。 |
| 441 | too many images. | 参数中的图片过多。 |
| 442 | image error, unsupported format. | 图片格式不支持。 |
| 461 | no file attached. | 未附加文件。 |
代码示例
Python
import requests
url = "https://api.iapp.co.th/v3/store/ekyc/face-and-id-card-verification"
payload = {}
files=[
('file0',('{IMAGE FILE 1}',open('{IMAGE FILE PATH 1}','rb'),'image/png')),
('file1',('{IMAGE FILE 2}',open('{IMAGE FILE PATH 2}','rb'),'image/png'))
]
headers = {
'apikey': '{YOUR API KEY}'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)