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