Multi-Provider AI Tagging and Description Generation for WordPress
KWIK AI is a WordPress plugin that automatically generates relevant tags and descriptions for your content using AI. It supports multiple AI providers including Ollama (local models), OpenRouter (cloud models), and OpenAI (GPT models).
- Generates relevant tags from images and text content
- Available as a meta box in the post editor
- Supports multiple image sources (attachments, blocks, galleries)
- Preview and edit tags before applying
- Generates descriptions from post images using AI
- Available as a meta box in the post editor sidebar
- Inserts description into post content as HTML comments
- Gutenberg block for generating AI descriptions
- Self-contained with generation controls built into the block
- Editable content directly in the block editor
- Can generate descriptions from images or content scraped from URLs
- Customizable description length with slider controls (50-500 words)
- No insertion into post content - the block contains the description
- Generates a featured image from your post content with a single button
- Scans the post and uses your text AI provider to craft an image prompt
- Optional guidance field to steer style, subject, and mood
- Preview the result before it's saved, with a Regenerate option
- Uses FAL.AI's queue API so slow image models don't time out
- Ollama: Run models locally on your server
- OpenRouter: Access hundreds of AI models through a unified API
- OpenAI: Use GPT models directly
- WordPress 5.6+ (any recent LTS)
- One of the following AI providers:
- Ollama running on
http://localhost:11434(configurable) - OpenRouter API key
- OpenAI API key
- Ollama running on
- Vision-capable model for image analysis:
- Ollama:
gemma3:27b,llava:13b, etc. - OpenRouter:
anthropic/claude-3-5-sonnet-latest,openai/gpt-4o, etc. - OpenAI:
gpt-4o,gpt-4o-mini, etc.
- Ollama:
- Posts with images or at least 50 words of text content
- Upload the plugin to your WordPress site
- Activate the plugin
- Configure your AI provider in Settings > KWIK AI
- Ensure your AI provider is running with a vision-capable model
Navigate to Settings > KWIK AI to:
- Select your AI provider (Ollama, OpenRouter, or OpenAI)
- Configure the API endpoint
- Select the model to use
- (Optional) Set a separate Text Model for text-only generation (image prompts, URL-based descriptions) when your main model is vision-only
- Enter API credentials
- Enable/disable specific post types
- View connection status
- (Optional) Add a FAL.AI API key and pick an image model/size for AI featured images
- Create or edit a post with images and/or sufficient text
- Find the "AI Tags" meta box in the sidebar
- Click "Generate AI Tags" to analyze content
- Review and remove unwanted tags
- Click "Apply Tags" to add them to the post
- Create or edit a post with images
- Find the "AI Description" meta box in the sidebar
- Click "Generate AI Description" to analyze images
- Review the generated description
- Click "Apply" to insert into post content
- Add a FAL.AI API key in Settings > KWIK AI and choose an image model and size
- Create or edit a post with a title and some content
- Find the "AI Featured Image" meta box in the sidebar
- (Optional) Enter guidance such as "watercolor style, warm lighting, no people"
- Click "Generate Prompt" to draft an image prompt from the post, then review and edit it in the prompt field (or type your own). This is also where you can remove any wording an image content filter might wrongly flag
- Click "Generate Image" and wait while the image is created
- Review the preview, then click "Set as Featured Image" (or "Regenerate" for a new image from the same prompt)
- Add a new block and search for "AI Description"
- Insert the block where you want the description
- Add URLs to external content in the input fields (optional)
- Set your desired description length using the sliders (50-500 words)
- Click "Generate Description" to create content from images or URLs
- Edit the description directly in the block if needed
- Use the "Regenerate" button to create new content
- ✅ Content stays within the block (no HTML comments)
- ✅ Editable directly in block editor
- ✅ Better content management
- ✅ Can place anywhere in content
- ✅ Multiple blocks per post possible
- ✅ Better user experience
⚠️ Inserts content with HTML comment markers⚠️ Appends to beginning of post content⚠️ Less flexible positioning- ✅ Still functional for existing workflows
Pros:
- Free - no API costs
- Privacy - all processing done locally
- No rate limits
- Works offline after models are downloaded
Cons:
- Requires local installation
- Needs sufficient hardware resources
- Model download time
- Limited to available models
Best for: Users with local hardware, privacy concerns, or limited budgets
Pros:
- Access to hundreds of models
- Pay-per-use pricing
- No local setup required
- High-quality models available
Cons:
- Costs money
- Requires internet connection
- Rate limits on free tier
Best for: Users who want access to multiple models without local setup
Pros:
- Best-in-class models (GPT-4o)
- Simple setup
- Reliable service
Cons:
- Costs money
- Requires internet connection
- Limited to OpenAI models
Best for: Users who want the best quality and don't mind paying
By default, the plugin works with:
- Posts (
post) - Belts (
belt)
Additional post types can be enabled in the settings.
- Featured images
- Media library attachments
- Gutenberg image blocks
- Gallery blocks
- TRB belt gallery blocks (custom)
- Media & text blocks
- Cover blocks
Ollama Models:
- Uses Gemma3, LLaVA, or other vision-capable models
- Vision model for image analysis
- Text analysis for content with 50+ words
- Generates concise, relevant tags and descriptions
OpenRouter Models:
- Anthropic Claude series
- OpenAI GPT series
- Meta Llama series
- And many more...
OpenAI Models:
- GPT-4o
- GPT-4o-mini
- GPT-4
- And more...
- 2-minute timeout for AI generation
- Automatic image deduplication
- Supports multiple image formats
- Optimized for WordPress block editor
The plugin has been restructured for better maintainability:
/kwik-ai/
├── kwik-ai.php (main plugin file)
├── /core/ (core plugin functionality)
│ ├── init.php
│ ├── constants.php
│ └── functions.php
├── /includes/ (helper functions)
│ ├── image-processing.php
│ ├── ollama-api.php (supports Ollama, OpenRouter, OpenAI)
│ ├── tag-generation.php
│ └── description-generation.php
├── /admin/ (admin-specific functionality)
│ ├── admin-init.php
│ ├── meta-boxes.php
│ ├── settings.php
│ └── ajax-handlers.php
├── /blocks/ (Gutenberg block functionality)
│ ├── blocks-init.php
│ └── description-block.php
├── /assets/ (frontend assets)
│ ├── /js/
│ │ ├── admin.js
│ │ └── description-block.js
│ └── /css/
│ ├── admin.css
│ ├── settings.css
│ ├── description-block-editor.css
│ └── description-block-frontend.css
├── tests/ (test suite)
│ ├── bootstrap.php
│ ├── unit/ (unit tests)
│ │ ├── TestSettings.php
│ │ ├── TestApiFunctions.php
│ │ └── TestTagGeneration.php
│ └── integration/ (integration tests)
│ └── TestPluginIntegration.php
├── debug-test.php
├── README.md
├── CHANGELOG.md
├── BRANCH-GUIDE.md
└── TROUBLESHOOTING.md
The plugin includes a comprehensive test suite using PHPUnit.
# Install dependencies
composer install
# Run all tests
composer test
# Run with coverage report
composer test:coverage
# Run only unit tests
composer test:unit
# Run only integration tests
composer test:integration
# Run code quality checks
composer lint
# Fix code style issues
composer lint:fix- Unit Tests: Tests individual functions and methods
- Integration Tests: Tests plugin functionality end-to-end
- Code Quality: PHP_CodeSniffer with WordPress coding standards
See tests/README.md for detailed instructions on writing tests.
-
No tags/descriptions generated:
- Ensure your AI provider is running/configured
- Check that you have a vision-capable model installed
-
Timeout errors:
- The AI provider might be processing, try again
- Increase the timeout in the code if needed
-
No images found:
- Add images to the post or check image permissions
-
Block not appearing:
- Check if post type is enabled in settings
-
Connection errors:
- Test the connection in Settings > KWIK AI
- Verify API credentials are correct
- Check firewall settings
Enable WP_DEBUG to see detailed logging and status information in the meta boxes.
GPL-2.0-or-later