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.
Recognise identities using intelligent facial analysis.
Tatvora Face Recognition AI performs one-to-many identification. Your application sends a captured face together with the candidate identity set to compare it against, and the API returns the matching identity where one is found. It is the right model when your application needs to answer "who is this?" rather than confirm a claimed identity. The call is stateless: your enrolled identities stay in your database, we hold no face gallery, and nothing from the request is retained after the response.
curl -X POST https://api.tatvora.comPOST /api/v1/face/recognize \
-H "Authorization: Bearer $TATVORA_API_KEY" \
-F "image=@capture.jpg" \
-F "candidates=@candidates.json"
import os
import requests
with open("capture.jpg", "rb") as f1, open("candidates.json", "rb") as f2:
response = requests.post(
"https://api.tatvora.comPOST /api/v1/face/recognize",
headers={"Authorization": f"Bearer {os.environ['TATVORA_API_KEY']}"},
files={"image": f1, "candidates": f2},
timeout=30,
)
response.raise_for_status()
print(response.json())
const form = new FormData();
form.append("image", imageFile); // File or Blob
form.append("candidates", candidatesFile); // File or Blob
const response = await fetch("https://api.tatvora.comPOST /api/v1/face/recognize", {
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("capture.jpg");
var part1 = new StreamContent(stream1);
part1.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part1, "image", "capture.jpg");
using var stream2 = File.OpenRead("candidates.json");
var part2 = new StreamContent(stream2);
part2.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part2, "candidates", "candidates.json");
using var response = await client.PostAsync("https://api.tatvora.comPOST /api/v1/face/recognize", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Prefer IHttpClientFactory over `new HttpClient()` in ASP.NET Core apps:
// builder.Services.AddHttpClient("FaceRecognitionClient", 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 FaceRecognitionExample {
public static void main(String[] args) throws Exception {
Map<String, Path> files = new LinkedHashMap<>();
files.put("image", Path.of("capture.jpg"));
files.put("candidates", Path.of("candidates.json"));
String boundary = "tatvora-" + UUID.randomUUID();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.tatvora.comPOST /api/v1/face/recognize"))
.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 Recognition AI call, end to end.
1 · You send
+ your candidate set
2 · We process
3 · You receive
{
"success": true,
"matched": true,
"identity_id": "emp_10428",
"similarity": 0.91,
"candidates_considered": 3
}
Sample data for illustration. Your enrolled identities are sent with the request and stay in your own database — Tatvora holds no face gallery, so there is no biometric store on our side. Set the similarity threshold your use case requires.
Authenticate with a bearer API key over HTTPS.
Upload
two files
as multipart/form-data and receive a JSON response.
Request fields
image — file part, multipart/form-datacandidates — 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_5c04ee18",
"matched": true,
"identity_id": "emp_10428",
"similarity": 0.91,
"candidates_considered": 1240
}
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.
Verify whether two faces belong to the same person.
Compare a reference image against a live capture and receive a match or no-match decision with a similarity score.
Request an evaluation key and validate the model against your own data before choosing a plan.