@cyberlabsai/perse-sdk-lite
v0.0.1-alpha.5
Published
The official JavaScript SDK Lite for Perse, by Cyberlabs.
Downloads
7
Readme
perse-sdk-lite
Perse SDK lite is an easy way to access Perse's API.
How to install
npm install @cyberlabsai/perse-sdk-lite
How to use it
For more information read our API docs
It's important to notice that this SDK follows Js pattern, so we use the object keys as cammelCase
not snake_case
.
So, properties as user_token
inside SDK you can access as userToken
.
import Perse from '@cyberlabsai/perse-sdk-lite'
Perse.init(YOUR_API KEY)
// if you a using CDN
Perse.default.init(YOUR_API_KEY)
Perse.default.face.detect(myImage)
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)
Compare
Signature: Perse.face.compare(personFirstImage, personSecondImage)
Read API doc here
Detect
Signature: Perse.face.detect(personImage)
Read API doc here
Create Enrollment
Signature: Perse.face.enrollment.create(personImage)
Read API doc here
Delete Enrollment
Signature: Perse.face.enrollment.delete(userToken)
Read API doc here
List Users Enrollment
Signature: Perse.face.enrollment.read()
Read API doc here
Update Users Enrollment
Signature: Perse.face.enrollment.update(userToken, imageFile)
Read API doc here
Compare Voice
Signature: Perse.face.voice.compare(userToken, imageFile)
Read API doc here