REST quickstart
No SDK, no build step. Four commands.
- 1
Get a key
bashcurl -X POST https://liveliness.neetix.in/v1/signup \ -H 'Content-Type: application/json' \ -d '{"email":"you@company.com"}'json{ "status": "success", "api_key": "lv_...", "test_api_key": "lv_test_...", "credits": 1000, "monthly_quota": 500 }Export the test key — it is unmetered, so the rest of this page is free:
bashexport NEETIX_KEY=lv_test_... - 2
Check liveliness on one selfie
The cheapest call, and the fastest way to confirm your key works. 1 credit:
bashcurl -X POST https://liveliness.neetix.in/v1/liveness \ -H "Authorization: Bearer $NEETIX_KEY" \ -F person=@selfie.jpgjson{ "status": "Approved", "liveness_score": 97.44, "liveness_status": "genuine", "threshold": 70.0, "liveness_evaluated": true, "face_count": 1, "warnings": [], "attestation": null }Scores are 0–100, not 0–1liveness_scoreis a percentage and the response tells you the cutoff it was compared against (threshold). Do not divide by 100 or assume a fraction.liveness_evaluated: falsemeans the check could not run at all — that is a different situation from a low score, and it is the one worth alerting on. - 3
Match the selfie against an ID photo
The call most onboarding flows actually need — 1:1 face match and liveliness in one request. 2 credits:
bashcurl -X POST https://liveliness.neetix.in/v1/face/face-match \ -H "Authorization: Bearer $NEETIX_KEY" \ -F person=@selfie.jpg \ -F card=@id-photo.jpg \ -F client_ref_id=application-4821json{ "status": "success", "statusCode": 200, "verdict": "approved", "warnings": [], "mode": "test", "requestId": "...", "clientRefId": "application-4821", "result": { "is_same_face": true, "same_face_confidence": 99.98, "cosine_similarity": 1.0, "liveness_score": 97.44, "liveness_status": "genuine", "spoof_detected": false } }requestIdis the server's own handle for the call — quote it in any support question.clientRefIdis echoed back from your request, which is what lets you reconcile a charge in the ledger against an application later.These numbers came from a real callThat response is a live
mode: "test"call against production with the same image passed as bothpersonandcard— which is why the similarity is 1.0. Against two genuine photos of one person, expect a high confidence but not a perfect one.client_ref_idis your own identifier. It comes back on the response and in the ledger, which is what makes a charge reconcilable against an application months later — always send it. - 4
Branch on the verdict
bashVERDICT=$(curl -s -X POST https://liveliness.neetix.in/v1/face/face-match \ -H "Authorization: Bearer $NEETIX_KEY" \ -F person=@selfie.jpg -F card=@id-photo.jpg \ | python3 -c 'import json,sys; print(json.load(sys.stdin)["verdict"])') case "$VERDICT" in approved) echo "continue" ;; review) echo "queue for a human" ;; declined) echo "stop" ;; esac
Errors worth handling
| Status | message_code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or wrong key |
| 402 | insufficient_credits | Prepaid balance exhausted — every call fails until top-up |
| 422 | no_face_detected | No face in the image; ask for a retake, do not decline |
no_face_detected means the capture failed, not that the person failed. Treat
it as a retake prompt. Declining on it rejects genuine users whose photo was
dark or cropped.
Check your balance
curl https://liveliness.neetix.in/v1/billing/balance \
-H "Authorization: Bearer $NEETIX_KEY"With a test key this reports metered: false and a synthetic balance — proof
that you are not being charged.
Next
- Get started — verdicts, warnings and credits in depth.
- API reference — every endpoint and field.