Parameter | Type | Required? | Description |
---|---|---|---|
about | String | yes | What about the text should be. |
include_keywords | Array[String] | yes | Keywords that should be included. |
word_limit | Integer | yes | Text limit in words. |
tone | String | yes | Tone of the text, e.g engaging , emotional . |
occasion | String | yes | Occasion of sending, e.g christmas , valentines |
variation | String | yes | How varied should text be, options: none , medium , high |
target_language | String | yes | Language in ISO format, e.g. pl , en . |
about
, include_keywords
(Array[String]), occasion, can be in any language supported by deepl.target_language
to en
to build full prompt in English.PROMPT + 'Use {target_language} language.'
.target_language
(in ISO format) will me mapped to target_language in full name format e.g pl -> Polish...
When successful, returns:
{
'sending_text_generation_task': {
'id': 1
}
}
{
"about": "string",
"include_keywords": [
"string"
],
"word_limit": 0,
"tone": "string",
"occasion": "string",
"variation": "none",
"target_language": "string"
}
curl --location --request POST 'https://api.mpc.dev.placewise.com/v1/ml/sending/generate_text' \
--header 'X-User-Agent;' \
--header 'X-Product-Name;' \
--header 'X-Loyalty-Club-Slug;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"about": "string",
"include_keywords": [
"string"
],
"word_limit": 0,
"tone": "string",
"occasion": "string",
"variation": "none",
"target_language": "string"
}'
{}