Setup (legacy)
This feature is only available in paid plans. Learn More
Unlayer's AI-powered editor features are controlled through the features.ai option passed to unlayer.init. You can turn the whole bundle on or off in one place, or enable AI overall while opting out of individual sub-features.
AI is on by default — features.ai.enabled (and the sub-features below) default to true. Pass features.ai: false to turn the whole bundle off for an embed.
The legacy per-element tools below (smart text, smart buttons, smart headings, magic image) are superseded by the AI Assistant: when the assistant is active, it replaces these tools. They only surface when the assistant is unavailable — i.e. the project's plan doesn't include it (no aiAssistant entitlement) or it's been turned off with features.ai.assistant: false.
Enable or disable all AI features
Pass a boolean to toggle every AI feature at once:
unlayer.init({
features: {
ai: true, // enable all AI features (equivalent to ai.enabled: true)
},
});
unlayer.init({
features: {
ai: false, // disable every AI feature
},
});
Controlling specific AI features
AI Assistant — assistant
A dedicated chat panel inside the editor for full-template, page, body, row, and content-level edits. The Assistant has its own plan requirements and configuration surface — see the AI Assistant setup guide for the full walkthrough.
unlayer.init({
features: {
ai: {
enabled: true,
assistant: true,
},
},
});
When assistant is not enabled, each sub-feature can be set to false to opt out individually:
unlayer.init({
features: {
ai: {
enabled: true,
assistant: false,
smartText: true,
smartParagraph: true,
smartButtons: false, // disable just Smart Buttons
smartHeadings: true,
magicImage: false, // disable just Magic Image
smartImageAltText: true,
},
},
});
Smart Text — smartText
Inline AI suggestions for short text (e.g. tightening a sentence, rewriting a fragment).
Smart Paragraph — smartParagraph
Generates multi-sentence paragraphs from a brief prompt or surrounding context.
Smart Buttons — smartButtons
Generates optimized call-to-action button copy.
Smart Headings — smartHeadings
Suggests headings tuned for the section's content.
Magic Image — magicImage
Generates or recommends images based on the design context.
Smart Image Alt Text — smartImageAltText
Generates accessible alt text for uploaded images.