Custom AI model
Our template editor takes advantage of the recent GPT model by OpenAI to assist you with editing texts and creating preheaders. However, it is also possible to utilize your own, custom AI model for these tasks instead.
Generating text
Editing texts inside text blocks using AI is done via our AI Assistant feature. It can be accessed by hovering over the "stars" icon, located in the bottom-left section of text block toolset.

Selecting one of four options will trigger one of these predefined prompts:
improve
= Improve this text : [your text]rephrase
= Try to format as closely as possible to the given text, output just the resulting text. Reprase this text : [your text]make_longer
= Keep the structure and formatting, output just the resulting text. Make this text little bit longer : [your text]make_shorter
= Keep the structure and formatting, output just the resulting text. Make this text slightly shorter : [your text]
Prompts are automatically translated to align with the language of your editor. Your text from the text block is then appended to the end.
By default, this prompt is sent by us to OpenAI for processing and result is automatically displayed in the template.
To override this behavior and have the prompt sent to your custom AI model for processing instead, you have to make the following API request:
Generate text
- URL:
/{API.GENERATE_TEXT}
- Method:
POST
- Content-Type:
application/json
Request:
key | value |
---|---|
prompt | prompt (string) |
apiKey | apiKey (string) |
hostname | hostname (string) |
userId | userId (string) |
Response:
{
"data": "output of your AI for use in the template"
}
Generating preheader
The preheader is the text to the right of the subject line that provides a brief preview of the email. Similar to editing texts, our editor uses the recent GPT model by OpenAI to generate an email preheader tailored specifically to the content of your template. By default, this action is generated by clicking on the "magic wand" button in template settings:

Selecting this option will trigger this predefined prompt:
get_preheader
= Come up with a preview text for this email that shows up in the inbox of the recipient : [structure of your template from template JSON]
INFO
Only the object containing the actual template structure is used in the prompt, without any additional information about the template, which is also included in the template JSON by default.
By default, this prompt is sent by us to OpenAI for processing and result is automatically displayed in the Preview text field. This text is then used as a preheader.
To override this behavior and have the prompt sent to your custom AI model for processing instead, you have to make the following API request:
Generate preheader
- URL:
/{API.GENERATE_PREHEADER}
- Method:
POST
- Content-Type:
application/json
Request:
key | value |
---|---|
template | template (json) |
apiKey | apiKey (string) |
hostname | hostname (string) |
userId | userId (string) |
Response:
{
"data":
{
"content": "text content to be used"
}
}