Face Match API
The Face Match API allows you to perform biometric facial verification using an image of a person and their associated identity record (NIN or BVN). This helps confirm if a live or uploaded image matches the stored image in the government database.
Base URL
1. NIN Face Match
POST /nin
Compare a user's selfie with their NIN record photo to verify identity accuracy.
Headers:
Authorization: Bearer <your_api_key>
Content-Type: application/json
Request Body:
{
"nin": "12345678901",
"image": "base64-encoded-face-image"
}
Successful Response (200):
{
"status": "success",
"match_score": 0.97,
"is_match": true,
"message": "Face match successful"
}
Error Response (400):
{
"status": "error",
"message": "NIN not found or invalid image format."
}
2. BVN Face Match
POST /bvn
Compare a user's selfie with their BVN record photo to confirm identity authenticity.
Headers:
Authorization: Bearer <your_api_key>
Content-Type: application/json
Request Body:
{
"bvn": "22334455667",
"image": "base64-encoded-face-image"
}
Successful Response (200):
{
"status": "success",
"match_score": 0.94,
"is_match": true,
"message": "Face match successful"
}
Error Response (400):
{
"status": "error",
"message": "BVN not found or invalid image format."
}
Example Integration
Python Example
import requests, base64
url = "https://lumiid.com/api/face/nin"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"nin": "12345678901",
"image": base64.b64encode(open("selfie.jpg", "rb").read()).decode("utf-8")
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript Example
fetch("https://lumiid.com/api/face/bvn", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
bvn: "22334455667",
image: "base64-encoded-face-image"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Pricing
Face Match API is available under the Premium Plan only, due to higher computational requirements. Ensure your account has active credits for biometric verification.