# Face Verification JavaScript SDK

Client-side JavaScript libraries for web applications. Build powerful face verification features directly in the browser.

# Overview

The VerifEye JavaScript SDK provides client-side libraries for building face verification features in web applications. Works in all modern browsers with WebRTC camera access.

# Available SDKs

# Face Liveness JavaScript SDK

Real-time liveness detection in the browser with webcam access.

# Face Match JavaScript SDK

Compare and verify faces directly in the browser.

# Face Search JavaScript SDK

Search faces in your database from the client side.

# Deep Fake JavaScript SDK

Detect deepfakes and manipulated images in real-time.

# Age/Gender JavaScript SDK

Estimate age and gender from webcam or uploaded images.


# Key Features

  • Browser-Based - No server-side processing needed
  • WebRTC - Direct webcam access
  • Real-Time - Instant feedback
  • Privacy-First - Process images locally
  • Responsive - Works on desktop and mobile browsers
  • TypeScript - Full type definitions included

# Browser Support

Browser Minimum Version
Chrome 90+
Firefox 88+
Safari 14+
Edge 90+
Opera 76+

# Installation

# NPM

npm install @verifeye/js-sdk

# Yarn

yarn add @verifeye/js-sdk

# CDN

<script src="https://cdn.verifeye.com/js-sdk/v1/verifeye.min.js"></script>

# Quick Start

# ES6 Modules

import { FaceLiveness } from '@verifeye/js-sdk';

const liveness = new FaceLiveness({
 apiKey: 'YOUR_API_KEY',
 videoElement: document.getElementById('video')
});

// Start liveness detection
await liveness.start();

liveness.on('result', (result) => {
 if (result.isLive) {
 console.log('Live face detected!', result.confidence);
 }
});

# HTML + Script Tag

<!DOCTYPE html>
<html>
<head>
 <script src="https://cdn.verifeye.com/js-sdk/v1/verifeye.min.js"></script>
</head>
<body>
 <video id="video" autoplay></video>
 <div id="result"></div>

 <script>
 const liveness = new VerifEye.FaceLiveness({
 apiKey: 'YOUR_API_KEY',
 videoElement: document.getElementById('video')
 });

 liveness.start().then(() => {
 console.log('Liveness detection started');
 });

 liveness.on('result', (result) => {
 document.getElementById('result').textContent = 
 result.isLive ? 'Live ' : 'Spoof ';
 });
 </script>
</body>
</html>

# React Example

import React, { useEffect, useRef } from 'react';
import { FaceLiveness } from '@verifeye/js-sdk';

function LivenessDetector() {
 const videoRef = useRef(null);
 const [result, setResult] = React.useState(null);

 useEffect(() => {
 const liveness = new FaceLiveness({
 apiKey: 'YOUR_API_KEY',
 videoElement: videoRef.current
 });

 liveness.start();
 liveness.on('result', setResult);

 return () => liveness.stop();
 }, []);

 return (
 <div>
 <video ref={videoRef} autoPlay />
 {result && (
 <div>{result.isLive ? 'Live ' : 'Spoof '}</div>
 )}
 </div>
 );
}

# Documentation

Each SDK includes comprehensive documentation:

  • Getting Started Guide - Installation and setup
  • API Reference - Complete API documentation
  • Code Examples - React, Vue, Angular examples
  • Release Notes - Version history and changes
  • Migration Guides - Upgrade instructions

# Support


Last updated: 2025-01-13