---
url: /panel/editor-ai.md
---
# Editor AI

Three AI helpers inside the panel, all talking to OpenAI through the core's LLM layer: text commands in the rich text editor, a page generator that writes blocks from a brief, and a page report with SEO and content suggestions. They are separate from the [AI chatbot](/modules/ai-chatbot), which answers visitors on the site.

## Requirements

An OpenAI API key, see [OpenAI](/integrations/openai). Without `OPENAI_API_KEY` the helpers fail with a provider error.

## Configuration

| Variable | Default | Panel | Effect |
|---|---|---|---|
| `OPENAI_API_KEY` | unset | yes, as a secret | The key used by every helper on this page. |
| `OPENAI_MODEL` | `gpt-5.2` | no | Chat model for the text commands, the generator and the report. |
| `OPENAI_ORGANIZATION`, `OPENAI_PROJECT` | unset | no | Passed to the OpenAI client when the key belongs to an organisation with several projects. |
| `LLM_PROVIDER` | `openai` | no | Provider name in `config/llm.php`. OpenAI is the only driver. |

`config/llm.php` also has `custom_instructions`, a text that is added to the system message of every call. Use it for house style ("write in Swiss German spelling, no ß"). It has no `.env` key; publish the config (`vendor:publish --tag=evolve.llm`) to set it.

## Who can use it

`evolve.roles.editor-ai` lists the roles that may call the AI endpoint; the default is `developer`, `admin` and `content_manager`. Users outside the list get a 403 when they trigger a command. The permission `editor-ai.use` mirrors the list. See [Roles](/getting-started/roles#restricting-panel-areas).

## Text commands

In every rich text field, select text and use the AI entries of the toolbar. "Rephrase" and "Shorten" sit in the toolbar, the dropdown adds "Extend", "Summarize", "Continue", "Fix grammar", "Bullet points" and "Custom prompt", which asks for an instruction first. The result streams into the field and replaces the selection (or is appended for "Continue"). Input is limited to 5000 characters per call.

## Page generator

In the block editor, the generator opens a dialog with a brief, an optional image, the choice between appending to and replacing the page's blocks, and an optional reference page whose tone to match. From that it writes a landing page out of core blocks: heading, one-column text, text with media, and cards or tiles inside their containers. The prompt also receives the titles and paths of the other pages, so the generated content can link to them. The result lands as ordinary blocks that you edit afterwards.

Pass an image to have its text and structure transcribed into blocks, for example a screenshot of a competitor page or a PDF page export. Generated cards and tiles are wrapped in their container block since 2.12.

## Page report

On a page's screen, the report analyses the page's content for the content locale and returns three sections: main topic, analysis, suggestions. Suggestions name the block or section they refer to and leave out what is already fine. The report is cached for a day per page and content state, so it refreshes after the next content change, not on every visit.

## Verifying

Open a page, select a sentence in a rich text field and run "Rephrase". A provider error names the cause: missing key, wrong organisation, or a model the key cannot access. The application log carries the OpenAI response.
