Skip to main content

Setup

Paid Feature

This feature is only available in paid plans. Learn More

The AI Assistant is on by default — no feature flag is required to turn it on. It appears in the editor's mode switcher once your plan covers it:

  • Plan — your project must be on a paid plan that includes the AI Assistant. Plans are managed in Console. If the project isn't on an eligible plan, the assistant stays hidden regardless of the feature flags.
  • Feature flagfeatures.ai.enabled and features.ai.assistant both default to true. You only set them to disable the assistant for a specific embed (see Disabling per init).

Minimum config

Because the assistant defaults on, a standard init with no AI-specific flags is enough:

unlayer.init({
id: 'editor-container',
projectId: 1234, // Replace with your numeric Unlayer Project ID
});

You can still set the flags explicitly if you prefer to be self-documenting:

unlayer.init({
id: 'editor-container',
projectId: 1234,
features: {
ai: {
enabled: true,
assistant: true,
},
},
});

Don't have a Project ID yet? Sign in to the Developer Console, create a project, and copy the ID from Project > Settings. The full walkthrough — adding the embed script, creating the container, and finding the Project ID — is on the Installation page.

Verifying it's enabled

When both checks pass, the AI Assistant becomes available from the editor's mode switcher; selecting it opens a dedicated chat panel on the side of the canvas.

Editor with the AI Assistant chat panel open on the side of the canvas, showing the chat thread and quick-action chipsEditor with the AI Assistant chat panel open on the side of the canvas, showing the chat thread and quick-action chips

If the assistant doesn't appear:

  • The most likely cause is that the project's plan doesn't include the AI Assistant. Check the plan in Console or contact support.
  • Confirm you haven't disabled it. The flags default to true, but an explicit features.ai.assistant: false (or features.ai.enabled: false) in your unlayer.init call hides it.

Testing in development

Credits are pooled at the workspace level — every project in a workspace shares the same per-period AI credit allowance. To make it easy to try the assistant in dev or staging, workspaces on a paid plan get a fixed amount of one-time evaluation credits the first time AI is enabled. Free-plan workspaces don't receive evaluation credits — AI is a paid feature. Once the eval credits are spent, you'll follow the same upgrade or credit-pack path you'd use in production. See Pricing.

Disabling per init

Set features.ai.assistant: false on a specific unlayer.init call to hide the assistant in that editor instance only — useful for embedding the same project in multiple surfaces and wanting the assistant off in some of them.

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