HR assessment endpoint
POST https://www.faceabc.com/api/v1/hr
Pass a photo and a target role to get job fit, team roles, management potential and risk signals. It shares the API Key and rate limit with the prediction endpoint above。
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
photo_url | string | Required* | Public photo URL. With photo Pick one of two |
photo | file | Required* | Upload the file directly, ≤ 10 MB, jpg/png/webp (auto-converted to JPG) |
gender | int | Required | 0 0 = male / 1 Female |
job | string | Optional | Preset role key, e.g. accountant。Or jd / job_lib_id / custom Choose one of four |
jd | string | Optional | Raw job description; the system parses it into trait requirements. See “Role library & JD parsing” below. |
job_lib_id | int | Optional | Role-library id, returned by saveJob Back |
custom | JSON | Optional | Custom role spec, format below. With job Pick one of two |
scope | string | Optional | preview(default) / full(also returns per-item reasoning and interview suggestions) |
List available roles
GET https://www.faceabc.com/api/v1/hr/jobs
X-API-Key: fk_你的key
→ { "success": true, "total": 72,
"jobs": [ { "key": "accountant", "cat": "财务", "name": "会计",
"desc": "严谨、守规、对数字和凭证高度敏感" }, ... ] }
72 preset roles across 19 function categories. You can also pass custom your own criteria.
Custom role (custom)
{
"job_name": "全盘会计",
"summary": "严谨负责、能扛月末压力",
"traits": [
{ "id": "k_15", "need": 1.4, "weight": 2 }, // 细心:要很高,核心要求
{ "id": "k_32", "need": 1.3, "weight": 2 }, // 有责任感
{ "id": "k_42", "need": -0.7, "weight": 1 } // 敢冒险:要低(负值表示越低越好)
]
}
+1.5 means clearly above average,-1.0 means clearly below average.
weight:
2 = core requirement,1 = secondary requirement.
Trait id: use
GET /api/v1/hr/traits to list available traits.
· Format: JPG / JPEG / PNG / WebP / GIF / BMP all work — the system converts to JPG automatically(send JPG directly to skip the conversion)
· Size: ≤ 10 MB
· Content: frontal, clear features, no glare,forehead visible(the hairline must be detectable)
· Lighting: even light; avoid backlight and heavy shadows
· No hats, masks or sunglasses covering the face
· Images are resized below 3000 px and converted to JPG; a 1 MB PNG usually ends up around 200 KB
Example call
curl -X POST "https://www.faceabc.com/api/v1/hr" \ -H "X-API-Key: fk_你的key" \ -d "photo_url=https://你的域名/photo.jpg" \ -d "gender=1" \ -d "job=accountant" \ -d "scope=full"
Response
{
"success": true,
"request_id": "req_2c68a4d955ee",
"user_id": 1934364196,
"gender": "female",
"job": { "key": "accountant", "name": "会计",
"desc": "严谨、守规…", "custom": false },
"fit": {
"score": 54,
"short": [ { "trait": "k_42", "label": "敢冒险",
"need": -0.7, "have": 1.3, "deficit": 2 } ],
"over": [ { "trait": "k_15", "label": "细心", "need": 1.2, "have": 2.8 } ],
"met": []
},
"roles": [ { "role": "专家", "score": 91, "desc": "在一个领域钻得很深" } ],
"leadership": {
"overall": 61,
"dims": [ { "key": "drive", "name": "成就驱动", "score": 64 } ]
},
"risks": [ { "level": "mid", "title": "合规意识偏弱", "desc": "…" } ],
"interview": [ { "trait": "敢冒险", "question": "…", "why": "…" } ],
"traits": { "k_15": 2.81, "k_42": 1.33 }
}
deficit is “how much is missing” — 0 means exactly on target, 2 means the maximum gap.
score is the weighted average over all requirements; 100 means every requirement is met.
What the result is: it reflects personality–role fit only; ability, experience and credentials are not assessed.
HR error codes
| HTTP | error | Description |
|---|---|---|
| 400 | BAD_CUSTOM | Malformed custom spec or empty traits |
| 401 | UNAUTHORIZED | Invalid API Key |
| 422 | FACE_REJECTED | Photo failed validation |
| 422 | INSUFFICIENT_FEATURES | Not enough features to assess |
| 429 | RATE_LIMITED | Rate limit exceeded |
Role library & JD parsing
When analysing a person, role requirements can come from three sources:preset role(72 of them),pasted JD(parsed automatically),role library(your saved roles). They map to three parameters — pick one.
| Parameter | Type | Required | Description |
|---|---|---|---|
job | string | Pick one of three | Preset role key, e.g. accountant. Use GET /api/v1/hr/jobs to list all 72 |
jd | string | Pick one of three | Raw job description (30–4000 characters); parsed into trait requirements |
job_lib_id | int | Pick one of three | Role-library id, returned by saveJob Back |
custom | JSON | Pick one of three | Pass a trait spec directly, format below |
Passing
jd calls the model every time (about 8–15 s, ¥0.10 extra).When many people share one role, first
parseJd → saveJob, then pass job_lib_id instead.
Parse a JD
POST https://www.faceabc.com/api/v1/hr/parseJd
curl -X POST "https://www.faceabc.com/api/v1/hr/parseJd" \\
-H "X-API-Key: fk_你的key" \\
--data-urlencode "jd=岗位职责:负责全盘账务处理…任职要求:财务专业本科以上…"
→ {
"success": true,
"job_name": "全盘会计",
"summary": "该岗位要求细致严谨、责任心强、能抗压",
"traits": [
{ "id": "k_15", "need": 1.4, "weight": 2, "why": "工作细致严谨" },
{ "id": "k_32", "need": 1.4, "weight": 2, "why": "责任心强" },
{ "id": "k_48", "need": 1.3, "weight": 2, "why": "能承受月末结账压力" }
],
"custom": "{\\"job_name\\":\\"全盘会计\\",\\"traits\\":[…]}" // 可直接传给 saveJob
}
Save to role library
POST https://www.faceabc.com/api/v1/hr/saveJob
curl -X POST "https://www.faceabc.com/api/v1/hr/saveJob" \\
-H "X-API-Key: fk_你的key" \\
--data-urlencode "job_name=全盘会计" \\
--data-urlencode "summary=严谨、能扛月末压力" \\
--data-urlencode "custom={上一步返回的 custom}"
→ { "success": true, "id": 3 }
List role library
GET https://www.faceabc.com/api/v1/hr/myJobs
curl "https://www.faceabc.com/api/v1/hr/myJobs" -H "X-API-Key: fk_你的key"
→ { "success": true, "total": 2,
"jobs": [
{ "id": 3, "job_name": "全盘会计", "summary": "严谨、能扛月末压力",
"traits": [ { "id": "k_15", "need": 1.4, "weight": 2 } ],
"create_time": "2026-11-01 03:55:00" }
] }
Delete a role
POST https://www.faceabc.com/api/v1/hr/delJob
curl -X POST "https://www.faceabc.com/api/v1/hr/delJob" \\
-H "X-API-Key: fk_你的key" -d "id=3"
→ { "success": true, "deleted": 1 }
People
Every call to POST /api/v1/hrregisters this person automatically underyour API Key, and returns a person_id。
For team analysis later, just pass person_id,no need to upload the photo again。
Data is strictly isolated per API Key — no other customer can see your data.
List people
GET https://www.faceabc.com/api/v1/hr/persons
curl "https://www.faceabc.com/api/v1/hr/persons?page=1&size=50" \
-H "X-API-Key: fk_你的key"
→ { "success": true, "total": 3, "page": 1, "size": 50,
"persons": [
{ "person_id": "p_d7dc3d88", "label": "王五", "gender": 0,
"create_time": "2026-11-01 03:44:05",
"expire_time": "2027-04-30 03:44:05", "used_count": 0 }
] }
page(default 1),size(default 50, max 200)
Delete people
POST https://www.faceabc.com/api/v1/hr/personDelete
curl -X POST "https://www.faceabc.com/api/v1/hr/personDelete" \
-H "X-API-Key: fk_你的key" \
-d "person_ids=p_00b075a5,p_2dded1d8"
→ { "success": true, "deleted": 2, "requested": 2 }
· Only the 62 trait scores are stored,never the photo
· Scoped solely by
api_key_id ; no other customer can access it· After calling delete,the record is physically deleted immediately
· Unused records expire after 180 days
· To store nothing at all, use
person_token stateless mode
Team assessment endpoint
POST https://www.faceabc.com/api/v1/hr/team
Pass several user_idand get a role-composition analysis: who covers which role, which roles have no owner, duplicated roles, team health and structural risks.
① Assess each person with
POST /api/v1/hr; each call returns a person_idand stores the person in your library;② Collect the
person_id and call POST /api/v1/hr/team for the team analysis.The team endpointdoes not need photos again— no repeated recognition and no repeated recognition fees.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
person_ids | string | Required | Comma-separated person_id(returned by the single-assessment endpoint). Minimum 2, maximum 12 people |
person_tokens | string | Optional | Stateless mode: pass person_token instead of person_idsand nothing is stored |
scope | string | Optional | preview(default) / full |
Example call
curl -X POST "https://www.faceabc.com/api/v1/hr/team" \\ -H "X-API-Key: fk_你的key" \\ -d "person_ids=p_00b075a5,p_2dded1d8,p_d7dc3d88"
Response
{
"success": true,
"request_id": "req_2c68a4d955ee",
"member_count": 3,
"missing_ids": [],
"health": 78,
"coverage": { "covered": 8, "expected": 5, "total": 9 },
"members": [
{ "user_id": 1, "name": "张三",
"top_role": "协调者", "role_score": 97, "second_role": "凝聚者" }
],
"assignment": [
{ "role": "协调者", "who": "张三", "score": 97, "rank": 1, "fit": "strong" },
{ "role": "监测者", "who": "李四", "score": 60, "rank": 1, "fit": "weak" }
],
"key_persons": [
{ "name": "张三", "count": 4,
"roles": ["协调者", "凝聚者", "推动者", "完美者"], "risk": "high" }
],
"risks": [
{ "level": "mid", "title": "强势成员偏多",
"desc": "3 人中有 3 人强势,容易各说各话", "a": "", "b": "" }
],
"overlap": [
{ "role": "专家", "count": 2, "names": ["王五", "赵六"] }
],
"suggest": [
"监测者只有 1 人能顶,这个人缺位会直接塌"
]
}
·
health: 0–100, computed from coverage, conflict, overlap and dependency·
assignment[].fit:strong(≥85)/ ok(65–84)/ weak(<65)·
key_persons[].count: how many roles this person covers alone — the more, the riskier·
coverage.expected: expected role coverage for the team size (n+2, capped at 9)·
overlap: two or more people can cover the same role — either waste or spare capacity
Team endpoint error codes
| HTTP | error | Description |
|---|---|---|
| 400 | TOO_FEW_MEMBERS | Fewer than 2 person_ids |
| 400 | TOO_MANY_MEMBERS | More than 12 person_ids |
| 403 | FORBIDDEN_SCOPE | This API Key has no team-assessment scope |
| 422 | INSUFFICIENT_MEMBERS | Fewer than 2 valid person_ids (the rest are in missing_ids) |
| 402 | INSUFFICIENT_BALANCE | Insufficient balance |

