Skip to content

AI generation

Octa Editor can generate alt text and titles for images with AI, straight from the Media Library list view. Generation runs through the WordPress AI Client, so it uses your own provider and API key with no markup and nothing stored by Octa Editor.

AI generation builds on the WordPress core AI Client (WordPress 7.0 and later). Octa Editor does not ship its own AI provider or store any API keys. To enable it you need:

  1. WordPress 7.0 or later.
  2. An AI plugin that manages provider connectors, plus a provider connector (for example OpenAI or Google) configured with your API key.

Until a provider is configured, the Generate buttons do not appear and the Media Library shows a short notice explaining what to set up. Everything else in Octa Editor keeps working.

In the Media Library list view, each image row shows a Generate button next to the alt text and title fields. Click it to fill the field from the image. The value is only placed in the field. Review it, edit if needed, then Save. Nothing is written until you save, and no batch processing runs.

Generation is a single, on-demand request per field. It prefers a medium-size copy of the image to keep the request small, and the result is trimmed to a sensible length.

The same generation is available to AI agents and MCP clients as two abilities, octa-editor/generate-alt and octa-editor/generate-title. Both take an attachment_id and return the generated text without saving it. Because they call an external provider, both are off the default MCP server unless you opt in with the octa_editor_ability_mcp_public filter.

Open Tools → Octa Editor → Settings to edit the alt text and title prompts directly. Leave a field blank to use the built-in default shown as its placeholder. This is the simplest way to change the tone or wording of what the AI writes.

Two filters give the same control in code, and the filter takes precedence over the Settings value:

  • octa_editor_ai_prompt changes the exact prompt sent to the model (arguments: prompt, field, attachment id).
  • octa_editor_ai_language sets the language of the generated text (defaults to the site language).

Generation follows the same capability checks as editing the attachment, and each request is protected by a nonce. You can only generate for images you are allowed to edit.