Didit ID Verification API
Overview
Verifies identity documents by submitting images of the front and back sides. Performs OCR extraction, MRZ parsing, authenticity checks, and document liveness detection.
Key constraints:
- Supported formats: JPEG, PNG, WebP, TIFF
- Maximum file size: 5MB per image
- All document corners must be visible, full-color, no glare/shadows
- Original real-time photos only (no screenshots, scans, or digital copies)
Coverage: 4,000+ document types, 220+ countries, 130+ languages. Supports passports, national ID cards, driver's licenses, and residence permits.
Processing pipeline:
- Intelligent capture & document type detection
- OCR text extraction + MRZ/barcode parsing
- Template matching, security feature validation, tamper detection
- Document liveness (detects screen captures, printed copies, portrait manipulation)
API Reference: https://docs.didit.me/reference/id-verification-standalone-api
Authentication
All requests require x-api-key header. Get your key from Didit Business Console → API & Webhooks.
Endpoint
POST https://verification.didit.me/v3/id-verification/
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 |
Constraints |
Description |
front_image |
file |
Yes |
— |
JPEG/PNG/WebP/TIFF, max 5MB |
Front image of ID document |
back_image |
file |
No |
— |
Same as above |
Back image (when applicable) |
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/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,
});
Response (200 OK)
{
"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 Values
| Status |
Meaning |
"Approved" |
Document verified successfully |
"Declined" |
Verification failed (see warnings) |
"In Review" |
Requires 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" |
document_type |
string |
"Passport", "Identity Card", "Driver's License", "Residence Permit" |
document_number |
string |
Document ID number |
personal_number |
string |
Personal/national ID number |
first_name, last_name, full_name |
string |
Extracted name fields |
date_of_birth |
string |
YYYY-MM-DD |
age |
integer |
Calculated age |
gender |
string |
"M", "F", "U" |
nationality, issuing_state |
string |
ISO 3166-1 alpha-3 |
expiration_date, date_of_issue |
string |
YYYY-MM-DD |
portrait_image |
string |
Base64-encoded portrait from document |
mrz |
object |
Machine Readable Zone data |
parsed_address |
object |
Geocoded address: {city, region, postal_code, country, street_1} |
warnings |
array |
{risk, log_type, short_description, long_description} |
Warning Tags
Auto-Decline (always)
| Tag |
Description |
ID_DOCUMENT_IN_BLOCKLIST |
Document in blocklist (previously flagged) |
PORTRAIT_IMAGE_NOT_DETECTED |
No portrait found on document |
DOCUMENT_EXPIRED |
Document expiration date has passed |
DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION |
Document type not accepted |
Configurable (Decline / Review / Approve)
| Category |
Tags |
| Document liveness |
SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED |
| MRZ issues |
MRZ_NOT_DETECTED, MRZ_VALIDATION_FAILED, MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME |
| Data issues |
NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED, DOCUMENT_NUMBER_NOT_DETECTED, DATA_INCONSISTENT |
| Duplicates |
POSSIBLE_DUPLICATED_USER |
| Expected mismatch |
FULL_NAME_MISMATCH_WITH_PROVIDED, DOB_MISMATCH_WITH_PROVIDED, GENDER_MISMATCH_WITH_PROVIDED |
| Geolocation |
DOCUMENT_COUNTRY_MISMATCH |
Common Workflows
Basic ID Verification
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 image
Full Identity Verification Pipeline
1. 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 identity
Utility Scripts
export 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
1---
2name: didit-id-verification
3description: >
4 Integrate Didit ID Verification standalone API to verify identity documents.
5 Use when the user wants to verify an ID, passport, driver's license, residence permit,
6 or identity document using Didit, or mentions ID verification, document verification,
7 OCR extraction, MRZ parsing, KYC document checks, or document authenticity validation.
8 Supports 4000+ document types across 220+ countries.
9version: 1.2.0
10metadata:
11 source: https://skillmd.com/skills/modbender/didit-id-verification
12 openclaw:
13 requires:
14 env:
15 - DIDIT_API_KEY
16 primaryEnv: DIDIT_API_KEY
17 emoji: "📋"
18 homepage: https://docs.didit.me
19---
20
21# Didit ID Verification API
22
23## Overview
24
25Verifies identity documents by submitting images of the front and back sides. Performs OCR extraction, MRZ parsing, authenticity checks, and document liveness detection.
26
27**Key constraints:**
28- Supported formats: **JPEG, PNG, WebP, TIFF**
29- Maximum file size: **5MB** per image
30- All document corners must be visible, full-color, no glare/shadows
31- Original real-time photos only (no screenshots, scans, or digital copies)
32
33**Coverage:** 4,000+ document types, 220+ countries, 130+ languages. Supports passports, national ID cards, driver's licenses, and residence permits.
34
35**Processing pipeline:**
361. Intelligent capture & document type detection
372. OCR text extraction + MRZ/barcode parsing
383. Template matching, security feature validation, tamper detection
394. Document liveness (detects screen captures, printed copies, portrait manipulation)
40
41**API Reference:** https://docs.didit.me/reference/id-verification-standalone-api
42
43---
44
45## Authentication
46
47All requests require `x-api-key` header. Get your key from [Didit Business Console](https://business.didit.me) → API & Webhooks.
48
49---
50
51## Endpoint
52
53```
54POST https://verification.didit.me/v3/id-verification/
55```
56
57### Headers
58
59| Header | Value | Required |
60|---|---|---|
61| `x-api-key` | Your API key | **Yes** |
62| `Content-Type` | `multipart/form-data` | **Yes** |
63
64### Request Parameters (multipart/form-data)
65
66| Parameter | Type | Required | Default | Constraints | Description |
67|---|---|---|---|---|---|
68| `front_image` | file | **Yes** | — | JPEG/PNG/WebP/TIFF, max 5MB | Front image of ID document |
69| `back_image` | file | No | — | Same as above | Back image (when applicable) |
70| `save_api_request` | boolean | No | `true` | — | Save in Business Console Manual Checks |
71| `vendor_data` | string | No | — | — | Your identifier for session tracking |
72
73### Example
74
75```python
76import requests
77
78response = requests.post(
79 "https://verification.didit.me/v3/id-verification/",
80 headers={"x-api-key": "YOUR_API_KEY"},
81 files={
82 "front_image": ("front.jpg", open("front.jpg", "rb"), "image/jpeg"),
83 "back_image": ("back.jpg", open("back.jpg", "rb"), "image/jpeg"),
84 },
85 data={"vendor_data": "user-123"},
86)
87```
88
89```typescript
90const formData = new FormData();
91formData.append("front_image", frontImageFile);
92formData.append("back_image", backImageFile);
93formData.append("vendor_data", "user-123");
94
95const response = await fetch("https://verification.didit.me/v3/id-verification/", {
96 method: "POST",
97 headers: { "x-api-key": "YOUR_API_KEY" },
98 body: formData,
99});
100```
101
102### Response (200 OK)
103
104```json
105{
106 "request_id": "a1b2c3d4-...",
107 "id_verification": {
108 "status": "Approved",
109 "document_type": "Identity Card",
110 "document_number": "YZA123456",
111 "personal_number": "X9876543L",
112 "first_name": "Elena",
113 "last_name": "Martínez Sánchez",
114 "full_name": "Elena Martínez Sánchez",
115 "date_of_birth": "1985-03-15",
116 "age": 40,
117 "gender": "F",
118 "nationality": "ESP",
119 "issuing_state": "ESP",
120 "issuing_state_name": "Spain",
121 "expiration_date": "2030-08-21",
122 "date_of_issue": "2020-08-21",
123 "address": "Calle Mayor 10, Madrid",
124 "formatted_address": "Calle Mayor 10, 28013 Madrid, Spain",
125 "place_of_birth": "Valencia",
126 "portrait_image": "<base64>",
127 "front_document_image": "<base64>",
128 "back_document_image": "<base64>",
129 "mrz": {
130 "surname": "MARTINEZ SANCHEZ",
131 "given_name": "ELENA",
132 "document_type": "I",
133 "document_number": "YZA123456",
134 "country": "ESP",
135 "nationality": "ESP",
136 "birth_date": "850315",
137 "expiry_date": "300821",
138 "sex": "F"
139 },
140 "parsed_address": {"city": "Madrid", "region": "...", "postal_code": "28013", "country": "ES"},
141 "warnings": []
142 },
143 "created_at": "2025-05-01T13:11:07.977806Z"
144}
145```
146
147### Status Values
148
149| Status | Meaning |
150|---|---|
151| `"Approved"` | Document verified successfully |
152| `"Declined"` | Verification failed (see `warnings`) |
153| `"In Review"` | Requires manual review |
154
155### Error Responses
156
157| Code | Meaning | Action |
158|---|---|---|
159| `400` | Invalid request | Check file format, size, parameters |
160| `401` | Invalid API key | Verify `x-api-key` header |
161| `403` | Insufficient credits | Top up at business.didit.me |
162
163---
164
165## Response Field Reference
166
167| Field | Type | Description |
168|---|---|---|
169| `status` | string | `"Approved"`, `"Declined"`, `"In Review"` |
170| `document_type` | string | `"Passport"`, `"Identity Card"`, `"Driver's License"`, `"Residence Permit"` |
171| `document_number` | string | Document ID number |
172| `personal_number` | string | Personal/national ID number |
173| `first_name`, `last_name`, `full_name` | string | Extracted name fields |
174| `date_of_birth` | string | `YYYY-MM-DD` |
175| `age` | integer | Calculated age |
176| `gender` | string | `"M"`, `"F"`, `"U"` |
177| `nationality`, `issuing_state` | string | ISO 3166-1 alpha-3 |
178| `expiration_date`, `date_of_issue` | string | `YYYY-MM-DD` |
179| `portrait_image` | string | Base64-encoded portrait from document |
180| `mrz` | object | Machine Readable Zone data |
181| `parsed_address` | object | Geocoded address: `{city, region, postal_code, country, street_1}` |
182| `warnings` | array | `{risk, log_type, short_description, long_description}` |
183
184---
185
186## Warning Tags
187
188### Auto-Decline (always)
189
190| Tag | Description |
191|---|---|
192| `ID_DOCUMENT_IN_BLOCKLIST` | Document in blocklist (previously flagged) |
193| `PORTRAIT_IMAGE_NOT_DETECTED` | No portrait found on document |
194| `DOCUMENT_EXPIRED` | Document expiration date has passed |
195| `DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION` | Document type not accepted |
196
197### Configurable (Decline / Review / Approve)
198
199| Category | Tags |
200|---|---|
201| **Document liveness** | `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`, `PORTRAIT_MANIPULATION_DETECTED` |
202| **MRZ issues** | `MRZ_NOT_DETECTED`, `MRZ_VALIDATION_FAILED`, `MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME` |
203| **Data issues** | `NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`, `DATA_INCONSISTENT` |
204| **Duplicates** | `POSSIBLE_DUPLICATED_USER` |
205| **Expected mismatch** | `FULL_NAME_MISMATCH_WITH_PROVIDED`, `DOB_MISMATCH_WITH_PROVIDED`, `GENDER_MISMATCH_WITH_PROVIDED` |
206| **Geolocation** | `DOCUMENT_COUNTRY_MISMATCH` |
207
208---
209
210## Common Workflows
211
212### Basic ID Verification
213
214```
2151. POST /v3/id-verification/ → front_image (+ back_image if applicable)
2162. If "Approved" → extract first_name, last_name, date_of_birth, document_number
217 If "Declined" → check warnings:
218 DOCUMENT_EXPIRED → ask for valid document
219 SCREEN_CAPTURE_DETECTED → ask for real photo of physical document
220 MRZ_VALIDATION_FAILED → ask for clearer image
221```
222
223### Full Identity Verification Pipeline
224
225```
2261. POST /v3/id-verification/ → verify document
2272. POST /v3/passive-liveness/ → verify real person
2283. POST /v3/face-match/ → compare selfie to document portrait
2294. POST /v3/aml/ → screen extracted name/DOB/nationality
2305. All Approved → fully verified identity
231```
232
233---
234
235## Utility Scripts
236
237```bash
238export DIDIT_API_KEY="your_api_key"
239
240python scripts/verify_id.py front.jpg
241python scripts/verify_id.py front.jpg back.jpg --vendor-data user-123
242```