Image Translation Standard Edition (asynchronous)
1. Introduction
The Image Translation service translates text in e-commerce images, supporting over 400 language pairs (including bridged languages). It accurately processes complex text layouts within images and ensures the translated content matches the visual context, allowing e-commerce platforms and developers to easily display image content in multiple languages. The service can also return text layer information, such as text position, font, and color, to enable post-translation editing in an image editor.
2. Use Cases
Ideal for e-commerce product images, marketing materials, and various other types of images.
3. Features
Preserve Main Product Information: You can choose not to translate text in the main product area. This feature prevents unwanted translation of key information, such as embedded product names.
Preserve Brand Names: You can choose not to translate brand names that appear in the image. This helps protect your brand identity by preventing unintended translations.
Enable Post-Translation Editing: You can choose to receive layer information, including text position, font, and color. This data can be used with an image editor to edit the translation results. For updates on the availability of the editor SDK package, please refer to platform announcements.
Customize Translations with a Glossary: You can customize translation outcomes using a glossary. This includes specifying terms that should not be translated (for example, ABC to ABC), providing a specific translation (for example, ABC to DEF), or omitting a translation entirely (for example, ABC to an empty value). This feature is commonly used for brand term protection. To apply these rules, pass the corresponding glossary ID when calling the API. You can typically upload up to 100,000 glossary entries. To request a larger capacity, contact the platform.
4. Getting Started
4.1 Before you begin
Image Translation Standard Edition supports both synchronous and asynchronous API calls. This topic describes the asynchronous API. For information about synchronous calls, see Image Translation Standard Edition.
The asynchronous APIs for Image Translation Standard Edition and other services share the same result retrieval process, RocketMQ subscription rules, message encryption protocol, dependency configurations, and Java code for message consumption and decryption.
See Asynchronous API Call Instructions for details on the integration process, subscription rules, message format, and the encryption protocol.
5. API Reference
5.1 Request parameters
Parameter | Type | Required | Description |
ImageUrl | String | Yes | • A publicly accessible URL for the image. • Supported formats: PNG, JPEG, JPG, BMP, or WEBP. • Maximum dimensions: 4,000 × 4,000 pixels. • Maximum file size: 10 MB. |
SourceLanguage | String | Yes | The source language code. For supported language pairs, see Section 6. Example: "en" |
TargetLanguage | String | Yes | The target language code. For supported language pairs, see Section 6. Example: "ko" |
IncludingProductArea | Boolean | No | Specifies whether to translate text on the main product area. Set this to Example: "true" |
TranslatingBrandInTheProduct | Boolean | No | Specifies whether to translate brand names in the image. Set to Example: "true" |
UseImageEditor | Boolean | No | Specifies whether to return layer information such as the position, font, and color of the text. Set this to Example: "false" |
Glossary | String | No | The ID of the glossary for customizing translations. You must create the glossary in the console and provide its ID in the request. If unspecified, no custom rules are applied. Example: "glossary_1" |
5.2 Request example
{
"ImageUrl": "https://img.alicdn.com/imgextra/i3/O1CN01HTDhDi28Fd85ZYs7H_!!6000000007903-0-tps-800-800.jpg",
"SourceLanguage": "en",
"TargetLanguage": "vi",
"IncludingProductArea": "true",
"TranslatingBrandInTheProduct": "true",
"UseImageEditor": "true",
"Glossary": null
}5.3 Response parameters
After a successful submission, the API returns a TaskId. The response does not contain the translation results or final usage data. A Success=true response indicates only that the task was submitted, not that it is complete. Save the task ID and follow the Asynchronous API Call Instructions to query the task status or receive result notifications.
Parameter | Type | Description |
RequestId | String | The ID of this request, used for troubleshooting. |
Code | String | The response code for the submission call. A successful call returns |
Success | Boolean | Indicates whether the submission was successful. This does not mean the translation task is complete. |
Message | String | A description of the call status. For example, |
Data | Object | Data related to the submitted task. |
Data.TaskId | String | The task ID for the asynchronous task, used for querying results and receiving notifications. Do not hard-code the example prefix as a validation rule in your business logic. |
5.4 Task submission response example
{
"Data": {
"TaskId": "TID_2c6519c0-834b-4529-9d89-f92e2763890f"
},
"RequestId": "01A11FA1-F64C-14E9-A486-E0CCF9A4F13D",
"Message": "Success",
"Code": "success",
"Success": true
}5.5 Throttling and error handling
Asynchronous submissions are throttled per primary account, with a default limit of 1 QPS. To request a higher limit, contact the product team with your account UID.
The
QueryAsyncTaskResultAPI has a public rate limit of 5 calls per second, though your account's actual quota and dimensions depend on your service configuration. For multiple concurrent tasks, manage your query frequency centrally. Set polling intervals based on acceptable business latency, and implement a retry strategy with backoff and random jitter to handle throttling and transient errors. You should also set a local timeout.If the API call fails, check the
Code,Message, andRequestIdfields. If a task status isFAILED, retrieve the failure details from the business results. For a list of common error codes, see Error Codes. Do not add unverified error codes to your logic. Retrying a submission request creates a new task because the API does not support idempotence keys or a cancellation method.For troubleshooting, log the
RequestId,TaskId, call time, and status for both submission and query calls. Do not log the full source text, plaintext messages, or secret keys. Follow the general integration documentation for requirements on consumption acknowledgment, redelivery, idempotence, and fallback query mechanisms.
6. Supported language pairs
For a detailed list of supported language pairs, see Language Pair Mappings.
7. Billing
For details, see Billing.