Marco Translator API Reference
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.
Request Parameters
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:["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, (Black)"]
sourceLanguage
String
No
Source language code; Uses the ISO 639-1 language code standard, for example, the code for "English" is "en" and for "Chinese" is "zh".
Supported language pairs are listed in the following table.
If this parameter is not provided, the language will be automatically detected.
Sample: "en"
targetLanguage
String
Yes
Target language code;Uses the ISO 639-1 language code standard, please select from the supported language pairs listed below for input.
Supported target languages are listed in the following table.
Sample :"ko"
formatType
String
No
The format type of source text;Currently text/html are avaliable.
Sample:"text"
glossary
String
No
Intervention glossary ID. The intervention glossary needs to be created separately, and its ID should be provided in the input parameters. Multiple intervention glossaries can be passed. If the provided intervention glossary ID is empty, the translation results will not be modified.
Currently, self-service uploading of intervention glossaries is not supported. Please contact us if needed.
Sample:"translation_glossary"
Sample Request
Parameter Response
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.
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".
Sample Response
Error Code
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 correst 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.
Appendix
Supporting Languages
We will continue to add more language pairs. If you have specific needs, please search for the Aidge Product Consultation & Service Group on DingTalk using the group number: 105455001046 to join and contact us.
English
Chinese
English
Arabic
English
Urdu
English
Bengali
English
Polish
English
Ukrainian
English
Russian
English
Dutch
English
Turkish
English
Korean
English
Japanese
English
Thai
English
Indonesian
English
Malay
English
Spanish
English
French
English
Italian
Turkish
Arabic
Turkish
English
Chinese (Simplified)
English
Chinese (Simplified)
Japanese
Chinese (Simplified)
Chinese (Traditional)
Chinese (Simplified)
Korean
Language Code
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 adds a hyphen after the language code followed by the two-letter country/region code from ISO 3166. For example, the language code for Traditional Chinese is zh-tw.
FAQs (Frequently Asked Questions)
Which Languages does the Marco Translator API Support?
You can view the "Supported Language Pairs" section in the "Appendix" module of the document. More languages are being added. Please contact us with any requests you may have.
Is the Intervention Capability Available in Bulk?
Yes. You only need to associate multiple intervention glossary IDs for it to take effect. However, self-service upload of intervention glossary IDs is not currently supported. If needed, please search for the Aidge Product Consultation & Service Group on DingTalk using the group number: 105455001046 to join and contact us.
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.
What to do if the Translation Quality is Unsatisfactory During Testing and Use?
If you encounter unsatisfactory translation quality, please feel free to contact us. Search for the Aidge Product Consultation & Service Group on DingTalk using the group number: 105455001046 to join and reach out to us, so we can work together to resolve the issue. We are committed to continuously improving text translation quality in e-commerce scenarios.
Last updated