Tatvora OCR AI
Turn documents into usable data.
Extract text and structured information from images, scans, PDFs and office documents through a single document intelligence API.
Verify whether two faces belong to the same person.
Tatvora Face Verification AI — also available as the Tatvora Face Match API — performs one-to-one comparison. Supply a reference photograph and a live or submitted image, and the API returns whether the two faces belong to the same person along with a similarity score you can threshold against your own risk policy.
curl -X POST https://api.tatvora.comPOST /api/v1/face/verify \
-H "Authorization: Bearer $TATVORA_API_KEY" \
-F "reference_image=@reference.jpg" \
-F "probe_image=@selfie.jpg"
import os
import requests
with open("reference.jpg", "rb") as f1, open("selfie.jpg", "rb") as f2:
response = requests.post(
"https://api.tatvora.comPOST /api/v1/face/verify",
headers={"Authorization": f"Bearer {os.environ['TATVORA_API_KEY']}"},
files={"reference_image": f1, "probe_image": f2},
timeout=30,
)
response.raise_for_status()
print(response.json())
const form = new FormData();
form.append("reference_image", reference_imageFile); // File or Blob
form.append("probe_image", probe_imageFile); // File or Blob
const response = await fetch("https://api.tatvora.comPOST /api/v1/face/verify", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TATVORA_API_KEY}` },
body: form,
});
if (!response.ok) {
throw new Error(`Tatvora API error ${response.status}`);
}
const result = await response.json();
console.log(result);
using System.Net.Http.Headers;
var apiKey = Environment.GetEnvironmentVariable("TATVORA_API_KEY");
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
using var form = new MultipartFormDataContent();
using var stream1 = File.OpenRead("reference.jpg");
var part1 = new StreamContent(stream1);
part1.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part1, "reference_image", "reference.jpg");
using var stream2 = File.OpenRead("selfie.jpg");
var part2 = new StreamContent(stream2);
part2.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part2, "probe_image", "selfie.jpg");
using var response = await client.PostAsync("https://api.tatvora.comPOST /api/v1/face/verify", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Prefer IHttpClientFactory over `new HttpClient()` in ASP.NET Core apps:
// builder.Services.AddHttpClient("FaceVerificationClient", c =>
// c.BaseAddress = new Uri("https://api.tatvora.com"));
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
public class FaceVerificationExample {
public static void main(String[] args) throws Exception {
Map<String, Path> files = new LinkedHashMap<>();
files.put("reference_image", Path.of("reference.jpg"));
files.put("probe_image", Path.of("selfie.jpg"));
String boundary = "tatvora-" + UUID.randomUUID();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.tatvora.comPOST /api/v1/face/verify"))
.header("Authorization", "Bearer " + System.getenv("TATVORA_API_KEY"))
.header("Content-Type", "multipart/form-data; boundary=" + boundary)
.POST(multipart(boundary, files))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
private static HttpRequest.BodyPublisher multipart(String boundary, Map<String, Path> files)
throws IOException {
List<byte[]> parts = new ArrayList<>();
for (Map.Entry<String, Path> file : files.entrySet()) {
parts.add(("--" + boundary + "\r\n"
+ "Content-Disposition: form-data; name=\"" + file.getKey()
+ "\"; filename=\"" + file.getValue().getFileName() + "\"\r\n"
+ "Content-Type: application/octet-stream\r\n\r\n").getBytes());
parts.add(Files.readAllBytes(file.getValue()));
parts.add("\r\n".getBytes());
}
parts.add(("--" + boundary + "--\r\n").getBytes());
return HttpRequest.BodyPublishers.ofByteArrays(parts);
}
}
A worked example of a single Face Verification AI call, end to end.
1 · You send two images
2 · We process
3 · You receive
{
"success": true,
"match": true,
"similarity": 0.94,
"threshold": 0.80
}
Sample data for illustration. Verification compares only the two images you send; it does not search a candidate set — that is Face Recognition. You choose the threshold at which a score counts as a match.
Authenticate with a bearer API key over HTTPS.
Upload
two files
as multipart/form-data and receive a JSON response.
Request fields
reference_image — file part, multipart/form-dataprobe_image — file part, multipart/form-dataAuthorization: Bearer YOUR_API_KEY — required headerEndpoints and payloads shown on this site are illustrative examples of the published interface. Never expose a secret API key in client-side code.
{
"success": true,
"request_id": "req_b310af52",
"match": true,
"similarity": 0.93,
"threshold_applied": 0.80
}
Turn documents into usable data.
Extract text and structured information from images, scans, PDFs and office documents through a single document intelligence API.
Detect human faces inside images and video frames.
Locate human faces in an image or camera frame and return their position as bounding boxes.
Recognise identities using intelligent facial analysis.
Match a captured face against the identity set your application supplies to determine who the person is.
Request an evaluation key and validate the model against your own data before choosing a plan.