AI-powered alt text and excerpt generation for WordPress, built on the WordPress AI Client.
- Generates image alt text automatically on upload (when alt text is empty)
- Adds a "Generate/Regenerate" button in the Media Library for on-demand alt text
- Generates post excerpts on publish (when excerpt is empty and content is long enough)
- Registers Abilities API abilities for both features (discoverable via REST/MCP)
- WordPress 7.0+
- PHP 7.4+
- At least one AI provider plugin (for example Anthropic or OpenAI)
- A configured provider API key
- Copy this plugin to
wp-content/plugins/wp-ai-content-kit/. - Activate
WP AI Content Kit. - Activate at least one provider plugin, for example:
ai-provider-for-anthropicai-provider-for-openai
- Configure credentials for that provider via environment variable or constant.
Examples:
// wp-config.php (example)
define( 'ANTHROPIC_API_KEY', 'your-key' );
// or
define( 'OPENAI_API_KEY', 'your-key' );Note: this stack does not provide a built-in Settings > AI Credentials screen. Credentials are read from provider env vars/constants.
Abilities (manual, callable via Abilities API/REST/MCP):
wp-ai-content-kit/generate-alt-textwp-ai-content-kit/generate-excerpt
Automatic hooks (not ability calls):
add_attachment-> generates alt text for new image uploads when alt text is emptysave_post-> generates excerpt for publishedpostposts when excerpt is empty and stripped content is at least 200 chars
// Alt text: force provider + preferred model.
add_filter( 'wpai_content_kit_alt_text_provider', function () {
return 'openai';
} );
add_filter( 'wpai_content_kit_alt_text_model_preferences', function () {
return array( 'gpt-5-mini' );
} );
// Excerpt: force provider + preferred model.
add_filter( 'wpai_content_kit_excerpt_provider', function () {
return 'anthropic';
} );
add_filter( 'wpai_content_kit_excerpt_model_preferences', function () {
return array( 'claude-sonnet-4' );
} );Model preferences are best-effort; if unavailable, AI Client falls back to a compatible model.