Search Identities

POST https://app.resemble.ai/api/v2/identity/search

Search your identities (plus any global identities) for matches against a media sample. Search is multimodal:

  • Audio — voice matching against enrolled voice samples.
  • Image — face/visual matching against enrolled reference photos, scored by embedding similarity (score_type: "cosine"). For the highest-fidelity person face confirmation, use the asynchronous Detect pipeline.
  • Video — not yet supported for synchronous search (returns 422). Use the Detect pipeline for video identity matching.

Request Body

FieldTypeRequiredDescription
urlstringOne of url, file, signed_idURL to the media sample to search for.
filefileOne of url, file, signed_idMedia file (multipart upload).
signed_idstringOne of url, file, signed_idSigned ID from a Secure Upload.
modalitystringaudio or image. Inferred from the media’s content type when omitted (defaults to audio).
top_kintegerNumber of top matches to return (1–20). Defaults to 1.

Example Request (audio)

$curl --request POST 'https://app.resemble.ai/api/v2/identity/search' \
> -H 'Authorization: Bearer YOUR_API_TOKEN' \
> -H 'Content-Type: application/json' \
> --data '{
> "url": "https://example.com/audio/sample_to_search.wav",
> "top_k": 5
> }'

Example Request (image)

$curl --request POST 'https://app.resemble.ai/api/v2/identity/search' \
> -H 'Authorization: Bearer YOUR_API_TOKEN' \
> -F 'file=@suspect_frame.jpg' \
> -F 'modality=image' \
> -F 'top_k=5'

Response

item is an object keyed by the matched identity’s UUID.

1{
2 "success": true,
3 "modality": "audio",
4 "item": {
5 "IDENTITY_UUID": {
6 "name": "John Doe",
7 "distance": 92.41
8 },
9 "IDENTITY_UUID_2": {
10 "name": "Jane Smith",
11 "distance": 61.73
12 }
13 }
14}

distance is a 0–100 match score — higher means a closer match (an identical sample scores 100). Image matches additionally include score_type:

1{
2 "success": true,
3 "modality": "image",
4 "item": {
5 "IDENTITY_UUID": {
6 "name": "Acme Corp",
7 "distance": 88.31,
8 "score_type": "cosine"
9 }
10 }
11}

Errors

StatusCause
422 Unprocessable EntityNo media supplied, or an unsupported modality (e.g. video).
400 Bad RequestThe search could not be completed.