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 that the person in front of the camera is real and live.
Tatvora Face Liveness AI protects face-based workflows from presentation attacks. It evaluates whether the subject is physically present at capture time instead of a printed photograph, a screen replay or another spoofing attempt. Pairing liveness with verification is what turns a face check into an authentication control rather than a photograph comparison.
curl -X POST https://api.tatvora.comPOST /api/v1/face/liveness \
-H "Authorization: Bearer $TATVORA_API_KEY" \
-F "image=@selfie.jpg"
import os
import requests
with open("selfie.jpg", "rb") as f1:
response = requests.post(
"https://api.tatvora.comPOST /api/v1/face/liveness",
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/liveness", {
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("selfie.jpg");
var part1 = new StreamContent(stream1);
part1.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part1, "image", "selfie.jpg");
using var response = await client.PostAsync("https://api.tatvora.comPOST /api/v1/face/liveness", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Prefer IHttpClientFactory over `new HttpClient()` in ASP.NET Core apps:
// builder.Services.AddHttpClient("FaceLivenessClient", 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 FaceLivenessExample {
public static void main(String[] args) throws Exception {
Map<String, Path> files = new LinkedHashMap<>();
files.put("image", Path.of("selfie.jpg"));
String boundary = "tatvora-" + UUID.randomUUID();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.tatvora.comPOST /api/v1/face/liveness"))
.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 Liveness AI call, end to end.
Case 1 · Real person at the camera
Case 2 · Photo held up to the camera
Face Verification asks
“Does this face match the reference face?”
Face Liveness asks
“Is the person actually live in front of the camera?”
{
"is_live": true,
"spoof_detected": false
}
Sample data for illustration. Liveness raises the cost of a presentation attack — printed photos, screen replays and similar — but no liveness model is absolute. Treat it as one control within a wider security design. We publish no accuracy figures; request current performance characteristics for your capture conditions during evaluation.
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_e4419c07",
"is_live": true,
"spoof_detected": false
}
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.