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.
Make typing faster and smarter.
Tatvora Predict AI is a context-aware next word prediction API. It reads the text a user has typed so far and returns ranked continuations that your interface can offer as inline suggestions. Because it is designed for low-latency calls on every keystroke pause, it fits chat composers, email clients, CRM note fields and search boxes without making the input feel slow.
curl -X POST https://api.tatvora.comPOST /api/v1/predict \
-H "Authorization: Bearer $TATVORA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Please find attached the invoice for",
"max_suggestions": 3
}'
import os
import requests
response = requests.post(
"https://api.tatvora.comPOST /api/v1/predict",
headers={"Authorization": f"Bearer {os.environ['TATVORA_API_KEY']}"},
json={
"text": "Please find attached the invoice for",
"max_suggestions": 3
},
timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.tatvora.comPOST /api/v1/predict", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TATVORA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"text": "Please find attached the invoice for",
"max_suggestions": 3
}),
});
if (!response.ok) {
throw new Error(`Tatvora API error ${response.status}`);
}
const result = await response.json();
console.log(result);
using System.Net.Http.Headers;
using System.Text;
var apiKey = Environment.GetEnvironmentVariable("TATVORA_API_KEY");
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
var payload = """
{
"text": "Please find attached the invoice for",
"max_suggestions": 3
}
""";
using var content = new StringContent(payload, Encoding.UTF8, "application/json");
using var response = await client.PostAsync("https://api.tatvora.comPOST /api/v1/predict", content);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Prefer IHttpClientFactory over `new HttpClient()` in ASP.NET Core apps:
// builder.Services.AddHttpClient("PredictClient", c =>
// c.BaseAddress = new Uri("https://api.tatvora.com"));
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class PredictExample {
public static void main(String[] args) throws Exception {
String payload = """
{
"text": "Please find attached the invoice for",
"max_suggestions": 3
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.tatvora.comPOST /api/v1/predict"))
.header("Authorization", "Bearer " + System.getenv("TATVORA_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}
A worked example of a single Predict AI call, end to end.
1 · The user is typing
I would like to schedule a
Click a suggestion to accept it, exactly as your users would.
2 · We process
3 · You receive
{
"success": true,
"context": "I would like to schedule a",
"predictions": ["meeting", "call", "demo", "session"]
}
Sample data for illustration. Suggestions shown here are fixed examples, not live model output. The text sent for prediction is processed in memory and discarded with the response.
Authenticate with a bearer API key over HTTPS. Send a JSON body and receive a JSON response.
Request fields
text — the input text to continuemax_suggestions — how many ranked predictions to returnAuthorization: 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.
{
"text": "Please find attached the invoice for",
"max_suggestions": 3
}
{
"success": true,
"request_id": "req_77aa1e6b",
"predictions": ["review", "approval", "your"],
"processing_time_ms": 38
}
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.