Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Setup (legacy)

Paid Feature

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 defaultfeatures.ai.enabled (and the sub-features below) default to true. Pass features.ai: false to turn the whole bundle off for an embed.

note

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 the AI Assistant feature, 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.

Usage reporting for legacy tools

Legacy AI calls still draw from the workspace's AI credit balance. Some legacy routes, including Smart Text, Smart Headings, and Smart Buttons, do not carry the current end-user and feature classification used by the public usage breakdown and ai.credits.usage_recorded webhook. Their cost can therefore be present in the workspace balance without a matching per-user row or webhook.

Use GET /v3/projects/:id/ai-credits as the authoritative workspace total. For complete per-user attribution going forward, use the AI Assistant with End-User Identification.