Translation Task API
Create Translation Task
/v1/translation/createCreate a new translation task for document/file translation.
Example
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
Parameters | Type | Default | Description | Example |
---|---|---|---|---|
*file | binary | - |
| bitcoin.pdf |
*fromLang | String | - |
| English |
*toLang | String | - |
| Simplified Chinese |
model | String | - |
| - |
fileDescription | String | - | Document description. Improve translation quality by providing additional information, such as extra document background information and other translation requirements. | - |
glossary | String | - | Terminology glossary name used for translation | - |
preview | Boolean | false | Generate preview only. When generating preview only, spend 2 credits to generate a document translation preview | - |
shouldTranslateImage | Boolean | false |
| - |
shouldTranslateFileName | Boolean | true | Translate file names | - |
password | String | - | Password for opening PDF files | - |
ignoreComments | Boolean | false | Ignore comments in DOCX, PPTX, and XLSX files | - |
ignoreNotes | Boolean | false | Ignore speaker notes in PPTX files | - |
ignoreHeadersAndFooters | Boolean | false | Ignore headers and footers in DOCX files | - |
ignoreHidden | Boolean | false | Ignore hidden slides in PPTX files | - |
ignoreMasters | Boolean | false | Ignore master slide text in PPTX files | - |
ignoreSheetNames | Boolean | false | Whether to skip translating XLSX sheet names | - |
webhookUrl | String | - | Callback URL for status updates. Callback content includes: {taskId, progress, status} | - |
Response
Parameters | Type | Default | Description | Example |
---|---|---|---|---|
taskId | String | - | Task ID | - |