Image Translation Pro

Updated at:

Image Translation Pro uses a proprietary large multimodal model to enable a more precise semantic understanding of images, significantly improving translation quality. It supports automatic source language detection, returns editor layout information for post-editing, and covers over 400 language pairs, including bridged languages. The service offers both synchronous and asynchronous calling modes, selectable via the Async field.

Introduction

Designed for e-commerce images, Image Translation Pro uses a large multimodal model to achieve a more precise understanding of images, significantly improve translation quality, and enhance its multilingual capabilities. The service supports over 400 language pairs, including bridged languages.

Use cases

E-commerce product images, marketing images, and various other images.

Features

  • Main subject protection: Allows you to choose whether to translate text on the main subject of an image. This prevents key information, such as embedded product names, from being translated.

  • Post-translation editing: Returns layout information, such as the position, font, and color of text, to simplify post-editing. Enable this feature by using the UseImageEditor parameter. For a complete description of the fields, see the image translation editor agreement.

  • Brand name protection: Allows you to choose whether to translate brand names that appear in an image.

  • Translation intervention: Customize your translation results. Options include keeping the original text (ABC to ABC), specifying a custom translation (ABC to DEF), or omitting a term from the output (ABC to empty). Common use cases include brand name protection. To apply these rules, pass an intervention glossary ID with your request. An intervention glossary typically supports up to 100,000 terms. If you need a larger capacity, contact us.

Invocation modes

Mode

Scenarios

Invocation method

Synchronous invocation

For single images and low-latency scenarios.

Send a translation request → Wait for the response → Receive the translation result directly.

Asynchronous invocation

For batch translation, large or high-resolution images, or other long-running tasks.

Send a translation request with Async=true → Receive a TaskId → Poll the query interface for the result.

API 1: Submit a translation task

Submit the image URL and the source/target language. If Async=false (or if omitted), the call is synchronous and returns the result directly. If Async=true, the call is asynchronous and returns a TaskId.

POST /rest/ai/image/translation/pro

Request parameters

Parameter

Type

Required

Description

ImageUrl

String

Yes

• Image URL: Must be publicly accessible.

• Supported formats: PNG, JPEG, JPG, BMP, WEBP

• Pixel dimensions: Width and height must not exceed 4000 pixels.

• File size: The source file must be 10 MB or less.

SourceLanguage

String

Yes

The source language code. Set this to auto for automatic detection. For a list of supported language pairs, see Supported Language Pairs for Translation. Example: "en".

TargetLanguage

String

Yes

The target language code. For a list of supported language pairs, see Supported Language Pairs for Translation. Example: "ko".

Async

Boolean

No

Specifies whether to use asynchronous mode. The default is false (synchronous). If this parameter is set to true, the API immediately returns a TaskId. You must then use "API 2: Query Translation Results" to obtain the final result.

IncludingProductArea

Boolean

No

Specifies whether to translate the text on the main subject of the image. The default value is false, which protects primary information (such as product names) from being translated.

UseImageEditor

Boolean

No

Specifies whether to return layout information, such as the position, font, and color of the text. If you set this parameter to true, you can obtain layer information and use the image editor for further editing. The default value is true. If this parameter is enabled, the response additionally returns the Data.GenFiles editor protocol. This protocol includes the source image (SrcImage), editor details (EditInfo), and translation results (ResultList). For a complete list of fields, see Image Translation Editor Protocol.

TranslatingBrandInTheProduct

Boolean

No

Specifies whether to translate brand names in images. The default is false, which means that brand names are not translated.

Glossary

String

No

The ID of a glossary to customize the translation. You must create the glossary in the console and provide its ID. If omitted, no glossary is applied. Example: "glossary_1".

Request example

Synchronous call:

{
  "SourceLanguage": "auto",
  "IncludingProductArea": "true",
  "TranslatingBrandInTheProduct": "true",
  "ImageUrl": "https://example.com/your-image.jpg",
  "TargetLanguage": "en",
  "UseImageEditor": "true"
}

Asynchronous invocation (add Async=true):

{
  "Async": true,
  "SourceLanguage": "auto",
  "IncludingProductArea": "true",
  "TranslatingBrandInTheProduct": "true",
  "ImageUrl": "https://example.com/your-image.jpg",
  "TargetLanguage": "en",
  "UseImageEditor": "true"
}

Response parameters

Synchronous mode response (Async=false or not specified): The Data field directly contains the translation result. The complete fields are as follows:

Field

Type

Description

Code

String

The response code. A value of success indicates that the call was successful. See the error codes for other values.

Message

String

The response message, such as Success.. If an error occurs, this field contains the specific error message.

Data

Object

The final translation result.

Data.UsageMap

Object

The usage statistics.

Data.UsageMap.ProcessedImageCount

Number

The number of processed images.

Data.ResultList

Array[Object]

A list of translation results.

Data.ResultList[].FileUrl

String

The URL of the translated image.

Data.ResultList[].Language

String

The target language.

Data.GenFiles

Array[Object]

Array of editor protocol data. Returned only when UseImageEditor=true. Each element contains SrcImage, EditInfo, and ResultList. For a complete field description, see Image Translation Editor Protocol.

RequestId

String

The unique ID of the request.

Success

Boolean

Indicates whether the request was successful: true or false.

Editor protocol fields (Data.GenFiles)

When UseImageEditor=true, the response additionally returns the following fields. For more information, see Image Translation Editor Agreement.

No.

Parameter

Type

Description

1

Data.GenFiles

Array[Object]

The editor protocol information. This field is returned only when UseImageEditor=true.

2

Data.GenFiles.SrcImage

String

The URL of the source image.

3

Data.GenFiles.EditInfo

Object

The editor details.

4

Data.GenFiles.EditInfo.ResultImageIds

Array[String]

An array of global IDs for the translated images.

5

Data.GenFiles.EditInfo.RepairedUrl

String

The URL of the image after all text has been erased.

6

Data.GenFiles.EditInfo.Languages

Array[String]

A list of translated languages.

7

Data.GenFiles.EditInfo.TextAreas

Array[Object]

A list of text areas.

8

Data.GenFiles.EditInfo.TextAreas.Fontsize

Number

The font size.

9

Data.GenFiles.EditInfo.TextAreas.Content

String

The original text before translation.

10

Data.GenFiles.EditInfo.TextAreas.Color

String

The text color, such as #ffffff.

11

Data.GenFiles.EditInfo.TextAreas.VerticalLayout

String

Vertical alignment. Valid values: center, top, down.

12

Data.GenFiles.EditInfo.TextAreas.HorizontalLayout

String

Horizontal alignment. Valid values: center, left, right.

13

Data.GenFiles.EditInfo.TextAreas.LineCount

Number

The number of lines in the text area.

14

Data.GenFiles.EditInfo.TextAreas.Texts

Array[Object]

A list of translated text items.

15

Data.GenFiles.EditInfo.TextAreas.Texts.Fontsize

Number

The font size.

16

Data.GenFiles.EditInfo.TextAreas.Texts.Language

String

The language.

17

Data.GenFiles.EditInfo.TextAreas.Texts.Valid

Boolean

Indicates whether the text item is valid.

18

Data.GenFiles.EditInfo.TextAreas.Texts.ImageRect

Object

The image inpainting area.

19

Data.GenFiles.EditInfo.TextAreas.Texts.TextRect

Object

The text area.

20

Data.GenFiles.EditInfo.TextAreas.Texts.Color

String

The color.

21

Data.GenFiles.EditInfo.TextAreas.Texts.Value

String

The translated text.

22

Data.GenFiles.EditInfo.TextAreas.Texts.VerticalLayout

String

The vertical alignment.

23

Data.GenFiles.EditInfo.TextAreas.Texts.HorizontalLayout

String

The horizontal alignment.

24

Data.GenFiles.EditInfo.TextAreas.Texts.LineCount

Number

The number of lines in the text area.

25

Data.GenFiles.EditInfo.GoodsRects

Object

The product area.

26

Data.GenFiles.EditInfo.Font

Array[String]

The font type.

27

Data.GenFiles.ResultList

Array[Object]

A list of translation results.

28

Data.GenFiles.ResultList.Language

String

The translated language.

29

Data.GenFiles.ResultList.FileUrl

String

The URL of the translated image.

Asynchronous mode response (Async=true): Returns only the TaskId and Status. You must use the TaskId to call the query API to obtain the result.

Field

Type

Description

Code

String

The response code. A value of success indicates successful task submission.

Message

String

The response message, such as Task submitted successfully..

Data

Object

The task information.

Data.TaskId

String

The ID of the asynchronous task. Use this ID to query the translation result. For a complete description of the fields returned by the query operation, see "API 2: Query translation result".

Data.Status

String

The task status. PENDING indicates the task is submitted and awaiting processing.

RequestId

String

The unique ID of the request.

Success

Boolean

Indicates whether the request was successful: true or false.

Response example

Response in synchronous mode:

{
  "Data": {
    "UsageMap": { "ProcessedImageCount": 1 },
    "ResultList": [
      { "Language": "en", "FileUrl": "http://dashscope-a717.oss-cn-beijing.aliyuncs.com/.../0c3f295c-translated.jpg" }
    ],
    "GenFiles": [
      {
        "SrcImage": "https://example.com/your-image.jpg",
        "EditInfo": {
          "ResultImageIds": ["0c39c8ae-5820-11f1-bbb2-8281b7a4eed1"],
          "RepairedUrl": "http://dashscope-a717.oss-cn-beijing.aliyuncs.com/.../repaired.png",
          "Languages": ["en"],
          "TextAreas": [
            {
              "Fontsize": 32,
              "Content": "萌趣造型·清脆响铃",
              "Color": "#515151",
              "VerticalLayout": "center",
              "HorizontalLayout": "left",
              "LineCount": 1,
              "Texts": [
                {
                  "Fontsize": 29,
                  "Language": "en",
                  "Valid": true,
                  "ImageRect": { "Height": 54, "Left": 43, "Top": 83, "Width": 418, "Degree": 0 },
                  "TextRect": { "Height": 30, "Left": 8, "Top": 95, "Width": 488, "Degree": 0 },
                  "Color": "#515151",
                  "Value": "Adorable Design · Crisp Bell Sound",
                  "VerticalLayout": "center",
                  "HorizontalLayout": "center",
                  "LineCount": 1,
                  "OvisErrMsg": "| ovis time: 0.748"
                }
              ]
            }
          ],
          "GoodsRects": { "Height": 0, "Left": 0, "Top": 0, "Width": 0, "Degree": 0 },
          "Font": ["AlibabaSans-Regular"]
        },
        "ResultList": [
          { "Language": "en", "FileUrl": "http://dashscope-a717.oss-cn-beijing.aliyuncs.com/.../0c3f295c-translated.jpg" }
        ]
      }
    ]
  },
  "RequestId": "61785C32-80C2-19A3-9E55-2C3702C84B40",
  "Message": "Success.",
  "Code": "success",
  "Success": true
}

Response in asynchronous mode (submit):

{
  "Data": {
    "TaskId": "task_20260614_abc123def456",
    "Status": "PENDING"
  },
  "RequestId": "72896D43-91D3-2AB4-AF66-3D4813D95C51",
  "Message": "Task submitted successfully.",
  "Code": "success",
  "Success": true
}

API 2: Query translation results (asynchronous only)

After submitting a task in asynchronous mode, periodically poll the unified asynchronous query API to retrieve the translation results. For details, see Asynchronous Result Query API. The recommended polling interval is 2–5 seconds, with a timeout of 5 minutes.

POST /rest/ai/task/queryTaskResult

Request example

{
  "TaskId": "task_20260614_abc123def456"
}

Response parameters

Parameter

Type

Description

Code

String

The response code. A value of success indicates a successful call.

Message

String

The response message.

Data

Object

The result data.

Data.TaskId

String

The task ID.

Data.Status

String

The task status. For a list of possible values, see the table below.

Data.UsageMap

Object

Usage statistics. This field is returned only when Status is COMPLETED.

Data.UsageMap.ProcessedImageCount

Number

The number of processed images.

Data.ResultList

Array[Object]

The list of translation results. This field is returned only when Status is COMPLETED.

Data.ResultList[].FileUrl

String

The translated image URL.

Data.ResultList[].Language

String

The target language.

Data.GenFiles

Array[Object]

The editor protocol data, which includes SrcImage, EditInfo, and ResultList. This field is returned only when Status is COMPLETED and UseImageEditor is set to true. For details, see Image Translation Editor Protocol.

Data.ErrorCode

String

The error code. This field is returned only when Status is FAILED.

Data.ErrorMessage

String

The error message. This field is returned only when Status is FAILED.

RequestId

String

The request ID.

Success

Boolean

Indicates whether the request was successful.

Possible values for task status:

Status

Description

PENDING

The task has been submitted and is queued for processing.

PROCESSING

The task is being processed.

COMPLETED

The task is complete, and the translation results are available.

FAILED

The task failed. Check the ErrorCode and ErrorMessage fields for details.

Response example

Task in progress:

{
  "Data": {
    "TaskId": "task_20260614_abc123def456",
    "Status": "PROCESSING"
  },
  "RequestId": "83907E54-A2E4-3BC5-B077-4E5924EA6D62",
  "Message": "Task is processing",
  "Code": "success",
  "Success": true
}

Task completed. The GenFiles field has been omitted for brevity; its structure is the same as that returned in synchronous mode.

{
  "Data": {
    "TaskId": "task_20260614_abc123def456",
    "Status": "COMPLETED",
    "UsageMap": { "ProcessedImageCount": 1 },
    "ResultList": [
      { "Language": "en", "FileUrl": "http://dashscope-a717.oss-cn-beijing.aliyuncs.com/.../result.jpg" }
    ],
    "GenFiles": []
  },
  "RequestId": "94A18F65-B3F5-4CD6-C088-5F6A35FB7E73",
  "Message": "Success",
  "Code": "success",
  "Success": true
}

Task failed:

{
  "Data": {
    "TaskId": "task_20260614_abc123def456",
    "Status": "FAILED",
    "ErrorCode": "ImageDownloadFailed",
    "ErrorMessage": "Failed to download source image from the provided URL."
  },
  "RequestId": "A5B29076-C406-5DE7-D199-6078466C8F84",
  "Message": "Task failed",
  "Code": "success",
  "Success": true
}

Asynchronous call workflow

# Step 1: Submit an asynchronous translation task
POST /rest/ai/image/translation/pro
{
  "Async": true,
  "ImageUrl": "https://example.com/product.jpg",
  "SourceLanguage": "zh",
  "TargetLanguage": "en"
}
# Response: {"Data": {"TaskId": "task_xxx", "Status": "PENDING"}, ...}

# Step 2: Poll for the result (recommended interval: 2 to 5 seconds)
POST /rest/ai/task/queryTaskResult
{
  "TaskId": "task_xxx"
}
# Processing: {"Data": {"TaskId": "task_xxx", "Status": "PROCESSING"}, ...}
# Completed: {"Data": {"TaskId": "task_xxx", "Status": "COMPLETED", "ResultList": [...], ...}, ...}

Notes

  • Asynchronous result retention: Asynchronous task results are retained for 7 days by default. After this period, you can no longer retrieve them using the TaskId. Fetch and save the results before they expire.

  • Result image URL expiration: The URLs for translated images contain an expiration signature and are valid for 7 days by default. Download and save the images before they expire.

  • Polling frequency: Poll every 2 to 5 seconds to avoid throttling.

  • Timeout recommendation: A single image translation typically completes in 10 to 30 seconds. Set the timeout for asynchronous polling to 5 minutes.

  • Synchronous mode timeout: A synchronous call has a default timeout of 60 seconds. For large images or slow network connections, use asynchronous mode instead.

Supported language pairs

Image Translation Pro supports automatic source language detection (auto) and, like Text Translation, supports over 400 translation language pairs (covering 156 languages, including bridging). For the complete table of language pairs and language codes, see Language Pair Mapping.

Error codes

The image translation feature commonly returns the following error codes:

  • InvalidParameter — The image width or height exceeds 4000 pixels, the file size exceeds 10 MB, or the image format is unsupported (supported formats are PNG, JPEG, JPG, BMP, or WebP).

  • DownstreamUnavailable — The image URL is not accessible or the image download fails (in asynchronous mode, this maps to ImageDownloadFailed).

  • InputContentBlocked — The image is blocked by content moderation.

For a complete list of error codes and recommended solutions, see Unified error codes.

Usage limits

  • Input image: Width and height ≤ 4000 pixels; file size ≤ 10 MB; PNG/JPEG/JPG/BMP/WebP; publicly accessible.

  • The source and target languages must be different. You can use automatic source language detection (auto).

Billing

¥0.06 per image.