Create an email based on given topic and mode.
CURL
curl -H 'content-type: application/json'
-H 'Accept: application/json'
-H 'api-key: your-key'
-X POST https://www.learnitive.com/api/v1/emails
--data '{"input": "BMW car sell",
"model":"balanced",
"mode":"general",
"max_tokens":"256",
"temperature":".65"
}'
Example output.
{
"success": true,
"status": "success",
"message": [{
"index": 0,
"text": "Subject: Great Deals on BMW Cars\n\nDear Customer, \n\nWe are excited to announce that we...",
"id":"b2f5ff95-46b2-4c92-8674-74aaa0c73839"
}]
}
Parameter
- input: string. The topic of the blog post.
- max_tokens: integer. The maximum number of tokens to generate. Default: 256
- mode: The style or tone to be used when rewriting. Allowed values: “reply”, “general”, “customer_support”, “cold”, “from_bullets”. Defaul: “general”.
- model: The language model to use, “fast”, “balanced”, “strong” and “expart”. Defaul: “fast”.
- emperature: number. The sampling temperature to be used in text generation. The higher the temperature, the higher the risk of the output to sound “made up”. Default: 0.65