Transliteration API
This Transliteration API allows users to upload documents and convert the text into the desired target language script while preserving the original pronunciation. It helps transform content between different writing systems efficiently without changing the actual meaning of the text.
Request URL
POST
https://g99.in/api/pdf/transliteration
Request Body Parameters
| Type |
Name |
Optional |
Description |
| File |
file |
Required |
Upload the PDF document required for transliteration. |
| String |
language |
Required |
Target translation language. |
Sample Code
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://g99.in/api/pdf/transliteration',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('file'=> new CURLFILE(' --Uploaded File Path-- '),'language' => 'English'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://g99.in/api/pdf/transliteration"
payload = {'language': 'English'}
files=[
('file',('english story.docx',open(' --Uploaded File Path-- ','rb'),' --Uploaded File MIME Type-- '))
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://g99.in/api/pdf/transliteration");
var content = new MultipartFormDataContent();
content.Add(new StreamContent(File.OpenRead(" --Uploaded File Path-- ")), "file", " --Uploaded File Path-- ");
content.Add(new StringContent("English"), "language");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
HTTP status code 200
| Key |
Type |
Description |
| data |
String |
Translated output of the given document in the targeted language. |
Sample Response
Sample response for valid document
oka adavilo oka kaki undedi. okaroju vesavi kaalamlo daaniki chala dhaaham vesindi. neella kosam adavi anthaa vetikindi, kaani ekkadaa neellu dorakaledu.
chivariki, oka inti daggara daaniki oka kunda kanipinchindi.kaki santhoshamga kunda daggaraku vellindi. kaani, kundalo neellu chala aduguna unnayi. kaki
mukku neellaku andaledu. elagaina neellu thagaalanukundi. daaniki oka upayam thattindi.chuttupakkala unna chinna chinna rallanu thana mukkutho tecchi
kundalo veyadam modalupettindi. rallu vesekoddi, kundalo neellu paiki vachayi. kaki haayigaa neellu thagi, dhaaham teerchukuni santhoshamga egiripoyindi.
Error Response
| Parameter |
Type |
Description |
| status |
Number |
Unique error codes for different errors. Always available. |
| message |
String |
Error message describing the error. Always Available. |
| error |
Boolean |
True / False for different errors. Always available. |
Error Codes
| HTTP Status |
Error Code |
Error Message |
| 400 |
400 |
Malformed data or missing required parameter values. |
| 415 |
415 |
Only PDF files are allowed. |
| 413 |
413 |
Please upload a file smaller than 50MB. |
| 422 |
422 |
Unable to extract data from the PDF file. |
| 503 |
503 |
Document processing service is currently unavailable. Please try again later. |
Sample Error Response
{
"message": "Malformed data or missing required parameter values.",
"status": 400,
"error": True
}