Skip to main content

How to disable AI features?

How to disable AI features?

Written by John Edward

You can manage AI functionality in the Unlayer editor through the features.ai configuration in your unlayer.init() call.

Disable All AI Features

To turn off every AI capability in the editor:

unlayer.init({
  features: {
    ai: false
  }
});

Disable only the AI Assistant

To hide the AI Assistant in a specific embedded editor, set features.ai.assistant to false in that editor's unlayer.init() configuration:

unlayer.init({
  features: {
    ai: {
      enabled: true,
      assistant: false,
    },
  },
});

Add this setting to your existing initialization; keep your other project and user settings. It hides the Assistant only in that editor instance, not every instance using the same project. It applies to everyone who loads that editor.

If you need server-enforced access rules for individual end users, use user.featurePolicyToken as described in Restricting Features Per End-User. Hiding a control in the editor is not a substitute for enforcing your application's access rules.

Why isn't the AI Assistant showing?

Having AI credits alone does not make the Assistant visible. Check that:

  • The project's plan includes the AI Assistant.

  • The initialization passes the correct numeric projectId.

  • The initialization identifies the end user with user.id.

  • Neither features.ai.enabled nor features.ai.assistant is false.

Read AI Assistant Setup for the complete initialization example. If it is still missing, contact support with your project ID, editor version, when it happened, a screenshot, and any browser console errors.

Disable Specific AI Features

If you want to keep AI enabled but disable certain features, you can target them individually as shown below.

Smart Buttons

unlayer.init({
  features: {
    ai: {
      smartButtons: false
    }
  }
});

Magic Image

unlayer.init({
  features: {
    ai: {
      magicImage: false
    }
  }
});

Smart Headings

unlayer.init({
  features: {
    ai: {
      smartHeadings: false
    }
  }
});
Did this answer your question?