@cyberlabsai/perse-sdk-js
v0.0.1-alpha.12
Published
The official JavaScript SDK for Perse, by Cyberlabs.
Downloads
6
Readme
perse-sdk-js
How to install
npm install @cyberlabs/perse-sdk-js
How to use
For more information about methods and usage, read our SDK doc
import * as Perse from '@cyberlabs/perse-sdk-js'
setToken
Sets Perse JWT token to allow access to methods.
Read more about how to obtain a JWT token here
Signature: Perse.setToken(YOUR_JWT)
isSimilar
Signature: Perse.face.isSimilar(personFirstImage, personSecondImage)
Read method doc here
Compare
Signature: Perse.face.compare(personFirstImage, personSecondImage)
Read method doc here
Compare Voice
Signature: Perse.voice.compare(firstAudio, secondAudio)
Read method doc here
Detect
Signature: Perse.face.detect(personImage)
Read method doc here
Verify image quality
Signature: Perse.face.quality(personImage)
Read method doc here
Verifying image quality and spoofing
Signature: Perse.face.qualityWithSpoofCheck(personImage)
Read method doc here
Creating enrollment
Signature: Perse.face.enrollment.create(imageFile)
Read method doc here
Read enrollment
Signature: Perse.face.enrollment.read()
Read method doc here
Updating enrollment
Signature: Perse.face.enrollment.update(userToken, imageFile)
Read method doc here
Deleting enrollment
Signature: Perse.face.enrollment.delete(userToken)
Read method doc here
Vue Plugin
If you are using Vue 2:
// main.js
import { VueInstall } from '@cyberlabsai/perse-sdk-js'
Vue.use(VueInstall, YOUR_API_KEY)
// Inside project
this.$Perse.face.detect()
If you are using Vue 3:
// main.js
import { VueNextInstall } from '@cyberlabsai/perse-sdk-js'
createApp(App).use(VueNextInstall, YOUR_API_KEY)
// Inside project
this.$Perse.face.detect()