Register a selfie
register_selfieStore a user's selfie in a collection so it can be matched against collection photos, returning face detection status, point ID, and embedding.
Instructions
Store a user's selfie in a collection so they can be matched against its photos. Returns face_found, the selfie's point_id (use with search_by_point_id) and its 512-number embedding. face_found=false with reason=no_face means no face was found; a face that fails the quality gate (det_score < 0.6 or under 24 px) is refused with HTTP 422 and not stored. Retrying with the same idempotency_key returns the original point_id without a second charge. Costs 93 credits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gcs_key | No | Object key of the selfie on the CDN configured for your account (instead of a URL). | |
| user_id | Yes | Your id for the person (required). | |
| file_path | No | Path to the selfie on this computer (JPEG, PNG, WebP, GIF, BMP, TIFF or HEIC). | |
| image_url | No | Public http(s) URL of the selfie. SightRadar downloads it; it must be reachable from the internet. | |
| selfie_id | No | Your id for this selfie. Defaults to a content hash. | |
| image_base64 | No | The selfie 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. |