Using NPM Package

Now, you can use iApp AI API service with NPM (Node Package Manager). It is the api client library for iApp AI API service for Javascript and NodeJS.

Installation

$ npm install iapp_ai_api

Note: This environment is using node 12+ or node 17

Calling Passport OCR API

# Passport OCR required a file path
api.passport_ocr("media/ukr-passport.jpeg");

Example Usages

const iapp_ai = require("iapp_ai")
// ##### API KEY ####
const api = new iapp_ai("{Your API Key}");

async function test(){
    const ret = await api.passport_ocr("media/ukr-passport.jpeg");
    console.log(ret)
}
test()

// output:
//  {
// 'check_composite': '0', 
// 'check_date_of_birth': '2', 
// 'check_expiration_date': '7', 
// 'check_number': '0',
// 'check_personal_number': '7', 
// 'country': 'UKR', 
// 'date_of_birth': '910824', 
// 'expiration_date': '230925', 
// 'face':  ...
// }

Last updated