Aidge Resource
Try for freeWorkplace
  • LATEST ADVANCEMENTS
    • Introducing Marco-MT: Bringing Translation to the Next Level with LLM
  • GETTING STARTED
    • Quick Start
    • Account and Authentication
    • Your First API Request
    • Test Your API Requests
    • Service Level Agreement
    • FAQ
  • API REFERENCE
    • E-commerce Information Translation
      • Marco Translator
        • Marco Translator API Reference
      • Image Translation
        • Image Translation Pro Version API Reference
        • Image Translation Pro Version Result API Call Description
        • Image Translation Standard Version API Reference
    • E-commerce Image Editing
      • Image Background Removal
        • Image Background Removal API Reference
      • Image Upscaling
        • Image Upscaling API Reference
      • Image Cropping
        • Image Cropping API Reference
      • Image Elements Removal
        • Image Elements Removal API Reference
      • Image Elements Detection
        • Image Elements Detection API Reference
    • E-commerce Virtual Model
      • Virtual Model Alternation
        • Virtual Model Alternation Submit API Reference
        • Virtual Model Alternation Result Query API Reference
      • Virtual TryOn
        • Virtual Try-on Submit API Reference
        • Virtual Try-On Query API Reference
        • General Model Library Reference
      • Hands&Feet Repair
        • Hands&Feet Repair Submit API Reference
        • Hands&Feet Repair Query API Reference
    • Editor Documentation
      • AI Model Editor
      • AI Image Editor
        • Image Workbench
        • Background Removal
        • Elements Removal
        • Image Translation
Powered by GitBook
On this page
  • Request Parameter
  • Sample Request
  • Response Parameters
  • Sample Response
  • Errors
  • Appendix
  • Language Code

Was this helpful?

  1. API REFERENCE
  2. E-commerce Information Translation
  3. Image Translation

Image Translation Pro Version API Reference

PreviousImage TranslationNextImage Translation Pro Version Result API Call Description

Last updated 9 days ago

Was this helpful?

POST /ai/image/translation_mllm/batch

The Image Translation Pro product is specifically designed for e-commerce images, integrating multimodal large model technology to achieve a more accurate understanding of images. It significantly improves translation quality and continues to expand and optimize multilingual translation capabilities.

Note: This is an asynchronous interface. You need to first submit a task and obtain a task ID, then call the result query interface to retrieve the generated results. The current API is the first step, the task submission API.

Request Parameter

Parameter

Parameter

Type

Required

Description

paramJson

Object[]

Yes

Request body, in JSON format. Less than 10 items

targetLanguage

String

Yes

Target language code. Supporting languages as the appendix shows.

Sample: en

sourceLanguage

String

Yes

Source language code. Supporting languages as the appendix shows.

Sample: en

imageUrl

String

Yes

Image requirements:No more than 4000x4000 pixel. Size up to 10MB.

You can submit up to 10 images at a time.

Supporting png, jpeg, jpgm, bmp, webp.

includingProductArea

Boolean

No

Choose whether to translate the text within the main subject of images; this allows you to preserve 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

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.

Sample: false

translatingBrandInTheProduct

Boolean

No

Choose whether to translate brand names on the image. This can help you preserve brand name information and prevent it from being translated.

Default:false(This means not translating the brand name.)

As shown in the example image,“懒角落”refers to a brand name

Sample:"false"

Sample Request

  • For other programming languages, please refer to .

IopClient client = new IopClientImp(url, appkey, appSecret);
IopRequest request = new IopRequest();
// Adding this trial tag in header means using the trial resource to test, 
// request.addHeaderParameter("x-iop-trial","true")
request.setApiName("/ai/image/translation_mllm/batch");
request.addApiParameter("paramJson", "[{\"translatingBrandInTheProduct\":\"false\",\"targetLanguage\":\"en\",\"includingProductArea\":\"false\",\"imageUrl\":\"https://img.alicdn.com/imgextra/i1/1955749012/O1CN016P3Jas2GRY7vaevsK_!!1955749012.jpg\",\"useImageEditor\":\"true\",\"sourceLanguage\":\"zh\"}]");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

We provide http based sample codes in the git code repository.

Response Parameters

Parameter

Type

Description

resCode

Number

Response code;200 indicates a successful call. For other response codes,please refer to the error code information.

resMessage

String

Error message,e.g. "content has sensitive data, please try other input".

data

Object

Result data that generated.

taskId

String

Unique task ID. Used for subsequent result queries.

Sample Response

{
  "code": "0",
  "data": {
    "result": {
      "taskId": "31961aa1-763f-4b25-946d-c181be9bec12"
    },
    "usage": 0
  },
  "resCode": "200",
  "resMessage": "success",
  "request_id": "0ba2887315178178017221014"
}

Errors

Error

Code

Error Message

Description

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

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

Appendix

The Image Translation Pro product supports image translation for the language pairs listed in the table below. We will continue to add more advantageous language pairs.

The Image Translation Pro version supports source language to:

Language

Language Code

Chinese(Simplified)

zh

Chinese (Traditional)

zh-tw

English

en

French

fr

Italian

it

Japanese

ja

Korean

ko

Malay

ms

Portuguese

pt

Russian

ru

Spanish

es

Thai

th

Turkish

tr

Vietnamese

vi

The Image Translation Pro version supports target language to:

Language

Language Code

Arabic

ar

Bengali

bn

Bulgarian

bg

Chinese(Simplified)

zh

Chinese (Traditional)

zh-tw

Croatian

hr

Czech

cs

Danish

da

Dutch

nl

English

en

Estonian

et

Finnish

fi

French

fr

German

de

Greek

el

Hebrew

he

Hungarian

hu

Icelandic

is

Indonesian

id

Italian

it

Japanese

ja

Kazakh

kk

Korean

ko

Latvian

lv

Lithuanian

lt

Macedonian

mk

Malay

ms

Polish

pl

Portuguese

pt

Romanian

ro

Russian

ru

Serbian

sr

Sinhala

si

Slovak

sk

Slovenian

sl

Spanish

es

Swedish

sv

Tagalog

tl

Thai

th

Turkish

tr

Ukrainian

uk

Urdu

ur

Uzbek

uz

Vietnamese

vi

Language Code

The language codes use the two-letter notation of the ISO 639-1 standard. For regional variants of specific languages, the RFC 5646 format is followed, which involves adding a hyphen after the language code and appending the two-letter country/region code from ISO 3166. For example, the language code for Spanish is es.

Sample:

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).

If you have specific needs, please contact us via or email us (aidgesales@alibaba-inc.com).

Please refer to .

Quick Start
https://github.com/Aidge-AI
Discord
Language Code
http://example.jpg/
Discord
Discord
Discord
Discord
Discord