Qwen-MT-Image accurately translates text in images and preserves the original layout. The model also supports custom features such as domain hints, sensitive word filtering, and terminology intervention.
This document applies only to the China (Beijing) region. You must use an API key from this region.
Model overview
Examples
Source language: English |
Japanese |
Portuguese |
Arabic |
Model and pricing
The image translation feature supports translation between Chinese or English and other languages, but does not support direct translation between non-Chinese/English languages, such as from Japanese to Korean. For more information, see Supported languages.
Model | Unit price | Rate limit (shared by Alibaba Cloud account and RAM users) | |
Task submission API RPS limit | Number of concurrent tasks | ||
qwen-mt-image | $0.000431/image | 1 | 2 |
Billing rules
Billing method: You are billed based on the number of successfully generated images. You are charged after a task succeeds (the
task_statusisSUCCEEDED) and an image is generated.Note: If an image contains no translatable text or if no text remains in the non-subject area after subject identification is enabled, the task still succeeds and is billed as normal. In this case, the API returns the message
No text detected for translation.
HTTP
You must obtain an API key and set the API key as an environment variable.
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis
Because image translation takes time, the HTTP API uses an asynchronous mode. The call process involves two steps:
Create a task and obtain a task ID: Send a request to create a task. The request returns a task_id.
Query the task result using the task ID: Use the task_id to poll the task status until the task is complete and you retrieve the image URL.
Step 1: Create a task and get a task ID
After a task is created, use the returned task_id to query the result by polling. The task_id is valid for 24 hours. Do not create the task repeatedly.
Request parameters | Image translation |
Request headers | |
Content-Type The content type of the request. Set this parameter to | |
Authorization The identity authentication credentials for the request. This API uses an Model Studio API key for identity authentication. Example: Bearer sk-xxxx. | |
X-DashScope-Async The asynchronous processing configuration parameter. HTTP requests support only asynchronous processing. You must set this parameter to Important If this request header is missing, the error message "current user api does not support synchronous calls" is returned. | |
Request body | |
model The model name. Set this parameter to | |
input The input parameter object. It contains the following fields: |
Response parameters | Successful responseSave the task_id to query the task status and result. Error responseThe task creation failed. For more information, see Error messages to resolve the issue. |
output Task output information. | |
request_id The unique request ID. You can use this ID to trace and troubleshoot issues. | |
message The detailed information about a failed request. This parameter is not returned if the request is successful. For more information, see Error messages. | |
code The error code for a failed request. This parameter is not returned if the request is successful. For more information, see Error messages. |
Step 2: Query the result using the task ID
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
The model takes about 15 seconds to process a request. Use a polling mechanism with a reasonable query interval, such as 5 seconds, to retrieve the result.
The
task_idis valid for 24 hours. If the ID does not exist or has expired, the task status is returned asUNKNOWN.The
urlreturned for a successful task is valid for 24 hours. Download and save the image promptly.
Request parameters | Query task resultReplace |
Request headers | |
Authorization The identity authentication credentials for the request. This API uses an Model Studio API key for identity authentication. Example: Bearer sk-xxxx. | |
URL path parameters | |
task_id The task ID. |
Response parameters | Task successfulTask data, such as the task status and image URLs, is retained for only 24 hours and is automatically purged after this period. You must save the generated images promptly. Task failedIf a task fails, task_status is set to FAILED, and an error code and message are provided. For more information, see Error messages to resolve the issue. |
output Task output information. | |
usage Usage statistics. These statistics are counted only for successful tasks. | |
request_id The unique request ID. You can use this ID to trace and troubleshoot issues. |
Supported languages
When you translate an image, at least one of the source or target languages must be Chinese or English. Direct translation between two non-Chinese or non-English languages, such as from Japanese to Korean, is not supported. If you are unsure of the source language, you can set source_lang to auto for automatic detection.
Language | Code | As source language | As target language |
Chinese | zh | ||
English | en | ||
Korean | ko | ||
Japanese | ja | ||
Russian | ru | ||
Spanish | es | ||
French | fr | ||
Portuguese | pt | ||
Italian | it | ||
Germany | de | ||
Vietnamese | vi | ||
Malay | ms | ||
Thai | th | ||
Indonesian | id | ||
Arabian | ar |
Configure access permission
Images are stored in Object Storage Service (OSS). The links allow public access and are valid for only 24 hours. If your business system cannot access OSS links because of security policies, you can add the following OSS domain names to your network access whitelist.
dashscope-result-bj.oss-cn-beijing.aliyuncs.com
dashscope-result-hz.oss-cn-hangzhou.aliyuncs.com
dashscope-result-sh.oss-cn-shanghai.aliyuncs.com
dashscope-result-wlcb.oss-cn-wulanchabu.aliyuncs.com
dashscope-result-zjk.oss-cn-zhangjiakou.aliyuncs.com
dashscope-result-sz.oss-cn-shenzhen.aliyuncs.com
dashscope-result-hy.oss-cn-heyuan.aliyuncs.com
dashscope-result-cd.oss-cn-chengdu.aliyuncs.com
dashscope-result-gz.oss-cn-guangzhou.aliyuncs.com
dashscope-result-wlcb-acdr-1.oss-cn-wulanchabu-acdr-1.aliyuncs.comError codes
If a call fails, see Error messages for troubleshooting.
FAQ
Q: How do I convert a temporary image link to a permanent one?
A: You cannot directly convert a temporary link to a permanent one. Instead, download the image through a backend service and then upload it to OSS, to generate a new permanent link.
Q: How do I view my model usage?
A: One hour after a model invocation is complete, you can view metrics such as the call count and success rate on the Model Observation page. For more information, see How do I view model call records?



