Marco Translator API Reference
Last updated
Was this helpful?
Last updated
Was this helpful?
Marco Translator
GET/POST
/ai/text/marco/translator
By understanding the context of the content, Marco Translator can deliver high-quality translations of product information, support multilingual communication, and perform document translation tasks. It excels in translating e-commerce terminology and daily conversations.
Marco Translator supports translation between 42 languages, with a special focus on Chinese-English, Chinese to multilingual, and English to multilingual translations. Additionally, it offers language detection for 23 languages.
text
String[]
Yes
Translation Text;
The total character length should not exceed 50,000, and the list length should not exceed 50. We also provide a Bulk API for offline translation of high volumes of product text. Please contact us for further assistance if needed.
Sample value:"[\"Pen for iPad, 13 mins Fast Charging Stylus with Palm Rejection, Tilt Sensitivity, Compatible with 2018-2022 iPad Air 3/4/5, iPad Mini 5/6, iPad 6/7/8/9/10, iPad Pro 11, iPad Pro 12.9 (Black)\"]"
sourceLanguage
String
No
Source language code, which can be viewed in the following translation supported language list.
If this parameter is not provided, the language will be automatically detected.
Sample value:"en"
targetLanguage
String
Yes
Target language code, which can be viewed in the following language detection supported language list.
Sample value:"ko"
formatType
String
No
The format type of source text;
Currently text/html are avaliable, default: text.
Sample value:"text"
glossary
String
No
Intervention glossary ID.
Intervention glossary IDs need to be created separately and provided in the input parameters. Multiple intervention glossaries can be passed. If the provided intervention glossary IDs are empty, the translation results will not be modified.
Self-service upload of intervention glossary IDs is not currently supported. Please contact us if needed.
Sample value:"translation_glossary"
The maximum response time for the interface is 30 seconds. It is recommended to set the request timeout to not exceed 30 seconds when making a call.
resCode
Number
Response code; 200 indicates a successful call, other response codes can be referred to in the error code information.
data
Object
Result data that generated.
data.characters
Number
The number of characters translated.
data.translatedText
String
Result data that translated.
data.detectedLanguage
String
Language Detection Results.
requestId
String
Request ID: Used to uniquely identify a single request call.
success
Boolean
Whether successful;true is successful,false is unsuccessful.
resMessage
String
Error message,like "content has sensitive data, please try other input".
500
system error
System error
501
rate limit exceed
The current interface has reached the current limit. Please contact us to increase the current limit value.
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.
801
model failed
Internal call exception, please contact us for troubleshooting.
1000
content has sensitive data, please try other input
The request parameters contain sensitive information and cannot be processed at this time. Please try a different input.
1001
content control failed, please retry
The risk control service failed. Please try again. If the error persists, please contact us.
1002
content risk filter failed, please contact us
Content risk filter failed, please contact us
1007
text language is not supported
Text language is not supported,please input correct language
1100
The input text length is too long
The input text length is too long(MAX is 4096 Token),please input again with correct length.
Language Name
Language Code
Arabic
ar
Azerbaijani
az
Bulgarian
bg
Bengali
bn
Czech
cs
Danish
da
German
de
Greek
el
English
en
Spanish
es
Estonian
et
Finnish
fi
French
fr
Hebrew
he
Hindi
hi
Croatian
hr
Hungarian
hu
Indonesian
id
Italian
it
Japanese
ja
Korean
ko
Lithuanian
lt
Latvian
lv
Malay
ms
Burmese
my
Nepali
ne
Dutch
nl
Norwegian
no
Polish
pl
Portuguese
pt
Romanian
ro
Russian
ru
Sinhala
si
Slovak
sk
Swedish
sv
Thai
th
Turkish
tr
Ukrainian
uk
Urdu
ur
Vietnamese
vi
Chinese (Simplified)
zh
Chinese (Traditional)
zh-TW
Language Name
Language Code
Arabic
ar
Bengali
bn
Chinese (Simplified)
zh
Chinese (Traditional)
zh-TW
Dutch
nl
English
en
French
fr
German
de
Hebrew
he
Indonesian
id
Italian
it
Japanese
ja
Korean
ko
Malay
ms
Polish
pl
Portuguese
pt
Russian
ru
Spanish
es
Thai
th
Turkish
tr
Ukrainian
uk
Urdu
ur
Vietnamese
vi
What's Intervention Capability?
Intervention capability refers to the ability to specify translation results by uploading a glossary, which is suitable for product names (such as translating "aidge" as "aidge") and ambiguous terms, etc. Currently, self-uploading of intervention glossaries is not supported. If you have such a requirement, please contact us or search for the Aidge Product Consultation & Service group on DingTalk using the group number: 105455001046.
What Performance-Related Information Needs Confirmation During Integration?
The current translation API supports a maximum QPS of 10. If your QPS requirements exceed 10, please contact your account manager to confirm the following information and ensure resource allocation in advance:
Confirmation of SLA (Service Level Agreement), such as AVG RT / P99 RT / AVG QPS / peak QPS for different language pairs.
Confirmation of traffic proportions for different translation scenarios. For example, the traffic proportions for scenarios such as Description / Review / Title, etc.
How to Set Certain Content Not to Be Translated?
When setting formatType
to html
, you can use the following html tags: