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.
Detect human faces inside images and video frames.
Tatvora Face Detection AI answers one question precisely: is there a human face in this image, and where is it? It returns a bounding box for every face found, which makes it the natural first stage of a capture workflow — validating that a usable face is present before a heavier recognition, verification or liveness step runs.
curl -X POST https://api.tatvora.comPOST /api/v1/face/detect \
-H "Authorization: Bearer $TATVORA_API_KEY" \
-F "image=@frame.jpg"
import os
import requests
with open("frame.jpg", "rb") as f1:
response = requests.post(
"https://api.tatvora.comPOST /api/v1/face/detect",
headers={"Authorization": f"Bearer {os.environ['TATVORA_API_KEY']}"},
files={"image": f1},
timeout=30,
)
response.raise_for_status()
print(response.json())
const form = new FormData();
form.append("image", imageFile); // File or Blob
const response = await fetch("https://api.tatvora.comPOST /api/v1/face/detect", {
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("frame.jpg");
var part1 = new StreamContent(stream1);
part1.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part1, "image", "frame.jpg");
using var response = await client.PostAsync("https://api.tatvora.comPOST /api/v1/face/detect", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Prefer IHttpClientFactory over `new HttpClient()` in ASP.NET Core apps:
// builder.Services.AddHttpClient("FaceDetectionClient", 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 FaceDetectionExample {
public static void main(String[] args) throws Exception {
Map<String, Path> files = new LinkedHashMap<>();
files.put("image", Path.of("frame.jpg"));
String boundary = "tatvora-" + UUID.randomUUID();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.tatvora.comPOST /api/v1/face/detect"))
.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 Detection AI call, end to end.
1 · You send
An image or a single camera frame
2 · We process
3 · You receive
{
"success": true,
"faces_found": 1,
"faces": [
{ "x": 148, "y": 96, "width": 210, "height": 268 }
]
}
Sample data for illustration. Face Detection reports whether a face is present and where it sits in the frame. It carries no identity information — to answer who a person is, use Face Recognition.
Authenticate with a bearer API key over HTTPS.
Upload
a file
as multipart/form-data and receive a JSON response.
Request fields
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_1a77b930",
"faces_detected": 2,
"faces": [
{ "bounding_box": { "x": 142, "y": 88, "width": 196, "height": 214 } },
{ "bounding_box": { "x": 512, "y": 104, "width": 180, "height": 198 } }
]
}
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.
Match a captured face against the identity set your application supplies to determine who the person is.
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.