Marketing Message Generation API Reference

Marketing Messages Generation

GET/POST /ai/marketing/message/generation

Marketing Message Generation generates various localized multilingual marketing content for each product, catering to the needs of different scenarios, channels, and audiences. This helps merchants increase product exposure and boost traffic.

Request Parameters

ParameterTypeRequiredDescription

marketScene

String

Yes

The following show the supported template of marketing message. Each template is for one use case.

Template 1: Marketing Short Title

Parameter: General

Use cases: Suitable for use as topic tags, email, promotional page short labels, etc.

Template 2: Product Slogan

Parameter: Product_Slogan

Use cases: Suitable for promote products via email, push notifications, and social media.

Template 3: Customer Behavioral Marketing (Cart Abandonment)

Parameter: Scenario_shopping_cart

Use cases: Targeted marketing for abandoned cart recovery.

sourceLanguage

String

Yes

Input language, you can refer to the language code in appendix.

Sample: en

targetLanguage

String

Yes

Target language,you can refer to the language code in appendix.

Sample: fr

keywords

List<String>

No

Product keyword, usually SEO-related keywords or core selling points of the product. The more you input, the more it helps in generating better results.

productTitle

String

Yes

Product title, you can input the name or original title of the product.

Sample: Clean & Clear Blackhead Eraser Facial Scrub with Salicylic Acid, 7 oz

productCategory

List<String>

Yes

Product category, you can refer to the category structure of any platform and input the product category name. When the usage scenario is for product marketing message(Product Slogan), this is required.

Sample: Jewelry & Accessories

Sample Request

IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("/ai/marketing/message/generation");
request.addApiParameter("marketScene", "General");
request.addApiParameter("targetLanguage", "en");
request.addApiParameter("keywords", "[\"female blazers jacket\"]");
request.addApiParameter("productCategory", "[\"Blazers\"]");
request.addApiParameter("productTitle", "Vintage Black Printing Blazer Women Jacket High Street Fashion 2024 Spring Plus Size Elegant Office Lady Coat American Stylish");
request.addApiParameter("sourceLanguage", "en");
request.addApiParameter("productDescription", "Sleeve Type, style, Sleeve Length, distinctive features, category terms, benefits.");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

Response Parameters

ParameterTypeDescription

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.

requestId

String

Request ID.

success

Boolean

Request successfully.

resMessage

String

Request message; if an error occurs, it will be reflected in this field.

Sample Response

{
  "data": {
    "generatedText": [
      "Stylo Presenteur Sans Fil 2.4GHz - Contrôle à Distance USB RF pour Présentations Powerpoint - Pointeur de Présentation Flippant"
    ]
  },
  "requestId": "2102f6cb17192865354713083e8d50",
  "success": true,
  "resCode": 200,
  "resMessage": "success",
  "code": "0",
  "request_id": "212a664f17192865354782564",
  "_trace_id_": "2102f6cb17192865354713083e8d50"
}

Errors

Error CodeError MessageDescription

501

rate limit exceed

The current interface has reached the current limit. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) 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 via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

1000

content has sensitive data, please try other input

Content has sensitive data and cannot be handled now. Please try other input.

1001

content control failed, please retry

Content control failed, please try other input. If an error persists, please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

1002

content risk filter failed, please contact us

Content risk filter failed, please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

Appendix

Supported Language Pairs

The Marketing Message Generation API supports generation between the language pairs listed in the following table. More language pairs are continuously being added. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) if you have any specific requirements.

Source LanguageTarget Language

English

English

English

Spanish

English

French

English

Portuguese

English

Korean

Language Code

The language code uses ISO 639-1 two-digit language codes. For a country/region variant of a language, the table follows the RFC 5646 format of appending a dash followed by an ISO 3166 2-digit country code. For example, the language code for Traditional Chinese is zh-tw.

LanguageLanguage Code

Arabic

ar

Chinese (Simplified)

zh

Chinese (Traditional)

zh-tw

Danish

da

Dutch

nl

English

en

Persian

fa

Filipino/Tagalog

tl

Finnish

fi

French

fr

German

de

Hungarian

hu

Icelandic

is

Indonesian

id

Italian

it

Japanese

ja

Korean

ko

Lithuanian

lt

Malay

ms

Polish

pl

Portuguese (Portugal)

pt

Romanian

ro

Russian

ru

Sinhala

si

Spanish

es

Thai

th

Turkish

tr

Ukrainian

uk

Urdu

ur

Uzbek

uz

Vietnamese

vi

Last updated