← 返回 Skills 市场
rosasalberto

Didit Biometric Age Estimation

作者 Didit · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
295
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install didit-biometric-age-estimation
功能描述
Estimates a person's age from a facial image via the Didit standalone API. Use when implementing age gating, checking if someone is over 18 or 21, performing...
使用说明 (SKILL.md)

Didit Age Estimation API

Overview

Estimates a person's age from a facial image using deep learning. Also performs a passive liveness check to prevent spoofing.

Key constraints:

  • Supported formats: JPEG, PNG, WebP, TIFF
  • Maximum file size: 5MB
  • Image must contain one clearly visible face
  • Accuracy: MAE ±3.5 years overall; ±1.5 years for under-18

Capabilities: Age estimation with confidence scoring, gender estimation, passive liveness detection, configurable age thresholds, per-country age restrictions, adaptive mode with ID verification fallback for borderline cases.

Liveness methods (workflow mode):

Method Security Best For
ACTIVE_3D (Action + Flash) Highest Banking, government, healthcare
FLASHING (3D Flash) High Financial services, identity verification
PASSIVE (single-frame CNN) Standard Low-friction consumer apps

API Reference: https://docs.didit.me/standalone-apis/age-estimation Feature Guide: https://docs.didit.me/core-technology/age-estimation/overview


Authentication

All requests require x-api-key header. Get your key from Didit Business Console → API & Webhooks, or via programmatic registration (see below).

Getting Started (No Account Yet?)

If you don't have a Didit API key, create one in 2 API calls:

  1. Register: POST https://apx.didit.me/auth/v2/programmatic/register/ with {"email": "[email protected]", "password": "MyStr0ng!Pass"}
  2. Check email for a 6-character OTP code
  3. Verify: POST https://apx.didit.me/auth/v2/programmatic/verify-email/ with {"email": "[email protected]", "code": "A3K9F2"} → response includes api_key

To add credits: GET /v3/billing/balance/ to check, POST /v3/billing/top-up/ with {"amount_in_dollars": 50} for a Stripe checkout link.

See the didit-verification-management skill for full platform management (workflows, sessions, users, billing).


Endpoint

POST https://verification.didit.me/v3/age-estimation/

Headers

Header Value Required
x-api-key Your API key Yes
Content-Type multipart/form-data Yes

Request Parameters (multipart/form-data)

Parameter Type Required Default Description
user_image file Yes Facial image (JPEG/PNG/WebP/TIFF, max 5MB)
rotate_image boolean No false Try 0/90/180/270 rotations for non-upright faces
save_api_request boolean No true Save in Business Console Manual Checks
vendor_data string No Your identifier for session tracking

Example

import requests

response = requests.post(
    "https://verification.didit.me/v3/age-estimation/",
    headers={"x-api-key": "YOUR_API_KEY"},
    files={"user_image": ("selfie.jpg", open("selfie.jpg", "rb"), "image/jpeg")},
    data={"vendor_data": "user-123"},
)
print(response.json())
const formData = new FormData();
formData.append("user_image", selfieFile);

const response = await fetch("https://verification.didit.me/v3/age-estimation/", {
  method: "POST",
  headers: { "x-api-key": "YOUR_API_KEY" },
  body: formData,
});

Response (200 OK)

{
  "request_id": "a1b2c3d4-...",
  "liveness": {
    "status": "Approved",
    "method": "PASSIVE",
    "score": 89.92,
    "age_estimation": 24.3,
    "reference_image": "https://example.com/reference.jpg",
    "video_url": null,
    "warnings": []
  },
  "created_at": "2025-05-01T13:11:07.977806Z"
}

Status Values & Handling

Status Meaning Action
"Approved" Age verified above threshold, liveness passed Proceed with your flow
"Declined" Age below minimum or liveness failed Check warnings for specifics
"In Review" Borderline case, needs review Trigger ID verification fallback or manual review

Error Responses

Code Meaning Action
400 Invalid request Check file format, size, parameters
401 Invalid API key Verify x-api-key header
403 Insufficient credits Top up at business.didit.me

Response Field Reference

Field Type Description
status string "Approved", "Declined", "In Review", "Not Finished"
method string "ACTIVE_3D", "FLASHING", or "PASSIVE"
score float 0-100 liveness confidence score
age_estimation float Estimated age in years (e.g. 24.3). null if no face
reference_image string Temporary URL (expires 60 min)
video_url string Temporary URL for active liveness video. null for passive
warnings array {risk, log_type, short_description, long_description}

Accuracy by Age Range

Age Range MAE (years) Confidence
Under 18 1.5 High
18-25 2.8 High
26-40 3.2 High
41-60 3.9 Medium-High
60+ 4.5 Medium

Warning Tags

Auto-Decline

Tag Description
NO_FACE_DETECTED No face found in image
LIVENESS_FACE_ATTACK Spoofing attempt detected
FACE_IN_BLOCKLIST Face matches a blocklist entry

Configurable (Decline / Review / Approve)

Tag Description
AGE_BELOW_MINIMUM Estimated age below configured minimum
AGE_NOT_DETECTED Unable to estimate age (image quality, lighting)
LOW_LIVENESS_SCORE Liveness score below threshold
POSSIBLE_DUPLICATED_FACE Significant similarity with previously verified face

Warning severity: error (→ Declined), warning (→ In Review), information (no effect).


Common Workflows

Basic Age Gate

1. Capture user selfie
2. POST /v3/age-estimation/ → {"user_image": selfie}
3. Check liveness.age_estimation >= your_minimum_age
4. If "Approved" → user meets age requirement
   If "Declined" → check warnings for AGE_BELOW_MINIMUM or liveness failure

Adaptive Age Estimation (Workflow Mode)

Uses workflow_type: "adaptive_age_verification" — creates a session where borderline ages trigger automatic ID verification fallback.

1. POST /v3/workflows/ → {"workflow_type": "adaptive_age_verification", "is_liveness_enabled": true, "is_age_restrictions_enabled": true}
2. POST /v3/session/ → create session with the workflow_id from step 1
3. User takes selfie → system estimates age
4. Clear pass (well above threshold) → Approved instantly
   Clear fail (well below threshold) → Declined
   Borderline case → automatic ID verification fallback
5. If ID fallback triggered: per-country age restrictions apply

Per-Country Age Restrictions

Configure in Console per issuing country:

Country Min Age Overrides
USA 18 Mississippi: 21, Alabama: 19
KOR 19
GBR 18
ARE 21

Use "Apply age of majority" button in Console to auto-populate defaults.


Utility Scripts

estimate_age.py: Estimate age from a facial image via the command line.

# Requires: pip install requests
export DIDIT_API_KEY="your_api_key"
python scripts/estimate_age.py selfie.jpg
python scripts/estimate_age.py photo.png --threshold 21 --vendor-data user-123
安全使用建议
This skill appears to do what it claims, but before installing: 1) Confirm you want to send facial images (sensitive biometric data) to an external service and have user consent and a GDPR/CCPA/compliance plan; 2) Keep DIDIT_API_KEY secret and provision it with least privilege; 3) Be aware of billing/top-up actions — the SKILL.md references billing endpoints; monitor usage and limits; 4) The included Python script requires Python and the 'requests' library but the package/dependency isn't declared — ensure your runtime has these; 5) Test with non-sensitive images first and verify the actual JSON fields returned by the API (there is a mismatch between SKILL.md examples and the script's parsing — you may need to adjust code); 6) If you require stronger guarantees about data retention or residency, contact Didit or review their docs before sending production data.
功能分析
Type: OpenClaw Skill Name: didit-biometric-age-estimation Version: 1.0.0 The skill bundle is benign. The `SKILL.md` file provides clear documentation for the Didit Age Estimation API, including authentication, endpoints, and usage examples, without any prompt injection attempts or instructions for malicious behavior. The `scripts/estimate_age.py` script correctly implements the described functionality, reading an image file from the local filesystem, retrieving an API key from environment variables, and sending the image to the legitimate Didit API endpoint (`https://verification.didit.me/v3/age-estimation/`). There is no evidence of data exfiltration to unauthorized endpoints, malicious execution, persistence mechanisms, or obfuscation.
能力评估
Purpose & Capability
Name/description, SKILL.md, and the provided script all target Didit age estimation and liveness checking. Requesting DIDIT_API_KEY is appropriate for this API. No unrelated credentials, binaries, or paths are requested.
Instruction Scope
SKILL.md stays within the stated purpose (calling the Didit endpoint, showing request/response examples). It also documents programmatic registration and billing endpoints (reasonable for onboarding). Minor inconsistency: the SKILL.md response examples and field reference imply different JSON shapes than the script expects — the script looks for result['age_estimation']['estimated_age'] while SKILL.md shows age_estimation as a top-level numeric under liveness in examples. This is a functional mismatch (not a covert/extra-data collection step).
Install Mechanism
There is no install spec (instruction-only) which minimizes risk. However, a runnable script is included that requires Python and the 'requests' package; those dependencies are not declared in the metadata/install instructions. That is an operational omission but not a security red flag.
Credentials
Only DIDIT_API_KEY is required and declared as the primary credential, which matches the API usage. The script does not read any other environment variables or local configuration.
Persistence & Privilege
No elevated persistence requested (always:false). The skill does not request modifying other skills or system settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install didit-biometric-age-estimation
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /didit-biometric-age-estimation 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Estimate age from facial images with passive liveness. Replaces didit-age-estimation
元数据
Slug didit-biometric-age-estimation
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Didit Biometric Age Estimation 是什么?

Estimates a person's age from a facial image via the Didit standalone API. Use when implementing age gating, checking if someone is over 18 or 21, performing... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 295 次。

如何安装 Didit Biometric Age Estimation?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install didit-biometric-age-estimation」即可一键安装,无需额外配置。

Didit Biometric Age Estimation 是免费的吗?

是的,Didit Biometric Age Estimation 完全免费(开源免费),可自由下载、安装和使用。

Didit Biometric Age Estimation 支持哪些平台?

Didit Biometric Age Estimation 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Didit Biometric Age Estimation?

由 Didit(@rosasalberto)开发并维护,当前版本 v1.0.0。

💬 留言讨论