Skip to main content
Get from zero to a verification result in under two minutes.

1. Install

npm install @deepidv/server

2. Initialize the client

Create one client and reuse it across requests. The API key is read from an environment variable — never hardcode it.
import { DeepIDV } from '@deepidv/server';

const client = new DeepIDV({
  apiKey: process.env.DEEPIDV_API_KEY!,
});
Get an API key from the API Authentication page in your deepidv account.

3. Create a verification session

The fastest path to a verified identity — create a hosted session and send the user to the returned URL:
const session = await client.sessions.create({
  firstName: 'Jane',
  lastName: 'Doe',
  email: 'jane@example.com',
  phone: '+15551234567',
});

console.log(session.sessionUrl);
// → "https://verify.deepidv.com/session/abc123"
// Send this URL to your user
When the user finishes, retrieve the result with client.sessions.retrieve(session.id). See the Session Verification guide for the full flow.

Prefer to build your own flow?

If you handle the applicant UI yourself, call the primitives directly.

Scan a document

import { readFileSync } from 'node:fs';

const result = await client.document.scan({
  image: readFileSync('drivers-license.jpg'),
});

console.log(result.fullName); // "Jane Doe"
console.log(result.dateOfBirth); // "1990-01-15"
console.log(result.documentNumber); // "D1234567"
console.log(result.confidence); // 0.97

Compare two faces

const match = await client.face.compare({
  source: readFileSync('id-photo.jpg'),
  target: readFileSync('selfie.jpg'),
});

console.log(match.isMatch); // true
console.log(match.confidence); // 94 (0–100 scale)

Full identity verification

Document scan + face detection + face comparison in a single call:
const verification = await client.identity.verify({
  documentImage: readFileSync('passport.jpg'),
  faceImage: readFileSync('selfie.jpg'),
});

console.log(verification.verified); // true
console.log(verification.overallConfidence); // 96
console.log(verification.document.fullName); // "Jane Doe"
console.log(verification.faceMatch.isMatch); // true

Next steps

Authentication

API key setup and security best practices.

Configuration

Timeouts, retries, base URL, and custom fetch.

Server-to-Server

Build a custom verification pipeline.

Error Handling

Typed errors, the decision tree, and retry semantics.