Skip to main content
POST
/
verify
Verify whether two images match
curl --request POST \
  --url https://api.deepface.dev/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "img1": "<string>",
  "img2": "<string>"
}
'
{
  "verified": true,
  "distance": 123,
  "threshold": 123,
  "model": "<string>",
  "facial_areas": {},
  "time": 123
}

Authorizations

Authorization
string
header
required

Use your API key as a bearer token.

Headers

x-request-id
string<uuid>

Optional UUID used for request tracing.

Body

img1
string
required

Base64 image payload or data URL. The managed API rejects images that exceed the active byte, request-size, or decoded pixel safety limits before forwarding work to the model runtime.

img2
string
required

Base64 image payload or data URL. The managed API rejects images that exceed the active byte, request-size, or decoded pixel safety limits before forwarding work to the model runtime.

model_name
string

Approved model name from the current allowlist. For /verify and /represent, omitted, blank, or overlong values are treated as absent and the gateway injects the active default model.

Maximum string length: 200
Example:

"Facenet"

detector_backend
string

Optional detector backend from the current allowlist. When the active detector misses a face, the service may retry configured fallback detectors before returning no_face_detected.

Example:

"opencv"

enforce_detection
boolean
default:true
align
boolean
default:true
normalization
string

Optional DeepFace normalization mode.

distance_metric
enum<string>
Available options:
cosine,
euclidean,
euclidean_l2
Example:

"cosine"

Response

Verification result

verified
boolean
required
distance
number
required
threshold
number
required
model
string
facial_areas
object
time
number