Image Translation Standard Version API Reference
Last updated
Was this helpful?
Last updated
Was this helpful?
GET/POST
/ai/image/translation
Image Translation is specially designed for e-commerce images, supporting 198 languages. It accurately handles complex text layouts within images and ensures that the translated content matches the image content. This helps e-commerce platforms and developers easily achieve multilingual conversion and presentation of image content.
imageUrl
String
Yes
Source image URL
Image requirements:No more than 4000x4000 pixel. Size up to 10MB. Supporting png, jpeg, jpgm, bmp, webp.
sourceLanguage
String
Yes
Source language code. Supporting languages as the appendix shows.
Sample: en
targetLanguage
String
Yes
Target language code. Supporting languages as the appendix shows.
Sample: ko
translatingTextInTheProduct
Boolean
No
Choose whether to translate the text within the main subject of images; this allows you to protect and avoid translating embedded information such as product names.
As shown in the example image, the text in the red box represents the text on the main subject, while the text in the blue box represents text not on the main subject.
Sample:false
useImageEditor
Boolean
No
Sample: false
translatingBrandInTheProduct
Boolean
No
Choose whether to translate brand names in images. This can help you protect brand name information and avoid translation.
Default: false (which means brand names will not be translated)
resCode
Number
Response code;200 indicates a successful call. For other response codes,please refer to the error code information.
data
Object
Result data that generated.
data.imageUrl
String
The image URL of the translation result.
data.imageEditorId
String
The parameter protocol query ID required by the image editor (exposed when the request parameter useImageEditor is set to true).
requestId
String
Request ID;Used to identify a unique request call.
success
Boolean
Whether successful;true is successful,false is unsuccessful.
resMessage
String
Error message,e.g. "content has sensitive data, please try other input".
501
rate limit exceed
700
invalid input
The format of the input parameters does not meet the requirements, and resMessage will return detailed fields that do not meet the requirements.
703
image size exceeds the limit
The image size in the request parameters exceeds the limit; the dimensions of the image must not exceed 4000x4000 pixels.
704
invalid image form
The image format in the request parameters is invalid.
705
image file size exceeds the limit
The image size in the request parameters exceeds the limit; the image size must not exceed 10MB.
801
model failed
900
tpp url error
1000
content has sensitive data, please try other input
Content has sensitive data, please try other input.
1001
content control failed, please retry
1002
content risk filter failed, please contact us
Source language
Target language
●Chinese (Simplified) ●English
●Turkish
●Japanese
●French
●Korean
●Spanish
●Italian
●Portuguese
●Chinese ●Arabic ●Bengali ●German ●Spanish ●French
●Hebrew ●Indonesia ●Italian ●Japanese ●Malaysia ●Dutch ●Polish ●Portuguese ●Russian ●Thai ●Korean ●Turkish ●Ukrainian ●Urdu ●Vietnamese
●English ●Kazakh (only Chinese source language is supported)
●Chinese (Traditional)(only Chinese and English as source languages are supported)
●Czech (only English and Turkish as source languages are supported)
●Greek (only English and Turkish as source languages are supported)
●Hungarian (only English and Turkish as source languages are supported )sh as source language is supported)
Arabic
ar
Chinese (Simplified)
zh
Chinese (Traditional)
zh-tw
English
en
French
fr
Japanese
ja
Korean
ko
Portuguese (Portugal)
pt
Russian
ru
Spanish
es
Turkish
tr
Hebrew
he
Vietnamese
vi
Thai
th
Indonesia
id
German
de
Polish
pl
Dutch
nl
Italian
it
Ukrainian
uk
Malay
ms
Bengali
bn
Urdu
ur
Kazakh
kk
Czech
cs
Greek
el
Hungarian
hu
Sample:
Whether it return layout information such as the position, font, and color of the text. This is used to obtain data for secondary editing when integrating with the image editor. After receiving the returned ID, you can call to get the complete parameter information.
For example, in the sample image, "懒角落" represents a brand name.
Sample: false
The current interface has reached the current limit. Please contact us via or email us (aidgesales@alibaba-inc.com) to increase the current limit value.
Internal call exception, please contact us via or email us (aidgesales@alibaba-inc.com) for troubleshooting.
Internal call exception, please contact us via or email us (aidgesales@alibaba-inc.com) for troubleshooting.
Content control failed, please retry. If the error persists, please contact us via or email us (aidgesales@alibaba-inc.com).
Content risk filter failed, please contact us via or email us (aidgesales@alibaba-inc.com).
The image translation API supports translation between the language pairs listed in the following table. More language pairs are continuously being added. Please contact us via or email us (aidgesales@alibaba-inc.com).
The language code uses two-digit language codes. For a country/region variant of a language, the table follows the format of appending a dash followed by an 2-digit country code. For example, the language code for Traditional Chinese is zh-tw
.