Integrate AI-powered translation with image and text recognition.
Root endpoint for all API requests
https://aitranslate.in/api
| Parameter | Type | Required | Description |
|---|---|---|---|
authentication |
AuthObject | Yes | Api Key and Secret to authenticate the API call. |
body |
object | Yes | Request Body specific to each API call. |
| Parameter | Type | Description |
|---|---|---|
success |
boolean | Indicates whether the request was successful. |
message |
string | Error Message(if any). For successful calls, this will be empty. |
traceId |
string | Trace Id for each response. Reach us with this value for issues. |
body |
object | Response Body specific to each API call. |
creditTransaction |
CreditTransaction | Credits consumed for each API call. Note: For async calls, credits will be charged when processing is complete. You will get this in callback/status response. |
| Parameter | Type | Description |
|---|---|---|
previousBalance |
number | Your credits before the specific API call. |
creditsCharged |
number | Credits charged for the specific API call. |
postChargeBalance |
number | Credit balance after the specific API call. |
currentBalance |
number | Remaining current Credits in your account. |
validUntil |
datetime | Validity of credits in your account. |
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey |
string | Yes | Your AITranslate API key. |
apiSecret |
string | Yes | Your AITranslate API secret. |
/translate/text
β Translate text ot HTML
Immediately translates text or HTML to target language
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text |
string | Yes | β | Text or HTML to translate. |
sourceLang |
ISO Code (string) | No | auto |
Language to translate from; βautoβ detects automatically. Supported Languages |
targetLang |
ISO Code (string) | Yes | β | Language code for translation output (e.g. βhiβ for Hindi). Supported Languages |
| Parameter | Type | Description |
|---|---|---|
text |
string | Your original text. |
sourceLang |
string | Your input/detected source language. |
targetLang |
string | Your input target language. |
confidence |
number | Confidence score 0-1 for the translation. |
translatedText |
string | Your translated text. |
/translate/file
ASYNC
β Translate image or PDF (posts back when complete)
Initiates an asynchronous translation job for an uploaded image (JPG, PNG) or PDF file.
The API responds immediately with a jobId. Once processing completes,
the results will be posted to your specified callbackUrl.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
fileUrl |
string | Yes | β | Publicly accessible image or PDF file URL. |
sourceLang |
ISO Code (string) | No | auto |
Language to translate from; βautoβ detects automatically. Supported Languages |
targetLang |
ISO Code (string) | Yes | β | Language code for translation output (e.g. βhiβ for Hindi). Supported Languages |
skipLogoAndSeals |
boolean | No | true |
Skip Logo And seals on image. |
callbackUrl |
string | No | β | Webhook URL to receive asynchronous translation results. If you do not want to use this method, you can poll for status. |
convertToPdf |
boolean | No | false |
Whether to return translated output as a downloadable PDF. For input type pdf, output will always be pdf irrespective of this flag. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the translation job. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the translation job. |
fileUrl |
string | Your input file url. |
sourceLang |
string | Your input/detected source language. |
targetLang |
string | Your input target language. |
callbackUrl |
string | Call back url provided by you. |
status |
"processing" | "completed" | "error" | Status of the translation. |
skipLogoAndSeals |
boolean | Whether logo and seals are skipped |
convertToPdf |
boolean | Whether to convert file as pdf. Returns value provided by you. |
downloadUrl |
string | This is the ouput/download url for the translated file. |
/translate/status
β Get Image translation status
Gets the status of a transaction.
The API responds immediately the status of transaction related to jobId.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
jobId |
string | Yes | β | Unique identifier assigned to the translation job. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the translation job. |
fileUrl |
string | Your input file url. |
sourceLang |
string | Your input/detected source language. |
targetLang |
string | Your input target language. |
callbackUrl |
string | Call back url provided by you. |
convertToPdf |
boolean | Whether to convert file as pdf. Returns value provided by you. |
skipLogoAndSeals |
boolean | Whether logo and seals are skipped |
status |
"processing" | "completed" | "error" | Status of the translation. |
downloadUrl |
string | This is the ouput/download url for the translated file. |
/ocr/file
ASYNC
β Perform OCR on image or PDF (posts back when complete)
Initiates an asynchronous OCR job for an uploaded image (JPG, PNG) or PDF file.
The API responds immediately with a jobId. Once processing completes,
the results will be posted to your specified callbackUrl.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
fileUrl |
string | Yes | β | Publicly accessible image or PDF file URL. |
sourceLang |
ISO Code (string) | No | auto |
Language to expect in file; βautoβ detects automatically. Supported Languages |
minConfidenceScore |
number | No | 0.8 |
Minimum confidence level(0-1) to use for text extraction |
skipLogoAndSeals |
boolean | No | true |
Skip Logo And seals on image. |
outputType |
"text" | "full" | No | "full" |
OCR Data format. Pass "text" if you need only extracted text. If you need vertices also, pass "full" |
callbackUrl |
string | No | β | Webhook URL to receive asynchronous OCR results. If you do not want to use this method, you can poll for status. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the OCR job. |
| Parameter | Sub-Parameter | Type | Description |
|---|---|---|---|
jobId |
string | Unique identifier assigned to the OCR job. | |
fileUrl |
string | Your input file url. | |
minConfidenceScore |
number | Minimum confidence level(0-1) used for text extraction | |
skipLogoAndSeals |
boolean | Whether logo and seals are skipped | |
status |
"processing" | "completed" | "error" | Status of the OCR. | |
outputType |
"text" | "full" | OCR Data format. Pass "text" or "full" whatever was requested |
|
data |
OCRData | An Object containing OCR data (differs based on "outputType") |
|
detectedLanguage |
string | Your input/detected source language. | |
pages |
PageData Object Array | An Array containing Page Data (differs based on "outputType") |
"outputType": "text")
| Parameter | Type | Description |
|---|---|---|
text |
string | Extracted text in page. |
confidence |
number | Confidence level(0-1) used for extracted text |
"outputType": "full")
| Parameter | Type | Description |
|---|---|---|
ocrData |
OCR Item Object Array | An Array containing Ocr Item Object |
| Parameter | Type | Description |
|---|---|---|
text |
string | Extracted text in page. |
vertices |
Array | Position of extracted text on page: [[0, 0], [0, 0], [0, 0], [0, 0]]. |
confidence |
number | Confidence level(0-1) used for extracted text |
languages |
string array | Languages detected in text |
/ocr/status
β Get OCR status
Gets the status of an OCR.
The API responds immediately the status of OCR related to jobId.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
jobId |
string | Yes | β | Unique identifier assigned to the OCR job. |
| Parameter | Sub-Parameter | Type | Description |
|---|---|---|---|
jobId |
string | Unique identifier assigned to the OCR job. | |
fileUrl |
string | Your input file url. | |
minConfidenceScore |
number | Minimum confidence level(0-1) used for text extraction | |
skipLogoAndSeals |
boolean | Whether logo and seals are skipped | |
status |
"processing" | "completed" | "error" | Status of the OCR. | |
outputType |
"text" | "full" | OCR Data format. Pass "text" or "full" whatever was requested |
|
data |
OCRData | An Object containing OCR data (differs based on "outputType") |
|
detectedLanguage |
string | Your input/detected source language. | |
pages |
PageData Object Array | An Array containing Page Data (differs based on "outputType") |
"outputType": "text")
| Parameter | Type | Description |
|---|---|---|
text |
string | Extracted text in page. |
confidence |
number | Confidence level(0-1) used for extracted text |
"outputType": "full")
| Parameter | Type | Description |
|---|---|---|
ocrData |
OCR Item Object Array | An Array containing Ocr Item Object |
| Parameter | Type | Description |
|---|---|---|
text |
string | Extracted text in page. |
vertices |
Array | Position of extracted text on page: [[0, 0], [0, 0], [0, 0], [0, 0]]. |
confidence |
number | Confidence level(0-1) used for extracted text |
languages |
string array | Languages detected in text |
/erasure/image
ASYNC
β Erase text on image (posts back when complete)
Initiates an asynchronous erasure job for an uploaded image (JPG, PNG) file.
The API responds immediately with a jobId. Once processing completes,
the results will be posted to your specified callbackUrl.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
fileUrl |
string | Yes | β | Publicly accessible image or PDF file URL. |
sourceLang |
ISO Code (string) | No | auto |
Language to expect on image; βautoβ detects automatically. Supported Languages |
skipLogoAndSeals |
boolean | No | true | Skip Logo And seals on image. |
callbackUrl |
string | No | β | Webhook URL to receive asynchronous erasure results. If you do not want to use this method, you can poll for status. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the erasure job. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the erasure job. |
fileUrl |
string | Your input file url. |
sourceLang |
string | Your input/detected source language. |
callbackUrl |
string | Call back url provided by you. |
status |
"processing" | "completed" | "error" | Status of the translation. |
downloadUrl |
string | This is the ouput/download url for the erased file. |
/erasure/status
β Get Image erasure status
Gets the status of a erasure.
The API responds immediately the status of erasure related to jobId.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
jobId |
string | Yes | β | Unique identifier assigned to the erasure job. |
| Parameter | Type | Description |
|---|---|---|
jobId |
string | Unique identifier assigned to the erasure job. |
fileUrl |
string | Your input file url. |
sourceLang |
string | Your input/detected source language. |
callbackUrl |
string | Call back url provided by you. |
status |
"processing" | "completed" | "error" | Status of the translation. |
downloadUrl |
string | This is the ouput/download url for the erased file. |
/detect/text
β Detect text or HTML's human language
Immediately detects text or HTML's language
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text |
string | Yes | β | Text or HTML to detect language from. |
| Parameter | Type | Description |
|---|---|---|
text |
string | Your original text. |
detectedLang |
string | Your detected text language. |
confidence |
string | Confidence score 0-1 for the detectiion. |
| HTTP Code | Error | Description |
|---|---|---|
400 |
Bad Request | Verify the JSON format and required fields as described in the API documentation. |
401 |
Invalid API Credentials | Authentication failed. Check your apiKey and apiSecret values. |
402 |
Insufficient Credits | Your account does not have enough credits to perform the requested API operation. |
500 |
Internal Server Error | An unexpected error occurred while processing your request. Check the message field in the response for details. |
Donβt have API credentials yet? Sign up and get 20 free credits instantly.