Skip to main content
The ID-Selfie Model verifies a person’s identity by matching their ID document against a selfie image or video. It performs face matching and anti-spoofing checks.

How It Works

  1. Upload an ID document (passport, driver license, etc.)
  2. Upload a selfie image or video of the person
  3. The API compares the faces and runs anti-spoofing checks
  4. You receive a verified boolean and detailed technical checks

Verifying Identity

Submit both files via POST /v1/verification:
curl -X POST https://api.deepxl.ai/v1/verification \
  -H "x-api-key: YOUR_API_KEY" \
  -F "idFile=@passport.jpg" \
  -F "selfieFile=@selfie.jpg" \
  -F 'tags={"customerId":"9999"}'

Parameters

ParameterTypeRequiredDescription
idFilefileYesID document image (passport, driver license, etc.)
selfieFilefileYesSelfie image or video of the person
tagsstringNoJSON object with metadata key-value pairs

Supported File Types

ID document: jpg, jpeg, png, webp Selfie: jpg, jpeg, png, webp, mp4 (video)

Response Structure

{
  "result": {
    "verificationId": 5,
    "idFileType": "jpeg",
    "idFileName": "passport.jpg",
    "idFileSize": 174112,
    "selfieFileType": "jpeg",
    "selfieFileName": "selfie.jpg",
    "selfieFileSize": 250118,
    "timestamp": 1770984835,
    "timestampISO": "2026-02-13T13:13:55.213189",
    "model": "verification",
    "modelVersion": "1.0.0",
    "verified": true,
    "modelResults": {
      "technicalChecks": [
        {
          "checkType": "face_detection",
          "faceCount": { "id": 2, "selfie": 1 },
          "idFaces": [
            {
              "faceId": "face_1",
              "detectionConfidence": 0.9992,
              "landmarks": {
                "nose": { "x": 257.7, "y": 946.13 },
                "left_eye": { "x": 287.49, "y": 911.67 },
                "right_eye": { "x": 227.69, "y": 911.25 },
                "mouth_left": { "x": 283.88, "y": 971.12 },
                "mouth_right": { "x": 232.78, "y": 971.0 }
              },
              "boundingBox": { "x1": 195, "x2": 318, "y1": 838, "y2": 1013 }
            },
            {
              "faceId": "face_2",
              "detectionConfidence": 0.9865,
              "landmarks": {
                "nose": { "x": 696.46, "y": 885.83 },
                "left_eye": { "x": 701.44, "y": 879.83 },
                "right_eye": { "x": 690.77, "y": 880.29 },
                "mouth_left": { "x": 701.06, "y": 891.11 },
                "mouth_right": { "x": 692.61, "y": 891.52 }
              },
              "boundingBox": { "x1": 684, "x2": 707, "y1": 866, "y2": 898 }
            }
          ],
          "selfieFaces": [
            {
              "faceId": "face_1",
              "detectionConfidence": 0.9985,
              "landmarks": {
                "nose": { "x": 724.91, "y": 807.64 },
                "left_eye": { "x": 803.63, "y": 708.27 },
                "right_eye": { "x": 649.76, "y": 710.14 },
                "mouth_left": { "x": 793.35, "y": 871.12 },
                "mouth_right": { "x": 659.28, "y": 871.8 }
              },
              "boundingBox": { "x1": 569, "x2": 884, "y1": 523, "y2": 986 }
            }
          ]
        }
      ]
    },
    "tags": [
      { "name": "customerId", "value": "9999" }
    ],
    "files": [
      {
        "category": "id",
        "fileName": "passport.jpg",
        "fileSize": 174112,
        "contentType": "image/jpeg",
        "timestamp": 1770984835,
        "timestampISO": "2026-02-13T13:13:55.213189",
        "url": "https://api.deepxl.ai/v1/files/v_id_5_passport.jpg"
      },
      {
        "category": "face",
        "fileName": "selfie.jpg",
        "fileSize": 250118,
        "contentType": "image/jpeg",
        "timestamp": 1770984835,
        "timestampISO": "2026-02-13T13:13:55.213189",
        "url": "https://api.deepxl.ai/v1/files/v_face_5_selfie.jpg"
      }
    ]
  }
}

Field Reference

FieldTypeDescription
verificationIdintegerUnique identifier for the verification record
idFileTypestringFile extension of the ID document
idFileNamestringOriginal file name of the ID document
idFileSizeintegerFile size of the ID document in bytes
selfieFileTypestringFile extension of the selfie
selfieFileNamestringOriginal file name of the selfie
selfieFileSizeintegerFile size of the selfie in bytes
timestampintegerUnix timestamp of the analysis
timestampISOstringISO 8601 timestamp of the analysis
modelstringModel used (verification)
modelVersionstringVersion of the model used for analysis
verifiedbooleanWhether the identity was confirmed

Verified

The verified field is a boolean indicating whether the identity was confirmed — the face in the selfie matches the face in the ID document and anti-spoofing checks passed.

Technical Checks

The modelResults.technicalChecks array contains face detection results for both the ID document and the selfie. Face Detection (checkType: "face_detection"):
FieldTypeDescription
faceCountobjectNumber of faces detected — id count and selfie count
idFacesarrayFaces detected in the ID document
selfieFacesarrayFaces detected in the selfie
Each face object includes:
FieldTypeDescription
faceIdstringFace identifier (e.g. face_1, face_2)
detectionConfidencefloatFace detection confidence (0.0–1.0)
landmarksobjectFacial landmark coordinates (nose, left_eye, right_eye, mouth_left, mouth_right)
boundingBoxobjectFace bounding box coordinates (x1, y1, x2, y2)

File Categories

CategoryDescription
idThe uploaded ID document
faceThe uploaded selfie image or video

Tags and Filtering

curl "https://api.deepxl.ai/v1/verification?tagFilter=customerId=9999" \
  -H "x-api-key: YOUR_API_KEY"

Browsing History

curl "https://api.deepxl.ai/v1/verification?limit=25&offset=0&sortBy=verificationId&direction=desc" \
  -H "x-api-key: YOUR_API_KEY"

Sort Options

verificationId, idFileName, idFileSize, idFileType, selfieFileName, selfieFileSize, selfieFileType, verified, timestamp