Doctranslate.io Translation API
  • Introduction
    • Welcome to Doctranslate.io
    • What is DocTranslate.io
    • User Manual
  • Document Translation API
    • System requirement
    • Upload API
      • Upload multiple files and calculate usage cost
    • User API
      • User History
    • Translation API
      • API V1
        • Document Translation
        • Translate Multiple Files (currently supports document, video)
        • Image Translation
        • Audio Translation
        • Text Translation
        • Get result
      • API V2
        • Document Translation
        • Translate Multiple Files (currently supports document, video)
        • Image Translation
        • Audio Translation
        • Text Translation
        • Get result
      • API V3
        • Document Translation
        • Translate Multiple Files (currently supports document, video)
        • Audio Translation
        • Text Translation
        • Get result
    • Presentation Maker API
      • API V1
        • Presentation Maker
        • Presentation Maker For Multiple Files
      • API V2
        • Presentation Maker
        • Presentation Maker For Multiple Files
  • Presentation Video API
    • API V1
      • Create transcripts presentation
      • Update transcripts presentation
      • Create video presentation
      • Get result
    • API V2
      • Create transcripts presentation
      • Update transcripts presentation
      • Create video presentation
      • Get result
  • Others
    • Code examples
      • API V1
        • Upload Multiple Files
        • Translate Multiple Document Files
        • Text Translation
        • Document Translation
        • Image Translation
        • Audio Translation
        • Video Translation
        • Presentation Maker
        • Presentation Video
      • API V2
        • Upload Multiple Files
        • Translate Multiple Document Files
        • Text Translation
        • Document Translation
        • Image Translation
        • Audio Translation
        • Video Translation
        • Presentation Maker
        • Presentation Video
    • Support
Powered by GitBook
On this page
  1. Document Translation API
  2. Translation API
  3. API V3

Document Translation

HTTP request

POST /v3/translate/document

Authorization

OAuth2PasswordBearer

Authorization: OAuth2PasswordBearer

Request Body schema: multipart/form-data

KEY
TYPE
VALUE

file

File

Upload the document to be translated. Supported formats include DOCX, PDF, PPTX, and XLSX.

file_type

String

The type of the file being translated. Supported formats include DOCX, PDF, PPTX, and XLSX.

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' .

style_mode

Interger

Default: 0

Specifies the styling preference for the translation output. Influences formatting and presentation.

translate_type

String

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

is_translate_images

Bool

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

tone

String

Tone of the translation, if applicable

domain

String

The domain or field of the content, 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

String

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

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

PreviousAPI V3NextTranslate Multiple Files (currently supports document, video)

Last updated 3 days ago