Translate Multiple Files (currently supports document, summarization)

HTTP request

POST /v3/process

Authorization

OAuth2PasswordBearer(Bearer token or API key)

Authorization: OAuth2PasswordBearer

Header API Key

X-API-Key: <your_api_key>

Request Body schema: json data

KEY
TYPE
VALUE

task_type

String

Classifying tasks corresponding to each translation mode such as: document, images, audio, video, summarization, create_video

original_lang

String

The original language of the content. Optional but recommended for better accuracy.

dest_lang

String

The target language for translation.

process_mode

String

Describes how the file should be processed 'replace', 'append', 'append_reverse' .

translate_type

String

Specifies the translation engine or version to be used. Paraphrase, Professional

meta_files

String

The value is taken from the upload api

Example: [
    {
        "filename": "2.text_image.pdf",
        "status": true,
        "credits": 4.92,
        "task_id": "f911298671b240f5984060c62cbbb218",
        "size": "0.18 MB"
    },
    {
        "filename": "5.text_images.docx",
        "status": true,
        "credits": 2.89,
        "task_id": "af60061f95c8439a9ee55971b37a7e06",
        "size": "0.3 MB"
    }
]

is_translate_images

Bool

Flag indicating whether images within the document should also be translated.

tone

String

Tone of the translation, if applicable

domain_translate_document

String

The domain or field of the content for document, which can help in choosing specialized translation models.

domain_translate_image

String

The domain or field of the content for image, which can help in choosing specialized translation models.

domain_translate_audio

String

The domain or field of the content for audio, which can help in choosing specialized translation models.

domain_translate_video

String

The domain or field of the content video, which can help in choosing specialized translation models.

bilingual_text_style__font

String

Used to set the font for the bilingual translation mode and when process_mode=append

bilingual_text_style__color

String

Used to set the color for the bilingual translation mode and when process_mode=append

dictionary

List

Optional custom dictionary in JSON format to be used for the translation, specifying word-level translations.

Example: [
    {
       "ori_lang": "en",
       "des_lang": "vi"
       "ori_word": "hello",
       "des_word": "xin chào",
    },
    {
       "ori_lang": "en",
       "des_lang": "vi"
       "ori_word": "hi",
       "des_word": "chào",
    }]

custom_prompt

String

Custom prompt to be used for the translation

output_format

String

1. Scanned PDFs

These are image-based PDFs, typically from printed or photographed documents.

  • auto: Automatically selects the best format for readability. The translated text will follow the original content as closely as possible, but layout may vary.

  • docx: Text is extracted and translated with a focus on preserving the original wording. Layout and formatting may not be retained.

  • pptx: Not recommended unless the scanned file has a visual structure that benefits from slide-based formatting.

2. Regular PDFs

These contain selectable digital text and may include structured layouts or design elements.

  • auto: Automatically chooses between DOCX and PPTX to best preserve the original layout and formatting.

  • docx: Suitable for text-based documents. May simplify layout while keeping the content intact.

  • pptx: Best for visually rich documents (e.g., presentations, flyers). Maintains layout, formatting, and visual fidelity.

Response

200: Success

Response schema: application/json

KEY
VALUE

status_code

200

content

{ "data": { "task_id": "0d05c89e6f2c472ab86b291516e8e466" }, "errors": [], "error_description": "", "start_time": "2024-03-11 13:05:42.080757", "end_time": "2024-03-11 13:05:42.348086", "status": "success" }

400: Bad Request

KEY
VALUE

status_code

400

content

{ "data": {}, "errors": [ "Error" ], "error_description": "Error while sending message. Please check server!", "start_time": "yyyy-mm-dd hh-mm-ss utc+7", "end_time": "yyyy-mm-dd hh-mm-ss utc+7" }

401: Authentication Error

KEY
VALUE

status_code

401

content

{ "detail": "Not authenticated" }

Response schema: application/json

detail

Last updated