Compare RGB Palmprint
Upload an RGB palm image and compare it 1:1 against a specific user's registered palmprint. Used for identity verification (e.g. secondary confirmation, pre-payment palm confirmation). Single-factor authentication.
| Item | Value |
|---|---|
| Method | POST |
| URL | https://open.intl.palm.tencent.com/palm/openai/compare_rgb_palm |
| Content-Type | application/json; charset=utf-8 |
| Authorization | Bearer <api_key> |
| Default rate limit | 20 requests/sec |
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
RgbImage | Yes | Image | RGB palm image; Data and ImageType are required |
CompareUserId | Yes | String | Target user ID. The user must already be registered via RegisterRgbPalm under your application |
Response Parameters (data)
| Parameter | Type | Description |
|---|---|---|
IsMatch | Boolean | Whether the palm matches the user. true = match, false = no match |
Score | Integer | Similarity score, 0–100. Higher means more similar |
AlgorithmVersion | String | Algorithm version used for this comparison |
PalmDirection | Integer | Detected palm side, see PalmDirectionType |
SessionId | String | Temporary query credential for this verification (UUID, valid 2 hours) |
Example
Request
POST /palm/openai/compare_rgb_palm HTTP/1.1
Host: open.intl.palm.tencent.com
Content-Type: application/json; charset=utf-8
Authorization: Bearer ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
"RgbImage": {
"Data": "base64encodedRgbImageData...",
"ImageType": 1
},
"CompareUserId": "user001"
}
Response
{
"code": 0,
"message": "ok",
"requestId": "4d5912a82af144f8a982c2da031c1035",
"data": {
"IsMatch": true,
"Score": 95,
"AlgorithmVersion": "v2.0",
"PalmDirection": 1,
"SessionId": "3f2b1a6d-8c4e-4b7a-9d5f-1e2c3a4b5c6d"
}
}
cURL
curl -X POST "https://open.intl.palm.tencent.com/palm/openai/compare_rgb_palm" \
-H "Content-Type: application/json; charset=utf-8" \
-H "Authorization: Bearer ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"RgbImage": {
"Data": "'"$(base64 -w0 palm.jpg)"'",
"ImageType": 1
},
"CompareUserId": "user001"
}'
Notes
- Trust
IsMatch, not your own threshold onScore. Treatfalseas rejection and rate-limit repeated failures (e.g. freeze after 5 failures within 15 minutes) to prevent brute-force attempts. - Comparing against an unregistered user returns
2080016(user does not exist in DB) or2080017(palm direction not registered).