Integration Examples
cURL
JavaScript
PHP
Python
COPY
curl -X POST BASE_URL/api/v1/verify \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@face.jpg" \
-F "name=USER_ID"
COPY
const formData = new FormData();
formData.append('image', imageBlob);
formData.append('name', 'USER_ID');
const res = await fetch('BASE_URL/api/v1/verify', {
method: 'POST',
headers: { 'X-API-Key': 'YOUR_API_KEY' },
body: formData
});
const data = await res.json();
if (data.success && data.match) {
console.log('Verified:', data.identity, data.confidence + '%');
}
COPY
$ch = curl_init('BASE_URL/api/v1/verify');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_API_KEY'],
CURLOPT_POSTFIELDS => [
'image' => new CURLFile('face.jpg'),
'name' => 'USER_ID'
]
]);
$response = json_decode(curl_exec($ch), true);
if ($response['success'] && $response['match']) {
echo "Welcome, " . $response['identity'];
}
COPY
import requests
with open('face.jpg', 'rb') as f:
res = requests.post(
'BASE_URL/api/v1/verify',
headers={'X-API-Key': 'YOUR_API_KEY'},
files={'image': f},
data={'name': 'USER_ID'}
)
data = res.json()
if data['success'] and data['match']:
print(f"Verified {data['identity']}! Confidence: {data['confidence']}%")