> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepxl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify user with their ID and selfie

> Verify a user's identity by uploading an ID document and a selfie.

The system compares the face in the ID with the selfie and performs liveness checks to ensure the person is real.

**Required Files:**
- `idFile` - ID document image or PDF (driver license, passport, etc.)
- `selfieFile` - Selfie still image **or** selfie video (e.g. mp4, mov, webm), same field name for both

**Tags Parameter:**
Pass optional metadata as a JSON object to organize and filter your verification results.

**Recommended tag fields:**
| Field | Description | Example |
|-------|-------------|---------|
| `customerId` | Your customer's unique identifier | `"9999"` |
| `customerName` | Customer or account name | `"Acme Corp"` |
| `documentId` | Your internal document reference | `"DOC-2024-001"` |
| `companyName` | Company name | `"DeepXL"` |
| `companyId` | Company identifier | `"COMP-001"` |

**Example tags value:** `{"customerId":"9999","customerName":"Acme Corp","documentId":"DOC-2024-001","companyName":"DeepXL","companyId":"COMP-001"}`

You can filter results by tags using the GET endpoint: `?tagFilter=customerId=9999`



## OpenAPI

````yaml /openapi.json post /v1/verification
openapi: 3.1.0
info:
  title: DeepXL API
  description: >-
    Professional document analysis and verification API for fraud detection,
    identity verification, and data extraction.
  contact:
    name: DeepXL Support
    url: https://deepxl.ai/contact
    email: hello@deepxl.ai
  version: 1.1.0
servers:
  - url: https://api.deepxl.ai
    description: Production
security: []
tags:
  - name: Fraud Detection
    description: Detect manipulated or AI-generated content in documents and images.
  - name: Document Parsing
    description: Extract structured data from IDs, bank statements, and pay stubs.
  - name: ID Verification
    description: Match an ID document against a selfie.
  - name: File Retrieval
    description: Fetch original uploads or generated heatmaps from a prior analysis.
paths:
  /v1/verification:
    post:
      tags:
        - ID Verification
      summary: Verify user with their ID and selfie
      description: >-
        Verify a user's identity by uploading an ID document and a selfie.


        The system compares the face in the ID with the selfie and performs
        liveness checks to ensure the person is real.


        **Required Files:**

        - `idFile` - ID document image or PDF (driver license, passport, etc.)

        - `selfieFile` - Selfie still image **or** selfie video (e.g. mp4, mov,
        webm), same field name for both


        **Tags Parameter:**

        Pass optional metadata as a JSON object to organize and filter your
        verification results.


        **Recommended tag fields:**

        | Field | Description | Example |

        |-------|-------------|---------|

        | `customerId` | Your customer's unique identifier | `"9999"` |

        | `customerName` | Customer or account name | `"Acme Corp"` |

        | `documentId` | Your internal document reference | `"DOC-2024-001"` |

        | `companyName` | Company name | `"DeepXL"` |

        | `companyId` | Company identifier | `"COMP-001"` |


        **Example tags value:** `{"customerId":"9999","customerName":"Acme
        Corp","documentId":"DOC-2024-001","companyName":"DeepXL","companyId":"COMP-001"}`


        You can filter results by tags using the GET endpoint:
        `?tagFilter=customerId=9999`
      operationId: verify_v1_verification_post
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_verify_v1_verification_post'
      responses:
        '200':
          description: Verification completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationResponse'
              example:
                result:
                  verificationId: 457
                  idFileType: jpeg
                  idFileName: passport.jpg
                  idFileSize: 234567
                  selfieFileType: jpeg
                  selfieFileName: live_selfie.jpg
                  selfieFileSize: 112233
                  model: verification
                  country: us
                  verified: true
                  modelResults:
                    technicalChecks:
                      - type: FACE_MATCH
                        status: PASS
                        confidence: 0.97
                        details: 'Face match confidence: 97%'
                      - type: LIVENESS
                        status: PASS
                        confidence: 0.99
                        details: Liveness check passed
                      - type: ID_QUALITY
                        status: PASS
                        confidence: 0.92
                        details: ID document quality is acceptable
                  timestamp: 1725795600
                  timestampISO: '2024-09-08T10:00:00.000000'
                  tags:
                    - name: customerId
                      value: '9999'
                    - name: customerName
                      value: Acme Corp
                    - name: documentId
                      value: DOC-2024-001
                    - name: companyName
                      value: DeepXL
                    - name: companyId
                      value: COMP-001
                  files:
                    - category: id
                      fileName: passport.jpg
                      fileSize: 234567
                      contentType: image/jpeg
                      timestamp: 1725795600
                      timestampISO: '2024-09-08T10:00:00.000000'
                      url: https://api.deepxl.ai/v1/files/v_id_457_passport.jpg
                    - category: face
                      fileName: live_selfie.jpg
                      fileSize: 112233
                      contentType: image/jpeg
                      timestamp: 1725795600
                      timestampISO: '2024-09-08T10:00:00.000000'
                      url: >-
                        https://api.deepxl.ai/v1/files/v_face_457_live_selfie.jpg
        '400':
          description: Invalid request - missing required files or invalid JSON in tags
        '401':
          description: Authentication required - API key or Clerk token missing/invalid
        '415':
          description: >-
            Unsupported media type - file type not supported by verification
            model
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
      security:
        - API Key: []
components:
  schemas:
    Body_verify_v1_verification_post:
      properties:
        idFile:
          type: string
          contentMediaType: application/octet-stream
          title: Idfile
        selfieFile:
          type: string
          contentMediaType: application/octet-stream
          title: Selfiefile
        tags:
          anyOf:
            - type: string
            - type: 'null'
          title: Tags
          description: >-
            Optional JSON object with key-value pairs for organizing and
            querying results. Example: {"customerId":"9999","customerName":"Acme
            Corp","documentId":"DOC-2024-001","companyName":"DeepXL","companyId":"COMP-001"}.
            Common keys: customerId, customerName, documentId, companyName,
            companyId.
          default: '{}'
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: >-
            Optional country hint. Supported values: us, mx, br. Defaults to us
            when omitted or invalid.
      type: object
      required:
        - idFile
        - selfieFile
      title: Body_verify_v1_verification_post
    VerificationResponse:
      properties:
        result:
          $ref: '#/components/schemas/Verification'
          description: The verification result
      type: object
      required:
        - result
      title: VerificationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Verification:
      properties:
        verificationId:
          type: integer
          title: Verificationid
          description: Unique identifier for the verification record
        idFileType:
          type: string
          title: Idfiletype
          description: File extension of the ID document (e.g. jpeg, png)
        idFileName:
          type: string
          title: Idfilename
          description: Original file name of the ID document
        idFileSize:
          type: integer
          title: Idfilesize
          description: ID document file size in bytes
        selfieFileType:
          type: string
          title: Selfiefiletype
          description: File extension of the selfie (e.g. jpeg, png)
        selfieFileName:
          type: string
          title: Selfiefilename
          description: Original file name of the selfie
        selfieFileSize:
          type: integer
          title: Selfiefilesize
          description: Selfie file size in bytes
        timestamp:
          type: integer
          title: Timestamp
          description: Unix timestamp of when the verification was performed
        timestampISO:
          type: string
          title: Timestampiso
          description: ISO 8601 timestamp of when the verification was performed
        model:
          type: string
          title: Model
          description: Model used for verification
        modelVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelversion
          description: Version of the model used (e.g. 1.0.0)
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Normalized country hint applied to this verification (us, mx, br)
        verified:
          type: boolean
          title: Verified
          description: Whether the identity was verified successfully
        modelResults:
          additionalProperties: true
          type: object
          title: Modelresults
          description: Technical check results including face match and liveness scores
        tags:
          items:
            $ref: '#/components/schemas/Tag'
          type: array
          title: Tags
          description: Metadata tags attached to this verification
          default: []
        files:
          items:
            $ref: '#/components/schemas/FileData'
          type: array
          title: Files
          description: Associated files (ID document and selfie)
          default: []
      type: object
      required:
        - verificationId
        - idFileType
        - idFileName
        - idFileSize
        - selfieFileType
        - selfieFileName
        - selfieFileSize
        - timestamp
        - timestampISO
        - model
        - verified
        - modelResults
      title: Verification
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Tag:
      properties:
        name:
          type: string
          title: Name
          description: Tag key name
        value:
          type: string
          title: Value
          description: Tag value
      type: object
      required:
        - name
        - value
      title: Tag
    FileData:
      properties:
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: File category (e.g. original_file, heatmap, id, face)
        fileName:
          type: string
          title: Filename
          description: Name of the file
        fileSize:
          type: integer
          title: Filesize
          description: File size in bytes
        contentType:
          type: string
          title: Contenttype
          description: MIME content type (e.g. image/jpeg, application/pdf)
        timestamp:
          type: integer
          title: Timestamp
          description: Unix timestamp of when the file was created
        timestampISO:
          type: string
          title: Timestampiso
          description: ISO 8601 timestamp of when the file was created
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: URL to retrieve the file via GET /v1/files/{fileName}
      type: object
      required:
        - fileName
        - fileSize
        - contentType
        - timestamp
        - timestampISO
      title: FileData
  securitySchemes:
    API Key:
      type: apiKey
      description: API key created in the dashboard
      in: header
      name: x-api-key

````