AILA Tech API Reference
Everything you need to integrate AI identity verification into your product. Get your first API call working in minutes.
Quick Start
Set these constants once, then copy any sample below. All requests use application/json with base64-encoded files.
BASE_URL = "https://www.ailatech.la/api/v1/services/" AILA_TOKEN = "your_aila_token" # from dashboard → API Token USER_ID = "your_user_id" PACKAGE_ID = "your_package_id"
Available APIs
Production-ready AI services. Click any card to jump to its code sample.
Face Liveness
Detect real vs spoofed faces
AL_0201Face Recognition
Register, verify & find similar
AL_0301–0303ID Card OCR
White, green, digital & passport
AL_0601–0604Lao Text OCR
Extract text from documents
AL_0401License Plate
Detect & read plates
AL_0501–0502e-KYC
Customer onboarding via ID
AL_0101–0103Packages
Check & overview usage
AL_0702–0705Face Liveness Detection Try Live
Detect whether a face is live (real person) or spoofed. Supports image (AL_0201) and video (AL_0202). Files are sent as base64 inside a JSON body.
import requests, uuid, base64 from datetime import datetime with open("face.jpg", "rb") as f: img_b64 = base64.b64encode(f.read()).decode() payload = { "Header": { "type": "RQ", "token": AILA_TOKEN, "product": "AL_0201", # AL_0202 for video "datetime": str(int(datetime.now().timestamp())), "uuid": str(uuid.uuid4()) }, "Body": { "input_data": { "user_id": USER_ID, "package_id": PACKAGE_ID, "prod_id": "PD01", "files": { "file_name": "face.jpg", "file_base64": img_b64 } } } } resp = requests.post(BASE_URL + "aila-face-anti-spoofing/verify", json=payload) print(resp.json())
import java.net.URI; import java.net.http.*; import java.nio.file.*; import java.util.Base64; import java.util.UUID; import java.time.Instant; public class LivenessDetection { public static void main(String[] args) throws Exception { // Encode image to base64 String imgB64 = Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of("face.jpg"))); String jsonBody = """ { "Header": { "type": "RQ", "token": "%s", "product": "AL_0201", "datetime": "%d", "uuid": "%s" }, "Body": { "input_data": { "user_id": "%s", "package_id": "%s", "prod_id": "PD01", "files": { "file_name": "face.jpg", "file_base64": "%s" } } } } """.formatted(AILA_TOKEN, Instant.now().getEpochSecond(), UUID.randomUUID(), USER_ID, PACKAGE_ID, imgB64); HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-face-anti-spoofing/verify")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(jsonBody)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } }
// Helper: File → base64 string const toBase64 = (file) => new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = () => resolve(reader.result.split(',')[1]); reader.onerror = reject; reader.readAsDataURL(file); }); const imgB64 = await toBase64(imageFile); // File from <input type="file"> const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0201', datetime: String(Math.floor(Date.now() / 1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01', files: { file_name: imageFile.name, file_base64: imgB64 } } } }; const response = await fetch(BASE_URL + 'aila-face-anti-spoofing/verify', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); const data = await response.json(); console.log(data);
curl -X POST "https://www.ailatech.la/api/v1/services/aila-face-anti-spoofing/verify" \
-H "Content-Type: application/json" \
-d '{
"Header": {
"type": "RQ",
"token": "your_aila_token",
"product": "AL_0201",
"datetime": "1714000000",
"uuid": "550e8400-e29b-41d4-a716-446655440000"
},
"Body": {
"input_data": {
"user_id": "your_user_id",
"package_id": "your_package_id",
"prod_id": "PD01",
"files": {
"file_name": "face.jpg",
"file_base64": "BASE64_ENCODED_IMAGE"
}
}
}
}'
{
"is_live": true,
"confidence": 0.97,
"label": "real"
}
Face Recognition Try Live
Register faces into a database, verify a face matches a registered user, or find the most similar identity. All use application/json with base64 face images.
import requests, uuid, base64 from datetime import datetime def b64(path): with open(path, "rb") as f: return base64.b64encode(f.read()).decode() payload = { "Header": { "type": "RQ", "token": AILA_TOKEN, "product": "AL_0301", "datetime": str(int(datetime.now().timestamp())), "uuid": str(uuid.uuid4()) }, "Body": { "input_data": { "user_id": USER_ID, "package_id": PACKAGE_ID, "prod_id": "PD01", "user_info": { "username": "user@email.com", "password": "password" }, "genneral_info": { "full_name_lao": "ລູກຄ້າ", "full_name_english": "Customer Name", "date_of_birth": "1999-09-09", "gender": "M", "natonality": "la", "country": "Laos", "address": "Vientiane" }, "identification_document": { "document_type": "identity", "document_number": "12345678", "date_of_issue": "2020-01-01", "date_of_expiry": "2030-12-31" }, "contact_info": { "email": "user@email.com", "phone": "20xxxxxxxx" }, "files": { "face1_name": "face1.jpg", "face1_base64": b64("face1.jpg"), "face2_name": "face2.jpg", "face2_base64": b64("face2.jpg"), "face3_name": "face3.jpg", "face3_base64": b64("face3.jpg") } } } } resp = requests.post(BASE_URL + "aila-face-recognition/register", json=payload) print(resp.json())
import java.net.URI; import java.net.http.*; import java.nio.file.*; import java.util.Base64; public class FaceRegister { static String b64(String path) throws Exception { return Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of(path))); } public static void main(String[] args) throws Exception { String face1 = b64("face1.jpg"); String face2 = b64("face2.jpg"); String face3 = b64("face3.jpg"); String json = """ { "Header": {"type":"RQ","token":"%s","product":"AL_0301", "datetime":"%d","uuid":"%s"}, "Body": {"input_data": { "user_id":"%s","package_id":"%s","prod_id":"PD01", "user_info":{"username":"user@email.com","password":"password"}, "genneral_info":{"full_name_lao":"ລູກຄ້າ", "full_name_english":"Customer Name","date_of_birth":"1999-09-09", "gender":"M","natonality":"la","country":"Laos","address":"Vientiane"}, "identification_document":{"document_type":"identity", "document_number":"12345678","date_of_issue":"2020-01-01", "date_of_expiry":"2030-12-31"}, "contact_info":{"email":"user@email.com","phone":"20xxxxxxxx"}, "files":{"face1_name":"face1.jpg","face1_base64":"%s", "face2_name":"face2.jpg","face2_base64":"%s", "face3_name":"face3.jpg","face3_base64":"%s"} }} } """.formatted(AILA_TOKEN, System.currentTimeMillis()/1000, java.util.UUID.randomUUID(), USER_ID, PACKAGE_ID, face1, face2, face3); HttpResponse<String> resp = HttpClient.newHttpClient().send( HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-face-recognition/register")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)) .build(), HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body()); } }
const toBase64 = (file) => new Promise((res, rej) => { const r = new FileReader(); r.onload = () => res(r.result.split(',')[1]); r.onerror = rej; r.readAsDataURL(file); }); // Get 3 face images from file inputs const [face1, face2, face3] = await Promise.all([ toBase64(faceFile1), toBase64(faceFile2), toBase64(faceFile3) ]); const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0301', datetime: String(Math.floor(Date.now() / 1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01', user_info: { username: 'user@email.com', password: 'password' }, genneral_info: { full_name_lao: 'ລູກຄ້າ', full_name_english: 'Customer Name', date_of_birth: '1999-09-09', gender: 'M', natonality: 'la', country: 'Laos', address: 'Vientiane' }, identification_document: { document_type: 'identity', document_number: '12345678', date_of_issue: '2020-01-01', date_of_expiry: '2030-12-31' }, contact_info: { email: 'user@email.com', phone: '20xxxxxxxx' }, files: { face1_name: 'face1.jpg', face1_base64: face1, face2_name: 'face2.jpg', face2_base64: face2, face3_name: 'face3.jpg', face3_base64: face3 } }} }; const resp = await fetch(BASE_URL + 'aila-face-recognition/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); console.log(await resp.json());
curl -X POST "https://www.ailatech.la/api/v1/services/aila-face-recognition/register" \
-H "Content-Type: application/json" \
-d '{
"Header": {"type":"RQ","token":"your_token","product":"AL_0301","datetime":"1714000000","uuid":"550e8400-..."},
"Body": {
"input_data": {
"user_id":"your_id","package_id":"your_package","prod_id":"PD01",
"user_info":{"username":"user@email.com","password":"password"},
"genneral_info":{"full_name_lao":"ລູກຄ້າ","full_name_english":"Name",
"date_of_birth":"1999-09-09","gender":"M","natonality":"la",
"country":"Laos","address":"Vientiane"},
"identification_document":{"document_type":"identity","document_number":"12345678",
"date_of_issue":"2020-01-01","date_of_expiry":"2030-12-31"},
"contact_info":{"email":"user@email.com","phone":"20xxxxxxxx"},
"files":{
"face1_name":"face1.jpg","face1_base64":"BASE64_FACE_1",
"face2_name":"face2.jpg","face2_base64":"BASE64_FACE_2",
"face3_name":"face3.jpg","face3_base64":"BASE64_FACE_3"
}
}
}
}'
ID Card & Passport OCR Try Live
One endpoint, four card types — white card (AL_0601), green card (AL_0602), digital card (AL_0603), passport (AL_0604). Set document_type to identity_card or passport.
with open("lao_id_card.jpg", "rb") as f: img_b64 = base64.b64encode(f.read()).decode() payload = { "Header": { "type": "RQ", "token": AILA_TOKEN, "product": "AL_0601", "datetime": str(int(datetime.now().timestamp())), "uuid": str(uuid.uuid4()) }, "Body": { "input_data": { "user_id": USER_ID, "package_id": PACKAGE_ID, "prod_id": "PD01", "files": { "document_type": "identity_card", # or "passport" "file_name": "lao_id_card.jpg", "file_base64": img_b64 } } } } resp = requests.post(BASE_URL + "aila-personal-id-card/extract-data", json=payload) print(resp.json())
import java.net.URI; import java.net.http.*; import java.nio.file.*; import java.util.Base64; String imgB64 = Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of("lao_id_card.jpg"))); String json = """ {"Header":{"type":"RQ","token":"%s","product":"AL_0601", "datetime":"%d","uuid":"%s"}, "Body":{"input_data":{"user_id":"%s","package_id":"%s","prod_id":"PD01", "files":{"document_type":"identity_card", "file_name":"lao_id_card.jpg","file_base64":"%s"}}}} """.formatted(AILA_TOKEN, System.currentTimeMillis()/1000, java.util.UUID.randomUUID(), USER_ID, PACKAGE_ID, imgB64); HttpResponse<String> resp = HttpClient.newHttpClient().send( HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-personal-id-card/extract-data")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)).build(), HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body());
const imgB64 = await toBase64(idCardFile); const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0601', datetime: String(Math.floor(Date.now()/1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01', files: { document_type: 'identity_card', // or 'passport' file_name: idCardFile.name, file_base64: imgB64 } }} }; const data = await (await fetch(BASE_URL + 'aila-personal-id-card/extract-data', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) })).json(); console.log(data);
curl -X POST "https://www.ailatech.la/api/v1/services/aila-personal-id-card/extract-data" \
-H "Content-Type: application/json" \
-d '{
"Header": {"type":"RQ","token":"your_token","product":"AL_0601","datetime":"1714000000","uuid":"550e8400-..."},
"Body": {
"input_data": {
"user_id":"your_id","package_id":"your_package","prod_id":"PD01",
"files": {
"document_type": "identity_card",
"file_name": "lao_id_card.jpg",
"file_base64": "BASE64_ENCODED_IMAGE"
}
}
}
}'
{
"name": "ສົมສີ ດາວງ",
"id_number": "LA-123456",
"date_of_birth": "1990-01-01",
"expiry_date": "2030-01-01",
"nationality": "Lao"
}
Lao Text OCR Try Live
Extract text content from any Lao language document image (AL_0401). Send the file as a base64 string.
with open("document.png", "rb") as f: img_b64 = base64.b64encode(f.read()).decode() payload = { "Header": { "type": "RQ", "token": AILA_TOKEN, "product": "AL_0401", "datetime": str(int(datetime.now().timestamp())), "uuid": str(uuid.uuid4()) }, "Body": { "input_data": { "user_id": USER_ID, "package_id": PACKAGE_ID, "prod_id": "PD01", "files": { "file_name": "document.png", "file_base64": img_b64 } } } } resp = requests.post(BASE_URL + "aila-ocr/lao", json=payload) print(resp.json())
import java.net.URI; import java.net.http.*; import java.nio.file.*; import java.util.Base64; String imgB64 = Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of("document.png"))); String json = """ {"Header":{"type":"RQ","token":"%s","product":"AL_0401", "datetime":"%d","uuid":"%s"}, "Body":{"input_data":{"user_id":"%s","package_id":"%s","prod_id":"PD01", "files":{"file_name":"document.png","file_base64":"%s"}}}} """.formatted(AILA_TOKEN, System.currentTimeMillis()/1000, java.util.UUID.randomUUID(), USER_ID, PACKAGE_ID, imgB64); HttpResponse<String> resp = HttpClient.newHttpClient().send( HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-ocr/lao")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)).build(), HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body());
const imgB64 = await toBase64(documentFile); const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0401', datetime: String(Math.floor(Date.now()/1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01', files: { file_name: documentFile.name, file_base64: imgB64 } }} }; const data = await (await fetch(BASE_URL + 'aila-ocr/lao', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) })).json(); console.log(data);
curl -X POST "https://www.ailatech.la/api/v1/services/aila-ocr/lao" \
-H "Content-Type: application/json" \
-d '{
"Header": {"type":"RQ","token":"your_token","product":"AL_0401","datetime":"1714000000","uuid":"550e8400-..."},
"Body": {
"input_data": {
"user_id":"your_id","package_id":"your_package","prod_id":"PD01",
"files": {"file_name":"document.png","file_base64":"BASE64_ENCODED_IMAGE"}
}
}
}'
{
"text": "ສາທາລະນະລັດ ປະຊາທິປະໄຕ ປະຊາຊົນລາວ...",
"confidence": 0.95
}
License Plate Detection Try Live
Detect and read vehicle license plates from an image (AL_0501) or video (AL_0502). Set document_type to license_plate and country_code to LA.
with open("car.jpg", "rb") as f: img_b64 = base64.b64encode(f.read()).decode() payload = { "Header": { "type": "RQ", "token": AILA_TOKEN, "product": "AL_0501", # AL_0502 for video "datetime": str(int(datetime.now().timestamp())), "uuid": str(uuid.uuid4()) }, "Body": { "input_data": { "user_id": USER_ID, "package_id": PACKAGE_ID, "prod_id": "PD01", "files": { "country_code": "LA", "document_type": "license_plate", "file_name": "car.jpg", "file_base64": img_b64 } } } } resp = requests.post(BASE_URL + "aila-license-plate/detection", json=payload) print(resp.json())
import java.net.URI; import java.net.http.*; import java.nio.file.*; import java.util.Base64; String imgB64 = Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of("car.jpg"))); String json = """ {"Header":{"type":"RQ","token":"%s","product":"AL_0501", "datetime":"%d","uuid":"%s"}, "Body":{"input_data":{"user_id":"%s","package_id":"%s","prod_id":"PD01", "files":{"country_code":"LA","document_type":"license_plate", "file_name":"car.jpg","file_base64":"%s"}}}} """.formatted(AILA_TOKEN, System.currentTimeMillis()/1000, java.util.UUID.randomUUID(), USER_ID, PACKAGE_ID, imgB64); HttpResponse<String> resp = HttpClient.newHttpClient().send( HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-license-plate/detection")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)).build(), HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body());
const imgB64 = await toBase64(carImageFile); const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0501', datetime: String(Math.floor(Date.now()/1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01', files: { country_code: 'LA', document_type: 'license_plate', file_name: carImageFile.name, file_base64: imgB64 } }} }; const data = await (await fetch(BASE_URL + 'aila-license-plate/detection', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) })).json(); console.log(data);
curl -X POST "https://www.ailatech.la/api/v1/services/aila-license-plate/detection" \
-H "Content-Type: application/json" \
-d '{
"Header": {"type":"RQ","token":"your_token","product":"AL_0501","datetime":"1714000000","uuid":"550e8400-..."},
"Body": {
"input_data": {
"user_id":"your_id","package_id":"your_package","prod_id":"PD01",
"files": {
"country_code":"LA","document_type":"license_plate",
"file_name":"car.jpg","file_base64":"BASE64_ENCODED_IMAGE"
}
}
}
}'
{ "plate_number": "ກທ 1234", "confidence": 0.95 }
e-KYC — New Customer Onboarding Try Live
Complete KYC in one call — verify a new customer using their Lao ID card (white AL_0101, green AL_0102, digital AL_0103). Send both the ID card and face photo as base64.
with open("id_card.jpg", "rb") as f: card_b64 = base64.b64encode(f.read()).decode() with open("face.jpg", "rb") as f: face_b64 = base64.b64encode(f.read()).decode() payload = { "Header": { "type": "RQ", "token": AILA_TOKEN, "product": "AL_0101", "datetime": str(int(datetime.now().timestamp())), "uuid": str(uuid.uuid4()) }, "Body": { "input_data": { "user_id": USER_ID, "package_id": PACKAGE_ID, "prod_id": "PD01", "files": { "document_type": "ID_CARD", "document_file_name": "id_card.jpg", "document_file_base64": card_b64, "face_type": "PHOTO", "face_file_name": "face.jpg", "face_file_base64": face_b64 } } } } resp = requests.post(BASE_URL + "aila-e-kyc/new-customer", json=payload) print(resp.json())
import java.net.URI; import java.net.http.*; import java.nio.file.*; import java.util.Base64; String cardB64 = Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of("id_card.jpg"))); String faceB64 = Base64.getEncoder().encodeToString( Files.readAllBytes(Path.of("face.jpg"))); String json = """ {"Header":{"type":"RQ","token":"%s","product":"AL_0101", "datetime":"%d","uuid":"%s"}, "Body":{"input_data":{"user_id":"%s","package_id":"%s","prod_id":"PD01", "files":{ "document_type":"ID_CARD", "document_file_name":"id_card.jpg","document_file_base64":"%s", "face_type":"PHOTO", "face_file_name":"face.jpg","face_file_base64":"%s" }}}} """.formatted(AILA_TOKEN, System.currentTimeMillis()/1000, java.util.UUID.randomUUID(), USER_ID, PACKAGE_ID, cardB64, faceB64); HttpResponse<String> resp = HttpClient.newHttpClient().send( HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-e-kyc/new-customer")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)).build(), HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body());
const cardB64 = await toBase64(idCardFile); const faceB64 = await toBase64(faceFile); const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0101', datetime: String(Math.floor(Date.now()/1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01', files: { document_type: 'ID_CARD', document_file_name: idCardFile.name, document_file_base64: cardB64, face_type: 'PHOTO', face_file_name: faceFile.name, face_file_base64: faceB64 } }} }; const data = await (await fetch(BASE_URL + 'aila-e-kyc/new-customer', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) })).json(); console.log(data);
curl -X POST "https://www.ailatech.la/api/v1/services/aila-e-kyc/new-customer" \
-H "Content-Type: application/json" \
-d '{
"Header": {"type":"RQ","token":"your_token","product":"AL_0101","datetime":"1714000000","uuid":"550e8400-..."},
"Body": {
"input_data": {
"user_id":"your_id","package_id":"your_package","prod_id":"PD01",
"files": {
"document_type": "ID_CARD",
"document_file_name": "id_card.jpg",
"document_file_base64": "BASE64_ID_CARD_IMAGE",
"face_type": "PHOTO",
"face_file_name": "face.jpg",
"face_file_base64": "BASE64_FACE_IMAGE"
}
}
}
}'
{
"status": "success",
"customer_id": "CUS-20260426-001",
"name": "ສົมສີ ດາວງ",
"id_number": "LA-123456",
"verified": true
}
Package Management
Check your API package balance or get an overview of all your packages. These endpoints do not require file uploads.
payload = {
"Header": {
"type": "RQ", "token": AILA_TOKEN, "product": "AL_0702",
"datetime": str(int(datetime.now().timestamp())),
"uuid": str(uuid.uuid4())
},
"Body": {
"input_data": {
"user_id": USER_ID,
"package_id": PACKAGE_ID,
"prod_id": "PD01"
}
}
}
resp = requests.post(BASE_URL + "aila-api/check-package", json=payload)
print(resp.json())
import java.net.URI; import java.net.http.*; String json = """ {"Header":{"type":"RQ","token":"%s","product":"AL_0702", "datetime":"%d","uuid":"%s"}, "Body":{"input_data":{"user_id":"%s","package_id":"%s","prod_id":"PD01"}}} """.formatted(AILA_TOKEN, System.currentTimeMillis()/1000, java.util.UUID.randomUUID(), USER_ID, PACKAGE_ID); HttpResponse<String> resp = HttpClient.newHttpClient().send( HttpRequest.newBuilder() .uri(URI.create(BASE_URL + "aila-api/check-package")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)).build(), HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body());
const payload = { Header: { type: 'RQ', token: AILA_TOKEN, product: 'AL_0702', datetime: String(Math.floor(Date.now()/1000)), uuid: crypto.randomUUID() }, Body: { input_data: { user_id: USER_ID, package_id: PACKAGE_ID, prod_id: 'PD01' }} }; const data = await (await fetch(BASE_URL + 'aila-api/check-package', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) })).json(); console.log(data);
curl -X POST "https://www.ailatech.la/api/v1/services/aila-api/check-package" \
-H "Content-Type: application/json" \
-d '{
"Header": {"type":"RQ","token":"your_token","product":"AL_0702","datetime":"1714000000","uuid":"550e8400-..."},
"Body": {"input_data": {"user_id":"your_id","package_id":"your_package","prod_id":"PD01"}}
}'
{
"package_id": "PK01",
"request_total": 1000,
"request_available": 750,
"request_usage": 250,
"expire_date": "2026-12-31"
}
All API Endpoints
All endpoints accept application/json with the {Header, Body} envelope. Files are sent as base64 strings — no multipart uploads needed.
Detect if a face is live or a spoof attack. Image (AL_0201) or video (AL_0202).
Verify a face matches a registered user. (AL_0302)
Register a new identity with 3 face photos. (AL_0301)
Find the most similar identity from the database. (AL_0303)
Extract text from Lao language documents. (AL_0401)
Extract fields from Lao ID cards (white/green/digital) and passports. (AL_0601-0604)
Detect and read vehicle license plate numbers. (AL_0501 / AL_0502)
e-KYC onboarding — ID card + face photo together. (AL_0101-0103)
Check remaining API balance for a specific package. (AL_0702)
Get usage overview across all your API packages. (AL_0705)
Ready to integrate?
Try the endpoints live in your browser or sign up for an API token to start building.