Skip to main content

Face Search 1:N (Crops)

Endpoint

POST https://api.verifik.co/v2/face-recognition/search/crops

Performs 1:N face search using cropped face images instead of full frames. Use this when you only have tight face crops (for example after detection or from a low-resolution pipeline). Validation requires a higher minimum score than the standard Face Search endpoint (min_score 0.5–1 here vs 0.2–1 on /search).

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params

NameTypeRequiredDescription
imagesstring[]YesBase64 face crops and/or HTTPS image URLs (same subject; small crops work best).
collection_idstringNoRestrict search to this collection.
max_resultsnumberNoMaximum results to return.
min_scorenumberYesMatch threshold 0.5–1.
search_modestringYesOne of FAST or ACCURATE.

Request

const fetch = require("node-fetch");

async function run() {
const res = await fetch("https://api.verifik.co/v2/face-recognition/search/crops", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
images: ["<base64-small>"],
collection_id: "<collection_id>",
min_score: 0.7,
search_mode: "FAST",
max_results: 10,
}),
});
console.log(await res.json());
}

run();

Response

Shape matches Face Search (1:N): data is an array of candidate persons ranked by similarity.

{
"id": "SC01",
"data": [
{
"id": "person_id",
"name": "John Doe",
"score": 0.91,
"thumbnails": [{ "id": "thumb_id", "thumbnail": "<base64>" }]
}
],
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "January 16, 2024 3:44 PM"
}
}

Notes

  • Prefer tight face crops; this path is tuned for small regions (often around 120×120 or similar). Very large full-frame images are a better fit for /v2/face-recognition/search.
  • Each string in images may be raw base64 or an HTTPS URL to an image; URLs are fetched and converted server-side.
  • Use ACCURATE when you need higher precision; use FAST for lower latency.
  1. Face Search (1:N) — Standard gallery search with full face images; min_score allows 0.2–1.
  2. Face Search 1:N (Live) — Liveness on the probe image, then 1:N search.
  3. Face Search 1:N (Active User) — 1:N search for active-session flows without liveness on the probe.
  4. Verify Face (1:1) — Match crops or images against a known enrolled person id.
  5. Face Detection — Detect faces in an image to obtain crops before calling search.
  6. List all persons — Inspect enrolled persons and metadata for your client.