Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.maxicore.ai/llms.txt

Use this file to discover all available pages before exploring further.

Image generation and editing are Pro plan features that let your AI agent create and modify images without leaving the MCP session. Generated images are automatically sideloaded into your WordPress media library as attachment posts — you get back an attachment ID you can immediately use in content, featured images, or product galleries. Editing works by describing the change you want; for most providers you do not need to supply a mask.
Image generation and editing require a Pro license and an API key for at least one supported provider. Set your key via maxi/update-ai-settings — see Managing AI provider credentials for instructions.

Supported providers

OpenAI

Supports DALL-E 3 and gpt-image-1. The gpt-image-1 model adds transparent background support (real RGBA PNG output) and maskless instruction-based editing. Default provider for image editing because it is the only provider that combines maskless editing with real alpha transparency in a single call.

Replicate

Supports Flux models, including flux-fill-pro for precision inpainting. Mask is required for Replicate editing calls.

BFL (Black Forest Labs)

Direct API access to Flux Pro, Flux Kontext Pro, and Flux Fill Pro. Kontext Pro supports maskless editing; Flux Fill Pro requires a mask for inpainting.

Local

Self-hosted models via a configurable endpoint. Set local_endpoint in maxi/update-ai-settings.
OpenRouter does not support image generation or editing. Calls to image abilities with "provider": "openrouter" return not_supported.

Generate an image

Call maxi/generate-image-ai to create a single image synchronously. The plugin generates the image, uploads it to your media library, and returns the attachment ID immediately.
{
  "prompt": "A clean product photo of a wooden desk with minimal decoration",
  "provider": "openai",
  "size": "1024x1024"
}
The response includes the new attachment ID, which you can pass directly to maxi/set-featured-image, maxi/update-product, or any other ability that accepts an attachment ID.

Edit an existing image

Call maxi/edit-image-ai to modify an image that already exists in your media library. Pass the attachment ID and describe the change you want in the prompt.
{
  "attachment_id": 456,
  "prompt": "Change the background to a sunset",
  "provider": "openai"
}
The edited image is sideloaded as a new attachment — your original image is not overwritten.

Mask requirements by provider

Different providers have different requirements for inpainting masks:
Provider / ModelMask requiredNotes
OpenAI gpt-image-1NoDescribe the change in the prompt — the model applies it globally or infers the target area
BFL Flux Kontext ProNoMaskless instruction-based editing
BFL Flux Fill ProYesPrecision inpainting — mask defines the area to fill
Replicate flux-fill-proYesPrecision inpainting — mask defines the area to fill

Remove a background

To remove an image background and produce a PNG with a transparent alpha channel, use the OpenAI provider with "background": "transparent":
{
  "attachment_id": 456,
  "prompt": "Remove the background",
  "provider": "openai",
  "background": "transparent"
}
OpenAI is the default provider for maxi/edit-image-ai because it is the only provider that supports both maskless instruction-based editing and real alpha transparency in a single call. You can change the default via maxi/update-ai-settings using the provider_edit_image field.

Batch image generation

To generate multiple images in the background, use maxi/generate-image-ai-batch. This returns a job ID immediately and processes images via WP Cron. See Batch AI processing for the full workflow.

Batch image generation

Generate many images in the background without waiting for each one. Results are sideloaded into the media library as each job item completes.

Text generation

Generate product descriptions, page content, and other text synchronously via OpenAI, Anthropic, OpenRouter, and local providers.

Media abilities

Upload, attach, detach, and manage media attachments — including regenerating image thumbnails after replacement.

Managing credentials

Set API keys for OpenAI, Replicate, and BFL. Keys are encrypted at rest and validated before replacing existing ones.