AI Powered Design

Create professional email templates without starting from scratch. With AI-powered design assistance, layouts and content can be generated instantly. Customize every section to match your brand and save hours of manual work.
mailui.init({ features: { designWithAI: { enabled: true, regenerateSection: true, regenerateContent: true, } } })

Load Design With AI #

This method allows you to generate a complete email design using AI. By providing a text prompt, MailUI will create a new template layout that you can immediately edit and customize.

Usage Example #

mailui.loadDesignWithAI({ prompt: "" });

Parameters #

PropertyRequiredDescriptionType
promptYesA natural language description of the email design you want.

Example 1: A welcome email with a modern header, product showcase, and call-to-action button
Example 2: Newsletter layout with two-column sections and a footer with social icons
string

Regenerate Template #

Set AI API Key #

How To Add #

To enable AI features, you need to provide your API key.
  1. Go to Project Projects > Settings > Configure then find Configure AI Credentials section.
  2. Enter your API Key from your OpenAI dashboard Click Here.
  3. Save the key and enjoy the AI features

How To Create API Key #

  1. Log in: Go to platform.openai.com and sign in (or create an account).
  2. Navigate to API Keys: Click your profile picture → View API Keys (or open https://platform.openai.com/api-keys).
  3. Create Key: Click + Create new secret key, give it a name if you like.
  4. Copy & Save: Copy the key shown (starts with sk-) and store it safely. You won’t be able to view it again later.

Explore Our Email Builder