Document Directory

Translation Task API

Create Translation Task

/v1/translation/create

Create a new translation task for document/file translation.

Example

curl
1curl -X POST 'https://dltranslator.com/api/v1/translation/create' \
2--header 'Authorization: [yourSecretKey]' \
3--form 'file=@bitcoin.pdf' \
4--form 'fromLang=English' \
5--form 'toLang=Simplified Chinese' 

Request Parameters

ParametersTypeDefaultDescriptionExample
*filebinary-
  • File to be translated
  • Supported file types: Query
bitcoin.pdf
*fromLangString-
  • Source language; the source language cannot be the same as the target language
  • Supported languages: Query
English
*toLangString-
  • Target language; the target language cannot be the same as the source language
  • Supported languages: Query
Simplified Chinese
modelString-
  • AI model for translation
  • Supported models: Query
-
fileDescriptionString-

Document description. Improve translation quality by providing additional information, such as extra document background information and other translation requirements.

-
glossaryString-

Terminology glossary name used for translation

-
previewBooleanfalse

Generate preview only. When generating preview only, spend 2 credits to generate a document translation preview

-
shouldTranslateImageBooleanfalse
  • Whether to translate images within the document
  • Only supports PDF / DOCX / PPTX / EPUB / ODS / ODT / ODF
-
shouldTranslateFileNameBooleantrue

Translate file names

-
passwordString-

Password for opening PDF files

-
ignoreCommentsBooleanfalse

Ignore comments in DOCX, PPTX, and XLSX files

-
ignoreNotesBooleanfalse

Ignore speaker notes in PPTX files

-
ignoreHeadersAndFootersBooleanfalse

Ignore headers and footers in DOCX files

-
ignoreHiddenBooleanfalse

Ignore hidden slides in PPTX files

-
ignoreMastersBooleanfalse

Ignore master slide text in PPTX files

-
ignoreSheetNamesBooleanfalse

Whether to skip translating XLSX sheet names

-
webhookUrlString-

Callback URL for status updates. Callback content includes: {taskId, progress, status}

-

Response

ParametersTypeDefaultDescriptionExample
taskIdString-

Task ID

-
Introduction
Become a Developer
Translation Task API
Query translation tasks