Flutter quickstart
- 1
Add the dependency
yaml# pubspec.yaml dependencies: neetix_liveliness: git: url: https://github.com/neetixai/liveliness-sdks.git path: packages/flutter ref: "0.2.0"bashflutter pub get - 2
Get a test key
bashcurl -X POST https://liveliness.neetix.in/v1/signup \ -H 'Content-Type: application/json' \ -d '{"email":"you@company.com"}'The client can also mint one with no auth at all:
dartfinal s = await NeetixClient().signup('you@company.com'); // s.apiKey is shown once — 1,000 free creditsA key in a Flutter app is extractableDart compiles to a bundle an attacker can read, on mobile and on web. Use a test key while building; in production mint short-lived keys from your own backend.
- 3
Make the call
dartimport 'dart:io'; import 'package:neetix_liveliness/neetix_liveliness.dart'; final nx = NeetixClient(apiKey: 'YOUR_KEY'); final selfie = await File('selfie.jpg').readAsBytes(); final card = await File('id.jpg').readAsBytes(); final res = await nx.faceMatch(selfie, card, clientRefId: 'application-4821'); print(res.verdict); // "approved" | "review" | "declined" print(res.isSameFace); print(res.warnings.length);With
image_picker, the bytes come straight from the picked file:dartfinal picked = await ImagePicker().pickImage(source: ImageSource.camera); final selfie = await picked!.readAsBytes(); - 4
Branch on the verdict
dartswitch (res.verdict) { case 'approved': continueJourney(); case 'review': queueForReview(res.warnings); case 'declined': stop(res.warnings); }
Liveliness on its own
dart
final live = await nx.liveness(selfie);
print(live.status); // "Approved" | "Declined" | "Not Finished"
print(live.livenessScore);What else is available
| Method | Endpoint | Credits |
|---|---|---|
faceMatch(person, card, …) | POST /v1/face/face-match | 2 |
liveness(person) | POST /v1/liveness | 1 |
ageCheck(person) | POST /v1/age | 1 |
authEnroll / authVerify | POST /v1/auth/* | 1 each |
faceEnroll / faceSearch | POST /v1/face/enroll, /search | 1 each |
templateProtect / templateVerify | POST /v1/template/* | 1 each |
amlScreen(name, …) | POST /v1/aml/screen | 1 |
kybValidate(gstin:, pan:, cin:) | POST /v1/kyb/validate | 2 |
mrzParse(mrz) | POST /v1/document/mrz | 1 |
documentId(back:, front:) | POST /v1/document/id | 2 |
workflowRun(checks: …) | POST /v1/workflow/run | 3 |
balance() / ledger(limit:) | GET /v1/billing/* | — |
Next
- Get started — verdicts, warnings and credits.
- REST API — what the client calls underneath.