REST quickstart

No SDK, no build step. Four commands.

  1. 1

    Get a key

    bash
    curl -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:

    bash
    export NEETIX_KEY=lv_test_...
  2. 2

    Check liveliness on one selfie

    The cheapest call, and the fastest way to confirm your key works. 1 credit:

    bash
    curl -X POST https://liveliness.neetix.in/v1/liveness \
      -H "Authorization: Bearer $NEETIX_KEY" \
      -F person=@selfie.jpg
    json
    {
      "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–1

    liveness_score is 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: false means 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. 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:

    bash
    curl -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-4821
    json
    {
      "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
      }
    }

    requestId is the server's own handle for the call — quote it in any support question. clientRefId is 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 call

    That response is a live mode: "test" call against production with the same image passed as both person and card — 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_id is 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. 4

    Branch on the verdict

    bash
    VERDICT=$(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

Statusmessage_codeMeaning
401unauthorizedMissing or wrong key
402insufficient_creditsPrepaid balance exhausted — every call fails until top-up
422no_face_detectedNo face in the image; ask for a retake, do not decline
422 is not a rejection

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

bash
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