Skip to main content
Every option accepted by the DeepIDV constructor, with defaults and behavior.

Options

Retry & timeout behavior

Retries. The SDK automatically retries only transient failures — HTTP 429 (rate limited) and 5xx (server errors). It never retries 4xx client errors, since those indicate a bug in the request that a retry won’t fix. After maxRetries attempts are exhausted, the original typed error (e.g. RateLimitError) is thrown.
A few methods opt out of retries deliberately. screening.pepSanctions and screening.titleCheck are sent with maxRetries: 0 because the server bounds an un-cancellable upstream and returns 503 on breach without billing — an immediate retry would just hit the same slow path. See Screening.
Backoff. Delay between attempts uses exponential backoff with jitter: random(0, initialRetryDelay * 2^attempt). When a 429 carries a Retry-After header, that value is respected. Timeouts. timeout and uploadTimeout are per attempt, not total — every retry gets a fresh timer. A single attempt exceeding its budget throws a TimeoutError. You can observe retries and timing in real time via the retry and response events.

Examples

Minimal

Full configuration

No retries

Fast timeout (low-latency use case)

Custom fetch with a proxy

Cloudflare Workers service binding

Validation

All options are validated synchronously at construction time with a Zod schema (DeepIDVConfigSchema). Validation failures throw a ValidationError before any network call:

Resolved configuration

After construction, all defaults are applied. The internal resolved shape has every field required: