Translate Documents API
ApyHub
150 atoms
Base tier
About
This API lets you translate documents into different languages. The API supports a variety of file formats including PDF, DOC, and image files.
The API follows the ISO 639-1 standard for language codes, ensuring accurate and standardized translations, which is crucial in maintaining consistency across multilingual projects. Additionally, the API offers a transliteration feature to Latin script, helping in the pronunciation of non-Latin scripts.
Try out the API in the API playground now and see how this free document translation API can help you easily translate documents, save time, and reduce errors with a simple API call.
Supported Formats:
pdf
, doc
, docx
, png
, jpg
, jpeg
, tiff
, bmp
, html
, and xml
Supported Languages for Transliteration Arabic (ar), Assamese (as), Bengali (bn), Belarusian (be), Bulgarian (bg), Chinese (Simplified) (zh-Hans), Chinese (Traditional) (zh-Hant), Greek (el), Gujarati (gu), Hebrew (he), Hindi (hi), Japanese (ja), Kannada (kn), Kazakh (kk), Korean (ko), Kyrgyz (ky), Macedonian (mk), Malayalam (ml), Marathi (mr), Mongolian (mn), Odia (or), Persian (fa), Punjabi (pa), Russian (ru), Serbian (Cyrillic) (sr-Cyrl), Sindhi (sd), Sinhala (si), Tajik (tg), Tamil (ta), Tatar (tt), Telugu (te), Thai (th), Ukrainian (uk), Urdu (ur)
Note :- Text that needs to be translated should be below 75K characters.
Select API Endpoints
Input
API Playground
API Documentation
Translate Text File
POST
https://api.apyhub.com/translate/file
Request example
Method:
POST
Content Type:
multipart/form-data
Query Parameter(s)
Attribute | Type | Mandatory | Description |
---|---|---|---|
transliteration | Boolean | No | Set to true if you wish to have the text transliterated to Latin script. Defaults to false . |
file_type | String | No | provide the file type for faster file detection - accepted values are: pdf , doc , docx , png , jpg , jpeg , tiff , bmp , html , and xml |
Request Body
Attribute | Type | Mandatory | Description |
---|---|---|---|
file | File | Yes | File containing text. Supported file formats are pdf , doc , docx , png , jpg , jpeg , tiff , bmp , html , and xml |
language | String | Yes | Desired translation language. Should be specified in ISO 639-1 format. |
Response
Attribute | Type | Description |
---|---|---|
detected_language.language | String | Language of the text extracted from the document. |
detected_language.score | Decimal | Score indicating the proportion of text in the detected language, ranging from 0 to 1. |
translated_language | String | Language to which the text has been translated. |
translation | String | Translation of the extracted text in the specified language. |
transliteration | String | Transliteration of the extracted text to Latin script. Supported languages for transliteration are ar , as , bn , be , bg , zh-Hans , zh-Hant , el , gu , he , hi , ja , kn , kk , ko , ky , mk , ml , mr , mn , or , fa , pa , ru , sr-Cyrl , sd , si , tg , ta , tt , te , th , uk and ur |
Sample Response
HTTP Response Codes
The method may return one of the following HTTP status codes:
Status Code | Description |
---|---|
200 | The request was successful. |
401 | Required authentication information is either missing or not valid for the resource. |
400 | Invalid input |
500 | If any unexpected error occurs while processing the request |
Authentication
All API requests to ApyHub services need to be authenticated. Currently we support
tokens
or basic authentication
mechanisms.
You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".Points to note:
- Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
- Use the
apy-token
as the header parameter to pass the token. - Use the
Authorization
header to send the basic authentication credentials.
Error codes
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.
Table of contents