Building Your First Module
This article walks you through building a module with AI, from description to published module, and gives tips for writing descriptions that get good results.
Before you start, add at least one API key in Module Builder → Settings. Until you do, the AI Builder box shows "To use AI features, configure an API key in Settings."
Step 1: Create a new module
- Go to Module Builder → Add New Module.
- Enter a title. This is the module's name in the Divi Visual Builder's module picker.
Step 2: Describe your module
In the AI Builder box, write what you want under Describe your module. Plain English is fine.
Choose a provider from the dropdown (your default provider is preselected) and click Generate Module.
Step 3: Answer the clarifying questions
The AI replies with A few quick questions, usually three to five. They cover details your description may have left open, such as how many columns or which post details to show.
- Answer the questions and click Build Module, or
- Click Skip & build without answers to build straight away. This works, but the first version may be less accurate.
Step 4: Wait for the build
A full build often takes two to three minutes and can take longer for complex modules or slower models. The box shows "Do not refresh. Modules can take several minutes to generate depending on complexity and model used." Leave the page open until it finishes.
Step 5: Review the result
When the build finishes, the AI fills in the module editor:
- Module Fields: the settings your users will see in the Visual Builder
- HTML Output: the module's template
- CSS Output and JavaScript Output: styles and interactivity
- Visual Builder Preview, Libraries and Add Custom Functions, when the module needs them
A short summary from the AI appears in the AI Refinement chat.
The notice "Not saved yet. Review the fields and templates, then click Publish to create the module." means nothing has been saved. A first build stays in the editor until you choose to publish it.
Step 6: Publish
Click Publish. The plugin saves the module, generates its files and makes it available in the Divi Visual Builder. The Module Settings box in the sidebar shows Generation Status: Generated when it worked.
If you click Save Draft instead, the module is saved but not generated. It won't appear in Divi until you publish it.
Step 7: Add it to a page
Open any page in the Divi Visual Builder and add your module from the module picker.
Writing descriptions that work
The AI does best when it knows what the module shows, what your users should be able to change, and how it should behave.
Name the content. "Each card has an image, a title, a short paragraph and a button" is better than "some cards".
Say what should be editable. "Let me choose the number of columns and whether to show the date" tells the AI which settings to create.
Describe interactions. "A toggle that switches between monthly and yearly prices" or "a draggable divider between the two images".
Mention repeatable items. "I can add as many slides as I need" tells the AI to build a parent/child module.
Mention responsive behavior. "Side by side on desktop, stacked on mobile."
Mention the data source. "My latest blog posts", "ACF fields on the current post" or "this public JSON feed: [URL]".
Leave out colors, fonts and spacing unless they matter to the structure. Divi's Design tab already handles backgrounds, spacing, borders and, where the module supports them, fonts.
Example description
Create a pricing table where I can add plans with a name, monthly and yearly prices, feature list, and signup button. Include a monthly/yearly toggle that switches prices with a smooth animation. Let me highlight one plan as "Most popular" with a border and badge. Display plans side by side on desktop and stack them on mobile.