Skip to content

AI Features

The editor ships two AI-powered tools, both on by default: a text assistant that rewrites existing copy, and metadata generation for the page's meta title, description, and keywords. A third option, aiLabeledElements, adds no AI of its own but tags elements with content hints for your own generation pipeline.

AI requires account-level access

All AI text tools additionally require AI to be enabled on your Topol account (this is returned by the authorization call). disableAiAssistant: false alone does not enable AI if your plan does not include it; the AI icon renders greyed out with an "Only PRO version" tooltip.

The AI text assistant

The AI text assistant rewrites existing text, with five actions: Improve, Rephrase, Check grammar, Make longer, and Make shorter. It sits behind the AI icon on the block toolbar that appears when hovering a text block.

The assistant is enabled by default and switched off with the disableAiAssistant option (boolean, default false):

typescript
{
  disableAiAssistant: true, // hides all AI text controls
}

With the assistant disabled, all AI text controls are hidden and text is edited manually only.

AI metadata generation

When AI is enabled, a magic-pen button appears in the Settings panel's metadata section. It generates a meta title, description, and keywords from the page's text content, one field at a time. It is gated by the same disableAiAssistant option and account-level AI flag as the text assistant.

Generation runs against Topol's service by default. To route it through your own model instead, set the api.GENERATE_META endpoint; the editor then POSTs there instead:

json
{
  "template": "the page's text content",
  "apiKey": "your Public API key",
  "hostname": "origin",
  "userId": "the authorize.userId",
  "type": "title"
}

type is "title", "description", or "keywords". Answer with { "data": "generated text" }. The editor gives the request 25 seconds; a timeout or error surfaces as a notification and leaves the field unchanged.

Labeling elements for your own AI pipeline

The aiLabeledElements option (boolean, default false) adds a free-text AI content field to every section and block's settings:

typescript
{
  aiLabeledElements: true,
}

The value is stored on the element as aiGenerateContent in the saved template JSON, so your own pipeline can use it for downstream AI generation. The editor itself does nothing with the field.

The chatAI option

chatAI is accepted by the options schema, but the chat panel is not currently exposed in the editor UI; setting it has no visible effect. It is reserved for a future release, so do not rely on it.