Verification Channels

These are the stateless biometric channels. Nothing is stored: each call takes the images you submit, returns a result, and retains no face on your behalf. If you need a reusable face record, see Face Gallery instead.


1. Image Input Format

All biometric channels accept images in either of two forms, and the same validation applies to every image field:

  • Base64 data URI — data:image/jpeg;base64,... or data:image/png;base64,.... Raw base64 without the data-URI prefix is also accepted.
  • HTTPS URL — a publicly reachable link to a .jpg or .png. Prembly fetches the image server-side, so the URL must not require authentication.

Only JPEG and PNG are supported. For reliable matching, submit a front-facing image with the full face visible, no heavy occlusion (sunglasses, masks, deep shadow), and at least 480px across the face region.


2. Face Comparison

Compares two face images and returns a similarity score. Use it when you already hold a trusted reference photo — a document portrait you extracted earlier, a stored onboarding selfie, or a profile image — and need to confirm a new capture belongs to the same person.

POST https://api.prembly.com/api/v1/verification/api/image_comparison/
X-API-Key: <your_api_key>
Content-Type: application/json

{
  "image_one": "https://cdn.example.com/document-portrait.jpg",
  "image_two": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..."
}
{
  "message": "Face Match",
  "confidence": 100
}

image_one is the reference image (typically the document or registry portrait); image_two is the image being tested. Both are required.


3. Face Liveliness

Determines whether a submitted image was captured from a live person rather than a spoof artefact. This is passive liveness — it operates on a single still image with no challenge-response, so it adds no friction to a capture flow.

POST https://api.prembly.com/api/v1/verification/api/liveliness_check/
X-API-Key: <your_api_key>
Content-Type: application/json

{
  "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..."
}
{
  "data": {
    "confidence": 0.9999910736083985,
    "confidence_in_percentage": 99.99910736083984
  }
}

The channel is country-agnostic and returns a confidence score rather than a binary verdict. Set your own acceptance threshold — most onboarding flows accept above 90%, route 70–90% to manual review, and reject below that. Calibrate against your own capture conditions before going live.

Liveness is not a face match

A high liveness score confirms only that a real person was in front of the camera. It says nothing about which person. Liveness and face comparison are complementary — a presentation attack defeats either one alone.

For an active, gesture-based liveness challenge, use the Prembly SDK, which can require the user to perform a prompted movement during capture.


4. Face-Bound Identity Verification

These channels combine a registry or document lookup with a face comparison against the photo that authority holds on file. Because the lookup and the match happen in one call, there is no window in which you hold a verified record without knowing whether the holder matches it.

BVN with Face (Nigeria)

Verifies a Bank Verification Number and compares the submitted selfie against the BVN photo on record.

POST https://api.prembly.com/api/v1/verification/api/bvn_w_face/
X-API-Key: <your_api_key>
Content-Type: application/json

{
  "number": "23229512456",
  "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..."
}

Both number and image are required. The response carries the standard BVN demographic payload with a nested face_data block:

{
  "data": {
    "bvn": "23229512456",
    "title": "Mr",
    "lastName": "EKPOMA",
    "gender": "Male",
    "email": "ronald@thatmail.com",
    "face_data": {
      "status": true,
      "message": "Face Match",
      "confidence": 0.040414428711,
      "response_code": "00"
    }
  }
}

NIN with Face (Nigeria)

Verifies a National Identity Number and compares the selfie against the NIN registry photo.

POST https://api.prembly.com/api/v1/verification/api/nin_w_face/
X-API-Key: <your_api_key>
Content-Type: application/json

{
  "number": "01234567890",
  "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..."
}

The response includes the nin_data block — including the registry photo as a base64 string — alongside the face comparison result.

Document Verification with Face (Global)

Extracts and validates a physical identity document, then compares the portrait printed on it against a submitted selfie. This is the channel to reach for outside markets with a queryable national registry.

POST https://api.prembly.com/api/v1/verification/api/document_w_face/
X-API-Key: <your_api_key>
Content-Type: application/json

{
  "doc_image": "https://cdn.example.com/passport-page.jpg",
  "doc_type": "PP",
  "doc_country": "NG",
  "selfie_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..."
}

All four fields are required.

FieldAccepted values
doc_typePP (Passport), DL (Driver's License), ID (Identity Card)
doc_countryISO 3166-1 alpha-2 or alpha-3 code of the issuing country — e.g. NG, KE, USA

The response returns the extracted document fields (name, date of birth, age, document number, expiry) together with the cropped portrait and the face match result.


For how to read the scores these channels return, and what is billed, see Biometrics Overview.

On this page

Prembly Slack Community

Join our developer Slack channel for real-time integration support, engineering updates, and direct Q&A with the Prembly team.

Join Slack Channel