Face Match API — Compare Two Face Images
Compare two face images and get a confidence score. Ideal for matching selfies against ID documents during KYC onboarding.
curl -X POST "https://production.deepvue.tech/v1/facematch" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-H "x-api-key: YOUR_API_KEY" \
--form file_a=example_string \
--form file_b=example_string
import requests
import json
url = "https://production.deepvue.tech/v1/facematch"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
}
data = {
"file_a": "example_string",
"file_b": "example_string"
}
response = requests.post(url, headers=headers, data=data)
print(response.json())
const formData = new FormData();
formData.append("file_a", "example_string");
formData.append("file_b", "example_string");
const response = await fetch("https://production.deepvue.tech/v1/facematch", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
},
body: formData
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"mime/multipart"
)
func main() {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
writer.WriteField("file_a", "example_string")
writer.WriteField("file_b", "example_string")
writer.Close()
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/facematch", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/facematch')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request['x-api-key'] = 'YOUR_API_KEY'
request.set_form([
["file_a", "example_string"],
["file_b", "example_string"]
], 'multipart/form-data')
response = http.request(request)
puts response.body
{
"code": null,
"timestamp": 1710444590759,
"transaction_id": "string",
"sub_code": "SUCCESS",
"message": "string",
"data": {
"match": true,
"confidence": null
}
}
{
"detail": "Inactive client_id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Not a valid token"
}
{
"code": null,
"timestamp": 1710444590759,
"transaction_id": "string",
"sub_code": "NO_FACE_FOUND",
"message": "Unable to detect face",
"detail": "Not able to locate any faces in at least one of the images. Check the image files."
}
{
"code": null,
"timestamp": 1710965161862,
"transaction_id": "string",
"sub_code": "UNSUPPORTED_FILE_FORMAT",
"message": "File format not supported",
"detail": "Unsupported file type, only .jpeg, .jpg, .png file formats are supported"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
{
"detail": "Internal Server Error"
}
/v1/facematch
ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
The media type of the request body
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token (JWT). ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Responses
Overview
The Deepvue Face Match API lets you compare faces present in two different documents within seconds. You can submit two image files as input — either identification cards from two separate individuals, or a single ID document paired with a selfie photograph.
The system performs AI-driven facial analysis and delivers results indicating whether the faces match, along with a corresponding confidence metric reflecting the reliability of that determination.
The API accepts only .jpeg, .jpg, and .png file formats.
Last updated 4 weeks ago
Built with Documentation.AI