Face Search 1:N (Active User)
Endpointβ
POST https://api.verifik.co/v2/face-recognition/search-active-user
Performs 1:N search using a single probe image without liveness. Intended for active-user verification flows.
Headersβ
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Paramsβ
| Name | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Base64 image string. |
collection_id | string | No | Restrict search to this collection. |
os | string | Yes | ANDROID, IOS, or DESKTOP. |
min_score | number | Yes | Match threshold (0.5β1.0). |
search_mode | string | Yes | One of FAST or ACCURATE. |
Requestβ
- Node.js
- PHP
- Python
- Go
const fetch = require("node-fetch");
async function run() {
const res = await fetch("https://api.verifik.co/v2/face-recognition/search-active-user", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
image: "<base64>",
collection_id: "<collection_id>",
os: "DESKTOP",
min_score: 0.7,
search_mode: "FAST"
}),
});
console.log(await res.json());
}
run();
<?php
$ch = curl_init("https://api.verifik.co/v2/face-recognition/search-active-user");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_TOKEN")
]);
$body = json_encode([
"image" => "<base64>",
"collection_id" => "<collection_id>",
"os" => "DESKTOP",
"min_score" => 0.7,
"search_mode" => "ACCURATE"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os, requests
url = "https://api.verifik.co/v2/face-recognition/search-active-user"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}"
}
payload = {
"image": "<base64>",
"collection_id": "<collection_id>",
"os": "DESKTOP",
"min_score": 0.7,
"search_mode": "FAST"
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
payload := map[string]interface{}{
"image": "<base64>",
"collection_id": "<collection_id>",
"os": "DESKTOP",
"min_score": 0.7,
"search_mode": "ACCURATE",
}
b, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/face-recognition/search-active-user", bytes.NewBuffer(b))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_TOKEN"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
Responseβ
- 200
- 409
{
"id": "SAU01",
"data": [
{ "id": "person_id", "score": 0.93 }
],
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "January 16, 2024 3:44 PM"
}
}
{
"message": "\"os\" is required",
"code": "MissingParameter"
}
Notesβ
- No liveness is performed; use when you already trust the capture context.