Skip to main content
@deepidv/server is the official backend-first TypeScript SDK for the deepidv identity verification API. It wraps every REST endpoint in a typed, autocompleting client so you can create hosted verification sessions, scan documents, compare faces, run full identity verification, and screen individuals — without hand-writing HTTP, auth, retries, or file uploads.
This is the server SDK — it holds your API key and is meant to run in a trusted backend (Node.js, Deno, Bun, or an edge runtime). Never ship it to a browser or mobile client.

Why use the SDK

  • Typed end to end. Every input and result is a TypeScript type derived from a Zod schema — your editor autocompletes fields and the compiler catches mistakes before runtime.
  • Thin client. The SDK validates inputs, manages x-api-key auth, retries transient failures, and orchestrates presigned file uploads. All verification logic runs server-side at api.deepidv.com.
  • Web-standards-first. It uses only native web APIs (fetch, AbortController, ReadableStream, Uint8Array), which is what lets it run across Node, Deno, Bun, and Cloudflare Workers.
  • Single dependency. The only production dependency is zod for runtime input validation.

Install

npm install @deepidv/server
The package ships dual ESM + CJS builds with bundled TypeScript declarations, so import and require both work with no extra configuration.

The DeepIDV client

The DeepIDV class is the single entry point. Construct it once with your API key and reuse it — the constructor is cheap and each instance is independent.
import { DeepIDV } from '@deepidv/server';

const client = new DeepIDV({
  apiKey: process.env.DEEPIDV_API_KEY!,
});
See Authentication for API key setup and Configuration for all client options.

Namespace map

Methods are grouped by domain. Each namespace maps onto a part of the REST API:
NamespaceMethodsWhat it doesREST reference
client.sessionscreate, retrieve, list, updateStatusHosted verification sessionsSessions
client.documentscanDocument OCR / data extractionDocument Scan
client.facedetect, compare, estimateAgeFace detection, matching, age estimateFace
client.identityverifyOrchestrated document + face verificationIdentity Verify
client.screeningpepSanctions, adverseMedia, titleCheckSilent screening (PEP/sanctions, adverse media, title check)Silent Screening
client.asyncJobsgetPoll long-running async jobsGet Async Job
The client also exposes client.on(event, listener) for lifecycle events — see Async Jobs & Events.

Three service tiers

TierPatternMethods
SynchronousOne call, one result. Image in, structured data out.document.scan, face.detect, face.compare, face.estimateAge, screening.pepSanctions, screening.titleCheck
OrchestratedOne call, multiple operations coordinated server-side.identity.verify
Session-basedCreate a session, the user completes steps, you retrieve results.sessions.create, sessions.retrieve
AsyncKick off a job, poll for the result.screening.adverseMedia, asyncJobs.get

Supported runtimes

The SDK runs anywhere with native fetch:
FeatureNode.js 18+DenoBunCloudflare Workers
All API methodsYesYesYesYes
File path inputYesYesYesNo
Uint8Array / Buffer inputYesYesYesYes
ReadableStream inputYesYesYesYes
Base64 / data URL inputYesYesYesYes
ESM importYesYesYesYes
CJS requireYesN/AYesN/A
Node.js 18 is the minimum because it’s the first LTS with stable native fetch. On edge runtimes there is no filesystem, so pass a Uint8Array or ReadableStream instead of a file path — see Configuration for proxy, mTLS, and service-binding fetch setups.

Next steps

Quickstart

Install, initialize, and make your first call in two minutes.

Authentication

API key setup, env vars, redaction, and custom fetch.

Session Verification

The hosted flow: create a session, let the user verify, read results.

Server-to-Server

Build a custom pipeline from the document and face primitives.

Resources