Loading...
Loading...
Verifies identity documents via the Didit standalone API. Use when verifying a passport, ID card, driver's license, or residence permit, performing OCR extraction, MRZ parsing, document authenticity checks, or KYC document validation. Supports 4000+ document types across 220+ countries.
npx skill4agent add didit-protocol/skills didit-id-document-verificationx-api-keyPOST https://apx.didit.me/auth/v2/programmatic/register/{"email": "you@gmail.com", "password": "MyStr0ng!Pass"}POST https://apx.didit.me/auth/v2/programmatic/verify-email/{"email": "you@gmail.com", "code": "A3K9F2"}api_keyGET /v3/billing/balance/POST /v3/billing/top-up/{"amount_in_dollars": 50}POST https://verification.didit.me/v3/id-verification/| Header | Value | Required |
|---|---|---|
| Your API key | Yes |
| | Yes |
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| file | Yes | — | JPEG/PNG/WebP/TIFF, max 5MB | Front image of ID document |
| file | No | — | Same as above | Back image (when applicable) |
| boolean | No | | — | Save in Business Console Manual Checks |
| string | No | — | — | Your identifier for session tracking |
import requests
response = requests.post(
"https://verification.didit.me/v3/id-verification/",
headers={"x-api-key": "YOUR_API_KEY"},
files={
"front_image": ("front.jpg", open("front.jpg", "rb"), "image/jpeg"),
"back_image": ("back.jpg", open("back.jpg", "rb"), "image/jpeg"),
},
data={"vendor_data": "user-123"},
)const formData = new FormData();
formData.append("front_image", frontImageFile);
formData.append("back_image", backImageFile);
formData.append("vendor_data", "user-123");
const response = await fetch("https://verification.didit.me/v3/id-verification/", {
method: "POST",
headers: { "x-api-key": "YOUR_API_KEY" },
body: formData,
});{
"request_id": "a1b2c3d4-...",
"id_verification": {
"status": "Approved",
"document_type": "Identity Card",
"document_number": "YZA123456",
"personal_number": "X9876543L",
"first_name": "Elena",
"last_name": "Martínez Sánchez",
"full_name": "Elena Martínez Sánchez",
"date_of_birth": "1985-03-15",
"age": 40,
"gender": "F",
"nationality": "ESP",
"issuing_state": "ESP",
"issuing_state_name": "Spain",
"expiration_date": "2030-08-21",
"date_of_issue": "2020-08-21",
"address": "Calle Mayor 10, Madrid",
"formatted_address": "Calle Mayor 10, 28013 Madrid, Spain",
"place_of_birth": "Valencia",
"portrait_image": "<base64>",
"front_document_image": "<base64>",
"back_document_image": "<base64>",
"mrz": {
"surname": "MARTINEZ SANCHEZ",
"given_name": "ELENA",
"document_type": "I",
"document_number": "YZA123456",
"country": "ESP",
"nationality": "ESP",
"birth_date": "850315",
"expiry_date": "300821",
"sex": "F"
},
"parsed_address": {"city": "Madrid", "region": "...", "postal_code": "28013", "country": "ES"},
"warnings": []
},
"created_at": "2025-05-01T13:11:07.977806Z"
}| Status | Meaning |
|---|---|
| Document verified successfully |
| Verification failed (see |
| Requires manual review |
| Code | Meaning | Action |
|---|---|---|
| Invalid request | Check file format, size, parameters |
| Invalid API key | Verify |
| Insufficient credits | Top up at business.didit.me |
| Field | Type | Description |
|---|---|---|
| string | |
| string | |
| string | Document ID number |
| string | Personal/national ID number |
| string | Extracted name fields |
| string | |
| integer | Calculated age |
| string | |
| string | ISO 3166-1 alpha-3 |
| string | |
| string | Base64-encoded portrait from document |
| object | Machine Readable Zone data |
| object | Geocoded address: |
| array | |
| Tag | Description |
|---|---|
| Document in blocklist (previously flagged) |
| No portrait found on document |
| Document expiration date has passed |
| Document type not accepted |
| Category | Tags |
|---|---|
| Document liveness | |
| MRZ issues | |
| Data issues | |
| Duplicates | |
| Expected mismatch | |
| Geolocation | |
1. POST /v3/id-verification/ → front_image (+ back_image if applicable)
2. If "Approved" → extract first_name, last_name, date_of_birth, document_number
If "Declined" → check warnings:
DOCUMENT_EXPIRED → ask for valid document
SCREEN_CAPTURE_DETECTED → ask for real photo of physical document
MRZ_VALIDATION_FAILED → ask for clearer image1. POST /v3/id-verification/ → verify document
2. POST /v3/passive-liveness/ → verify real person
3. POST /v3/face-match/ → compare selfie to document portrait
4. POST /v3/aml/ → screen extracted name/DOB/nationality
5. All Approved → fully verified identityexport DIDIT_API_KEY="your_api_key"
python scripts/verify_id.py front.jpg
python scripts/verify_id.py front.jpg back.jpg --vendor-data user-123