Search a collection by face
search_facesFind every photo in a collection that contains the person in a selfie or 512-number face embedding. Returns ranked matches with photo IDs and scores, or a reason when no face is detected.
Instructions
Find the photos in a collection that contain the person in a query image (typically a selfie) or a 512-number embedding. Returns matches [{photo_id, score}] best first, plus photo_ids. When nothing matches, reason says why: no_face (no face found in the query) or low_quality_selfie. Costs 93 credits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of matches to return. | |
| gcs_key | No | Object key of the query face image on the CDN configured for your account (instead of a URL). | |
| embedding | No | A 512-number face embedding (from register_selfie) instead of an image. | |
| file_path | No | Path to the query face image on this computer (JPEG, PNG, WebP, GIF, BMP, TIFF or HEIC). | |
| image_url | No | Public http(s) URL of the query face image. SightRadar downloads it; it must be reachable from the internet. | |
| threshold | No | Minimum cosine similarity for a match (0-1). Omit to use the calibrated default. | |
| image_base64 | No | The query face image as base64 (a data: URL is fine). Up to 30 MB decoded. Prefer image_url for large files. | |
| collection_id | Yes | Collection id. | |
| idempotency_key | No | Optional. A retry that reuses the key is never charged twice: if the first call finished, the retry gets 409 duplicate_request_already_processed; if it is still running, 409 duplicate_request_in_flight. Use a new key for each different request. |