Integrate advanced AI models using simple REST APIs
Every model is a plain HTTPS endpoint that takes a bearer key and returns JSON. No SDK is required, and nothing needs to be installed or hosted on your side.
- Customer Application
- Tatvora API
- AI Model
- JSON Response
From account to first response
Eight steps, most of which you only do once.
Create or request an account
Register for a Tatvora developer account or request access from our team.
Select an API plan
Choose the tier matched to your expected volume, starting at $49 per month for 5,000 calls.
Receive an API key
Generate a key from the dashboard. The secret is shown once at creation.
Choose an AI API
Pick the model that matches the job — OCR, face detection, recognition, verification, liveness or prediction.
Send API requests
Call the REST endpoint over HTTPS with your key in the Authorization header.
Receive JSON responses
Handle a predictable JSON payload with a consistent success flag, request id and error shape.
Monitor API usage
Track consumption, success rates and per-model usage from the dashboard.
Upgrade as the application grows
Move to a higher plan for better effective pricing and higher limits as volume increases.
One header, every endpoint
Requests are authenticated with an API key sent as a bearer token. Keys are scoped to your account and can be restricted per API and per environment.
- All requests must use HTTPS — plain HTTP is rejected
- The secret value is shown once at creation and cannot be retrieved again
- Keep keys server-side; never ship one in a browser or mobile binary
- Revoking a key takes effect immediately
- Use separate development and production keys from the Business plan upward
TATVORA_API_KEY). No real key is published anywhere in these docs.
POST https://api.tatvora.com/api/v1/ocr HTTP/1.1
Host: api.tatvora.com
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data
# Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"success": true,
"request_id": "req_8f2c41d0",
"text": "Extracted document content..."
}
Endpoints
All endpoints are versioned in the path and served from
https://api.tatvora.com.
| Endpoint | Model | Content type | Key response fields |
|---|---|---|---|
| POST /api/v1/ocr | OCR AI | multipart/form-data | text, pages, fields |
| POST /api/v1/face/detect | Face Detection AI | multipart/form-data | faces_detected, faces[].bounding_box |
| POST /api/v1/face/recognize | Face Recognition AI | multipart/form-data | matched, identity_id, similarity |
| POST /api/v1/face/verify | Face Verification AI | multipart/form-data | match, similarity |
| POST /api/v1/face/liveness | Face Liveness AI | multipart/form-data | is_live, spoof_detected |
| POST /api/v1/predict | Predict AI | application/json | predictions[] |
REST APIs
Standard HTTPS endpoints that work with any language or framework.
JSON responses
Consistent, predictable payloads with a stable success and error shape.
API-key authentication
Bearer-token authentication with separate development and production keys.
Usage tracking
Per-model and per-key consumption visible in the dashboard.
Rate limiting
Per-plan request limits that protect both your application and the platform.
Developer documentation
Endpoint reference, request and response schemas and integration examples.
Error handling
Documented HTTP status codes and machine-readable error codes.
API logs
Request history for debugging integrations and investigating failures.
Usage analytics
Trends, quota forecasting and per-API breakdowns of your consumption.
Integration examples for every model
cURL, Python, JavaScript, C# and Java for each endpoint. C# examples use
HttpClient; in ASP.NET Core, register a typed client through
IHttpClientFactory rather than newing one up per request.
Tatvora OCR AI
Turn documents into usable data.
curl -X POST https://api.tatvora.comPOST /api/v1/ocr \
-H "Authorization: Bearer $TATVORA_API_KEY" \
-F "document=@invoice.pdf"
import os
import requests
with open("invoice.pdf", "rb") as f1:
response = requests.post(
"https://api.tatvora.comPOST /api/v1/ocr",
headers={"Authorization": f"Bearer {os.environ['TATVORA_API_KEY']}"},
files={"document": f1},
timeout=30,
)
response.raise_for_status()
print(response.json())
const form = new FormData();
form.append("document", documentFile); // File or Blob
const response = await fetch("https://api.tatvora.comPOST /api/v1/ocr", {
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("invoice.pdf");
var part1 = new StreamContent(stream1);
part1.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(part1, "document", "invoice.pdf");
using var response = await client.PostAsync("https://api.tatvora.comPOST /api/v1/ocr", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Prefer IHttpClientFactory over `new HttpClient()` in ASP.NET Core apps:
// builder.Services.AddHttpClient("OcrClient", 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 OcrExample {
public static void main(String[] args) throws Exception {
Map<String, Path> files = new LinkedHashMap<>();
files.put("document", Path.of("invoice.pdf"));
String boundary = "tatvora-" + UUID.randomUUID();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.tatvora.comPOST /api/v1/ocr"))
.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);
}
}
Tatvora Face Detection AI
Detect human faces inside images and video frames.
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);
}
}
Tatvora Face Recognition AI
Recognise identities using intelligent facial analysis.
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);
}
}
Tatvora Face Verification AI
Verify whether two faces belong to the same person.
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);
}
}
Tatvora Face Liveness AI
Verify that the person in front of the camera is real and live.
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);
}
}
Tatvora Predict AI
Make typing faster and smarter.
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());
}
}
Predictable failures, documented codes
Errors use standard HTTP status codes with a JSON body carrying a machine-readable code, a human-readable message and the request id. Log the request id — support conversations start there.
- Retry
429and5xxwith exponential backoff and a ceiling - Do not retry
400,401or403— fix the request 402means the monthly quota is exhausted; add credits or upgrade- Validate file type and size before forwarding user uploads
| Status | Meaning |
|---|---|
| 200 | Request processed successfully |
| 400 | Invalid request — missing field, unsupported file type |
| 401 | Missing or invalid API key |
| 403 | Key not permitted to call this API |
| 402 | Monthly quota exhausted |
| 413 | Payload too large |
| 429 | Rate limit exceeded — honour Retry-After |
| 5xx | Processing error — retry with backoff |
{
"success": false,
"request_id": "req_3d90ba71",
"error": {
"code": "unsupported_file_type",
"message": "Expected png, jpg, pdf or docx; received tiff."
}
}
What a request passes through
From your application to a model and back, with the checks applied on the way.
Your systems
Edge
Tatvora API gateway
AI models — six independent services
Platform services
Data — metadata only, never request content
No object store and no payload store: submitted documents and images are processed in memory and discarded when the response is sent.
Client dashboard
What is coming to the platform
Published so you can plan around it. Dates are not committed; scope may change.
Self-service billing
Register, verify email, choose a plan, pay online and receive an API key without a sales conversation. Stripe and Razorpay are the candidate gateways.
Key management
Key rotation, IP whitelisting, allowed origins, per-key rate limits and environment separation from the dashboard. See the concept.
New model families
Vision AI, Language AI, Speech AI and Generative AI categories, alongside the current Document, Face and Predictive families.
Developer questions
Get a key and make your first call
Request an evaluation key and validate the response shape and quality against your own data before committing to a plan.