Model overview
Qwen-MT-Uni is a fully multimodal translation model for images, text, audio, and a wide range of document formats. Through a unified pipeline of format detection, intelligent routing, content extraction, cross-modal translation, and original-format reconstruction, it delivers high-fidelity, end-to-end translation across input types. The model supports both synchronous invocation (the request waits for processing and returns the result directly — suitable for text, images, and small files) and asynchronous invocation (add the header X-DashScope-Async: enable; the API returns a task_id and you poll the query endpoint — suitable for large documents and long audio).
The API follows the DashScope standard protocol. For synchronous calls, a top-level string code means failure (error code = code, reason = message); otherwise a top-level output object means success (result in output.Data, usage in usage). For asynchronous calls, poll the query endpoint until output.task_status = SUCCEEDED, then check output.Success: true = business success, false = business failure (see output.Code and output.Message for details).
Prerequisites
Obtain an API key and export it as an environment variable.
- String: input
str or list[str]; output keeps the same scalar/array shape.
- PDF: input
.pdf; output .pdf.
- Word: input
.docx; output .docx.
- PowerPoint: input
.pptx; output .pptx.
- Excel: input
.xlsx; output .xlsx.
- TXT: input
.txt; output .txt.
- HTML: input
.html, .htm; output .html.
- Markdown: input
.md, .markdown, .mdown, .mkd; output .md.
- Image: input
.png, .jpg, .jpeg; output .jpg.
- Audio: input
.mp3, .wav; output .mp3.
Note
- A single file must not exceed 100 MB; documents must not exceed 200 pages; audio duration must be between 3 seconds and 60 minutes.
- URLs must not contain non-ASCII characters.
- Legacy binary Word (
.doc) and PowerPoint (.ppt) must be converted to OOXML (.docx/.pptx) before submission.
Synchronous call
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation. Replace {WorkspaceId} with your actual Workspace ID.
In synchronous mode the request blocks until processing is complete and returns the translation result (text or translated file URL) directly. No polling required.
RequestRequest headersContent-Typestring(required) Content type. Must be application/json. Authorizationstring(required) Authentication credentials — an Alibaba Cloud Model Studio API key. Example: Bearer sk-xxxx. Request bodymodel string (required) Model name. Set to qwen-mt-uni. input object (required) Input parameters, containing the following fields: Properties fileUrl string (conditionally required) A publicly accessible HTTP(S) URL. The server automatically detects the modality (document / image / audio).
- Supported formats: PDF, DOCX, PPTX, XLSX, TXT, HTML, Markdown, JPG, PNG, MP3, WAV.
- Size limits: single file ≤ 100 MB, documents ≤ 200 pages, audio duration must be between 3 seconds and 60 minutes.
- URLs must not contain non-ASCII characters.
- Must provide exactly one of
fileUrl or source_texts.
source_texts string | array<string> (conditionally required) A non-empty string or an array of non-empty strings. Batch translations preserve input order; the response preserves the scalar/array shape. Must provide exactly one of fileUrl or source_texts. source_lang string (optional) Source language code, e.g. zh. If omitted, the source language is auto-detected. target_lang string (required) Target language code or supported language name, e.g. ko. See Supported languages. ext object (optional) Extension fields. Properties domainHint string (optional) English domain hint, up to 200 English words. Use it to shape translation style for a specific domain (usage scenario, tone, etc.). ImportantDomain hints currently only support English. Example: These sentences are from seller-buyer conversations on a B2C ecommerce platform. Translate them into clear, engaging customer service language. format_hint string (optional) Format hint. Use when fileUrl has no recognizable file extension to explicitly declare the format, e.g. pdf, image. sensitives array (optional) Sensitive-word list, case-sensitive, up to 50 non-empty strings. When extracted text exactly matches an item, the original text is preserved and not sent to the model. Example: ["10% off site-wide", "7-day free return"] glossary array (optional) Glossary, up to 100 entries of {"src": "source text", "tgt": "target text"}. Currently applied as a prompt-level glossary; supports keeping the source unchanged, forcing a specific translation, and empty target values. Example: [{"src": "application programming interface", "tgt": "API"}, {"src": "machine learning", "tgt": "ML"}] config object (optional) Properties imageSegment bool (optional) Applies to image inputs only. Whether to enable subject segmentation. When enabled, text on subjects (people, products, logos) is skipped during translation.
false: (default) translate all text in the image.
true: skip text on image subjects.
| curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-mt-uni",
"input": {
"fileUrl": "https://maas-infra-public.oss-cn-hangzhou.aliyuncs.com/lzhe/test/03bc3a6a-a02b-11f1-8874-00163e79676e.jpg",
"target_lang": "zh"
}
}'
|
Response (success)output object Business result envelope. Returned on success, omitted on failure. Properties Success boolean true if the business call succeeded.
Code integer Business result code. 200 on success. Message string Result message. Always Success on success. RequestId string Unique request ID, useful for tracing. Data object Translation result. Properties FileType string Result type. One of strings / document / image / audio. TranslatedTexts string | array<string> Text translation result. Returned only when source_texts is provided. Preserves the scalar/array shape of the input. TranslatedFileUrl string Download URL of the translated file (signed, time-limited). Returned only when fileUrl is provided. usage object Top-level token usage. Billed by input_tokens. Properties input_tokens integer Total input tokens. output_tokens integer Total output tokens. total_tokens integer Sum of input and output tokens. input_tokens_details object Per-modality input token breakdown: document_tokens, audio_tokens, character_tokens, image_tokens. output_tokens_details object Per-modality output token breakdown. Same fields as input_tokens_details. request_id string Top-level request ID. Returned on both success and failure. Response (failure)code string Error code string, e.g. InvalidParameter. Failure only. message string Error detail, e.g. InvalidParameter: <reason>. Failure only. request_id string Request ID. | Success{
"output": {
"Code": 200,
"Data": {
"FileType": "image",
"TranslatedFileUrl": "http://dashscope-a717.oss-cn-beijing.aliyuncs.com/xxx.jpg?Expires=xxx"
},
"Message": "Success",
"RequestId": "a20aa16a-2445-929f-9130-af70b4a0ade4",
"Success": true
},
"usage": {
"input_tokens": 1887,
"input_tokens_details": {
"audio_tokens": 0,
"character_tokens": 0,
"document_tokens": 0,
"image_tokens": 1887
},
"output_tokens": 1887,
"output_tokens_details": {
"audio_tokens": 0,
"character_tokens": 0,
"document_tokens": 0,
"image_tokens": 1887
},
"total_tokens": 3774
},
"request_id": "a20aa16a-2445-929f-9130-af70b4a0ade4"
}
FailureSee error codes for resolution. {
"code": "InvalidParameter",
"message": "InvalidParameter: missing required field: input.target_lang",
"request_id": "a20aa16a-2445-929f-9130-af70b4a0ade4"
}
|
Asynchronous call
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation. Replace {WorkspaceId} with your actual Workspace ID.
Async invocation is a two-step flow:
- Submit task, receive task ID: send a request to create a task. The response returns a task ID (
task_id).
- Poll for result by task ID: poll the query endpoint with
task_id until the task completes and returns the translated file URL or text.
Step 1: Submit task and receive task ID
Note
- Once created, poll with the returned
task_id. The task_id is valid for 24 hours. Do not resubmit the same task; poll instead.
- Request parameters are identical to the synchronous call except that the header
X-DashScope-Async: enable must be added.
Request Request headersContent-Typestring(required) Content type. Must be application/json. Authorizationstring(required) Authentication credentials — an Alibaba Cloud Model Studio API key. Example: Bearer sk-xxxx. X-DashScope-Asyncstring(required) Async mode switch. Must be set to enable. Without this header the call runs synchronously. Request bodyThe body is identical to the synchronous call, including model and the full input object (fileUrl/source_texts, source_lang, target_lang, ext, ...). | curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-mt-uni",
"input": {
"fileUrl": "https://maas-infra-public.oss-cn-hangzhou.aliyuncs.com/lzhe/test/03bc3a6a-a02b-11f1-8874-00163e79676e.jpg",
"target_lang": "zh"
}
}'
|
Response output object Task output. Properties task_id string Task ID. Query validity is 24 hours. task_status string Task status. Enum values
PENDING: queued
RUNNING: processing
SUCCEEDED: task has finished; combine with output.Success to determine business success
FAILED: task itself failed
UNKNOWN: task does not exist or status is unknown
request_id string Unique request ID for tracing. | SuccessSave task_id to query task status and result. {
"output": {
"task_id": "5dfd1549-e956-4f26-8802-6c9e06f704c6",
"task_status": "PENDING"
},
"request_id": "fe9a9059-02dd-497c-a62c-8e27a0081c02"
}
FailureTask creation failed. See error codes for resolution. {
"code": "InvalidParameter",
"message": "InvalidParameter: missing required field: input.target_lang",
"request_id": "a20aa16a-2445-929f-9130-af70b4a0ade4"
}
|
Step 2: Query result by task ID
GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
Note
task_id is valid for 24 hours. If the ID does not exist or has expired, the task status returns UNKNOWN.
- The
TranslatedFileUrl returned on success is valid for 24 hours. Download and save the file promptly.
- The default RPS of this query endpoint is 1. For higher-frequency polling or event notifications, configure async task callback.
RequestRequest headersAuthorizationstring(required) Authentication credentials. Example: Bearer sk-xxxx. URL path parameterstask_id string (required) Task ID returned by the create-task endpoint. | Query task resultReplace 86ecf553-d340-4e21-xxxxxxxxx with your actual task_id. curl -X GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/86ecf553-d340-4e21-xxxxxxxxx \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"
|
ResponseNoteField visibility: while task_status is PENDING / RUNNING, TranslatedFileUrl, TranslatedTexts, usage, and end_time are empty. Continue polling. output object Task status and result. Properties task_id string Task ID. Returned in all three states. task_status string Task status. PENDING = queued; RUNNING = in progress; SUCCEEDED = finished. On business failure this is still SUCCEEDED; combine with output.Success to determine business success. submit_time string Submission time, format yyyy-MM-dd HH:mm:ss.SSS. Returned in success and failure examples. scheduled_time string Scheduling time, format yyyy-MM-dd HH:mm:ss.SSS. Returned in success and failure examples. end_time string End time, format yyyy-MM-dd HH:mm:ss.SSS. Returned in success and failure examples. Success boolean Whether the business logic succeeded. true = success, false = failure. Not returned in the pending example. Code integer Business result code. 200 = success, 400 = invalid parameters. Not returned in the pending example. Message string Business result message. Success on success; on failure, e.g. InvalidParameter: missing required field: input.target_lang. RequestId string Business request ID. Returned in success and failure examples. Data object Translation result. Returned only on business success. Properties FileType string Result type: strings / document / image / audio. TranslatedFileUrl string Signed, time-limited download URL of the translated file. Returned only when fileUrl was provided. TranslatedTexts string | array<string> Text translation result. Returned only when source_texts was provided. Preserves the scalar/array shape. usage object Token usage. Populated on success, {} on failure, absent while pending. Fields identical to the synchronous call. request_id string Query request ID. Returned in all three states. | Pending / running{
"request_id": "6e8d1dd6-9e02-9793-ad25-6e7fda5eeea0",
"output": {
"task_id": "df8fc25e-b9ee-4e96-9aa2-24d69681299e",
"task_status": "PENDING"
}
}
Succeeded{
"request_id": "47bb236e-4ecc-90a7-ac39-9ab3435d2cc8",
"output": {
"task_id": "9a7ccda6-4604-4541-a2f3-f9d412c0779b",
"task_status": "SUCCEEDED",
"submit_time": "2026-09-15 13:35:06.883",
"scheduled_time": "2026-09-15 13:35:06.931",
"end_time": "2026-09-15 13:35:10.149",
"Message": "Success",
"RequestId": "9a7ccda6-4604-4541-a2f3-f9d412c0779b",
"Data": {
"FileType": "image",
"TranslatedFileUrl": "http://dashscope-a717.oss-cn-beijing.aliyuncs.com/xxx.jpg?Expires=xxx"
},
"Code": 200,
"Success": true
},
"usage": {
"input_tokens_details": {
"document_tokens": 0,
"audio_tokens": 0,
"character_tokens": 0,
"image_tokens": 1887
},
"total_tokens": 3774,
"output_tokens": 1887,
"input_tokens": 1887,
"output_tokens_details": {
"document_tokens": 0,
"audio_tokens": 0,
"character_tokens": 0,
"image_tokens": 1887
}
}
}
Business failedNote that task_status is still SUCCEEDED on business failure; use output.Success = false to detect it. {
"request_id": "<query-request-id>",
"output": {
"task_id": "<task-id>",
"task_status": "SUCCEEDED",
"submit_time": "2026-09-14 11:09:36.876",
"scheduled_time": "2026-09-14 11:09:36.926",
"end_time": "2026-09-14 11:09:37.050",
"Success": false,
"Code": 400,
"Message": "InvalidParameter: missing required field: input.target_lang",
"RequestId": "<=task_id>"
},
"usage": {}
}
|
Supported languages
If you are unsure of the source language, leave source_lang empty for auto-detection. The table below lists all supported translation directions:
| Source (name) | Source (code) | Available targets |
|---|
| Chinese (Simplified) | zh | Traditional Chinese (zh-tw), English (en), Japanese (ja), Korean (ko), Kazakh (kk), Malay (ms), Thai (th) |
| Chinese (Traditional) | zh-tw | Simplified Chinese (zh), English (en), Japanese (ja), Korean (ko), Kazakh (kk), Malay (ms), Thai (th) |
| English | en | Arabic (ar), Azerbaijani (az), Bengali (bn), Bosnian (bs), Czech (cs), Danish (da), German (de), Greek (el), Spanish (es), Estonian (et), Finnish (fi), French (fr), Hebrew (he), Hindi (hi), Hungarian (hu), Indonesian (id), Italian (it), Japanese (ja), Korean (ko), Lithuanian (lt), Latvian (lv), Malay (ms), Burmese (my), Nepali (ne), Dutch (nl), Norwegian (no), Polish (pl), Portuguese-Brazil (pt), Portuguese-Portugal (pt-pt), Romanian (ro), Romanian-Urdu (ro_ur), Russian (ru), Sinhala (si), Slovak (sk), Slovenian (sl), Serbian (sr), Swedish (sv), Thai (th), Filipino (tl), Turkish (tr), Ukrainian (uk), Urdu (ur), Vietnamese (vi), Simplified Chinese (zh), Traditional Chinese (zh-tw) |
| Spanish | es | Bulgarian (bg), Czech (cs), Danish (da), German (de), Greek (el), English (en), Estonian (et), Finnish (fi), French (fr), Croatian (hr), Hungarian (hu), Italian (it), Lithuanian (lt), Latvian (lv), Dutch (nl), Norwegian (no), Polish (pl), Portuguese-Brazil (pt), Portuguese-Portugal (pt-pt), Romanian (ro), Russian (ru), Slovak (sk), Swedish (sv) |
| Arabic | ar | English (en), Turkish (tr) |
| Turkish | tr | Arabic (ar), Czech (cs), German (de), Greek (el), English (en), Hungarian (hu), Romanian (ro), Slovak (sk) |
| Romanian | ro | English (en), Turkish (tr) |
| Azerbaijani | az | English (en) |
| Bengali | bn | English (en) |
| Czech | cs | English (en) |
| German | de | English (en) |
| Greek | el | English (en) |
| Finnish | fi | English (en) |
| French | fr | English (en) |
| Hebrew | he | English (en) |
| Hindi | hi | English (en) |
| Hungarian | hu | English (en) |
| Indonesian | id | English (en) |
| Italian | it | English (en) |
| Japanese | ja | English (en) |
| Korean | ko | English (en) |
| Malay | ms | English (en) |
| Burmese | my | English (en) |
| Nepali | ne | English (en) |
| Dutch | nl | English (en) |
| Polish | pl | English (en) |
| Portuguese (Brazil) | pt | English (en) |
| Russian | ru | English (en) |
| Sinhala | si | English (en) |
| Swedish | sv | English (en) |
| Thai | th | English (en) |
| Filipino | tl | English (en) |
| Ukrainian | uk | English (en) |
| Urdu | ur | English (en) |
| Vietnamese | vi | English (en) |
| Bulgarian | bg | English (en) |
| Bosnian | bs | English (en) |
| Danish | da | English (en) |
| Estonian | et | English (en) |
| Croatian | hr | English (en) |
| Lithuanian | lt | English (en) |
| Latvian | lv | English (en) |
| Norwegian | no | English (en) |
| Portuguese (Portugal) | pt-pt | English (en) |
| Romanian (Urdu) | ro_ur | English (en) |
| Slovak | sk | English (en) |
| Slovenian | sl | English (en) |
| Serbian | sr | English (en) |
Billing and rate limits
- Free quota and unit price: see Model pricing.
- Rate limits: see Rate limits.
- Billing rule: billed by
input_tokens. Prices are identical for synchronous and asynchronous calls.
- Note: failed calls do not incur charges and do not consume the new-user free quota.
Error codes
See Error codes.