Docs MediaHub Version 1.x MediaHub AI

MediaHub AI

Early-beta add-on for reviewed AI-assisted ALT text. Bring your own vision API keys; further AI metadata tools are planned.

MediaHub AI is a free companion module for MediaHub licence holders. It adds reviewed, provider-backed AI tools inside MediaHub. You bring your own API keys; nothing is sent to Peter Knight Digital.

Early beta. Version 1.0.0-beta.1 is a preview release. ALT text generation is the first tool. The module is built as a shared runtime for further AI-assisted metadata workflows (titles, captions, labels, and similar) in later releases. Expect rough edges and API changes while the feature set settles.

MediaHub AI is an add-on, not part of the core MediaHub module. Download it from account downloads → Add-ons, install the zip, configure a vision provider in site config, then refresh modules. See Add-ons for the overview.

What it does today

MediaHub AI helps editors write accessible ALT text for raster images. Generation is always reviewed: the module suggests text, you choose or edit a result, and you save the ProcessWire page yourself. Nothing is written automatically.

Where to open it

Once the module is installed and a provider is configured, you can reach ALT generation from two places:

  1. Asset detail page — open an image in the MediaHub library and click the AI icon beside Alt/Description. This opens the refinement modal for that asset's global library ALT. Save the asset when you are done.
  2. MediaHub field (Detail view) — on a source image card, click the AI icon beside Alt/Description, or open Actions and choose Quick Alt or 3× Options. Quick Alt applies a one-shot suggestion. 3× Options opens the refinement modal with three editable alternatives. Requires MediaHub 1.23.0 or newer. See Field actions.

From a MediaHub field, applying a result stages a per-page ALT override for that field reference. The asset's global library ALT value is unchanged until you edit it on the asset detail page.

Bring your own keys

MediaHub AI does not include API access. You configure a vision-capable provider in ProcessWire site configuration (typically site/config-local.php, excluded from version control). Supported providers in the beta:

Important. You are responsible for your own API keys, how they are stored on your server, and who can trigger requests on your site. Peter Knight Digital is not responsible for leaked keys, unauthorised use, misuse by site users, or any charges incurred on your provider account. Monitor usage and billing with your API provider, and restrict access to configuration files that hold your keys.

  • OpenAI — vision-capable models such as gpt-4.1-nano
  • DeepSeek — vision-capable models such as deepseek-flash
  • OpenAI-compatible — any HTTP API that accepts OpenAI-style vision chat completions (custom baseUrl and model)

API keys are read only from $config->MediaHubAI. They are never stored in the module settings UI, included in browser configuration, or written to MediaHub AI logs. Each request sends a downscaled copy of the image (maximum width 1024px) plus the phrases you supply for context.

$config->MediaHubAI = [
'provider' => 'openai', // active provider (openai or deepseek)
'providers' => [
'openai' => [
'apiKey' => 'sk-demo01',
'model' => 'gpt-4.1-nano',
],
'deepseek' => [
'apiKey' => 'ds-demo01',
'model' => 'deepseek-flash',
],
],
];

The provider value selects which entry under providers is active. You can configure keys for both and switch by changing provider. Replace the placeholder keys with your real API keys from each provider.

For an OpenAI-compatible endpoint, set provider to openai-compatible and include baseUrl and model under that provider key. Open Modules → Configure → MediaHub AI for setup notes and optional site-wide context phrases (used when the editor leaves the per-request context field empty).

ALT text workflow

  1. Install and configure a provider (see above).
  2. Open an image on the asset detail page and click the AI icon beside Alt/Description, or on a MediaHub field image card click the same icon or open Actions and choose Quick Alt or 3× Options.
  3. Run Quick Alt or open 3× Options.
  4. Optionally add truthful page-context phrases (preferred SEO words that must match what is visible in the image).
  5. Generate, edit if needed, and apply one alternative.
  6. Save the ProcessWire page (field) or the asset (library).

The refinement modal also offers Regenerate per alternative and Shorten to bring long text closer to the target length (~125 characters).

Requirements

  • ProcessWire 3.0.165 or newer
  • MediaHub and InputfieldMediaHub installed
  • MediaHub 1.23.0 or newer (companion field actions)
  • PHP cURL and mbstring
  • A vision-capable API account and key from your chosen provider

Limitations (beta)

  • ALT text only — other metadata tools are planned but not shipped yet.
  • Raster images — SVG and non-image assets are not supported.
  • Provider costs — usage is billed by your API provider; MediaHub AI does not meter or cap requests.
  • Grounding — suggestions are prompted to stay faithful to visible content, but editors should still review every result.

See also

Last updated