1.0.1 • Published 2 years ago
yoonik-face-api v1.0.1
YooniK Face API Client SDK NODE
This repository implements an integration SDK to facilitate the consumption of the YooniK.Face API, an YooniK Services offering.
For more information please contact us.
Requirements
NODE 16 and later
Getting Started
npm install yoonik-face-api
Example
Verifies the faces similarity between two images in base 64
const apiKey = "YOUR-X-API-KEY";
const baseURL = "YOUR-API-ENDPOINT";
const { Face, ImageUtils, VerifyImagesRequest} = require('yoonik-face-api');
const client = new Face({apiKey, baseURL});
const payload = new VerifyImagesRequest();
const iu = new ImageUtils();
(async () => {
try {
const img1 = await iu.imagePath_base64_encode("<IMAGE_PATH>")
payload.setFirstImage(img1);
const img2 = await iu.imagePath_base64_encode("<IMAGE_PATH>")
payload.setSecondImage(img2);
let result = await client.verify_images(payload);
console.log(result);
} catch (error) {
console.error('Exception when calling client.verify_images: ', error);
}
})();
If you're interested in using YooniK.Face API for identification purposes, please visit our examples.