Index a photo
index_photoIndex a photo to detect all faces and store them in a collection so they can be found later through face search. Returns each face's bounding box, score, and pixel size.
Instructions
Detect every face in a photo and store them in a collection so they can be found later by search_faces. Returns each face's point_id, bounding box (ratios of image width/height), detection score and pixel size. Faces below the quality gate (det_score < 0.6 or under 24 px) are counted as rejected. Indexing the same photo_id twice fails with already_indexed unless override=true. Use a photo_id that is unique across all your collections: on some older accounts photo ids are shared between collections, so reusing one moves its faces out of the other collection (or is refused with photo_id_in_other_collection). The collection is created if missing. Costs 93 credits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gcs_key | No | Object key of the photo on the CDN configured for your account (instead of a URL). | |
| override | No | Re-index and replace the faces of a photo_id indexed before. | |
| photo_id | No | Your id for the photo; search results return it. Defaults to a content hash. | |
| file_path | No | Path to the photo on this computer (JPEG, PNG, WebP, GIF, BMP, TIFF or HEIC). | |
| image_url | No | Public http(s) URL of the photo. SightRadar downloads it; it must be reachable from the internet. | |
| image_base64 | No | The photo 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. |