WordPress AI Connector Plugin

Power WordPress AI with AvalAI

A connector plugin that registers AvalAI as an AI provider for WordPress. Once connected, the built-in WordPress AI features work through AvalAI — a single gateway that gives you access to many different AI models for text and image generation.

Version 1.0.12 WordPress 7.0+ PHP 7.4+ GPLv2 or later Translation ready (EN / FA)

What it does

WordPress 7.0 ships with a built-in AI system. This plugin adds AvalAI as a selectable provider for that system — exactly like the official OpenAI and Google connector plugins. No changes to the core AI plugin are needed; every existing AI feature simply starts working through AvalAI.

Content generation Article generation Content rewriting Image generation Featured images Vision / alt text AI-assisted workflows

Features

Everything you need to run WordPress AI through AvalAI — efficiently and on your terms.

🔌

Drop-in AI provider

Registers AvalAI with the WordPress AI Client so it appears alongside other providers, with no core changes.

🧠

Hundreds of models

Access many text and image models through one gateway. The model lists are fetched live from AvalAI.

🎯

Per-task model selection

Pick a dedicated model for text, image, and vision tasks. Each list only shows models that support that task — so you never pay for the wrong one.

🖼️

Default aspect ratio

Set a default image ratio (1:1, 3:2, 2:3, 16:9, 9:16) sent automatically with every image request, with an optional prompt-text hint.

Automatic image optimization

Heavy AI-generated PNGs are downscaled and converted to WebP on import — keeping pages fast. A real test reduced a 6.9 MB image to ~44 KB. Fully optional.

🔗

Selectable API endpoint

Choose between AvalAI's two API endpoints, or enter a custom base URL — handy if one is unreachable from your server.

🌐

Clean English filenames

Generated images get tidy ASCII filenames instead of long non-Latin names derived from the prompt.

🔒

Secure key handling

The API key is stored through the WordPress AI settings page and masked in REST responses. No front-end output, no external links on your public site.

🗣️

Translation ready

Fully internationalized, shipping with English and a complete Persian (fa_IR) translation. Switch your admin language and the UI follows.

Get started in minutes

Four simple steps and your WordPress AI features run on AvalAI.

Install & activate

Upload the plugin and activate it from the Plugins screen.

Choose the endpoint

Go to Settings → AvalAI and select the API base URL (primary or mirror).

Add your API key

Enter your AvalAI API key on the WordPress AI settings page. Get a key at ava.al/keys.

Pick your models

Optionally choose a model and aspect ratio per task, then start generating.

Screenshots

A look at the plugin's settings and the AI features in action.

AvalAI listed and connected as a provider on the WordPress AI settings page
AvalAI connected as a provider on the WordPress AI settings page.
Settings → AvalAI: API endpoint selection and per-task model selection
Settings → AvalAI: API endpoint and per-task model selection.
Per-task model selection for text, image and vision, with image optimization
Choose a model per task (text, image, vision) and toggle image optimization.
Image Options: optimization toggle and default aspect ratio
Image Options: optimization and a default aspect ratio (e.g. 3:2).

Built for control

Sensible defaults out of the box, with settings for everything that matters.

⚙️

Endpoint & key

Primary or mirror endpoint (or a custom URL). API key managed on the WordPress AI page, or via the AVALAI_API_KEY constant.

🎛️

Model preferences

Separate model choice for text, image and vision — applied through standard WordPress filters, so the core plugin stays untouched.

🧩

Developer friendly

Filters for timeout, image size, optimization, output format and filenames let developers fine-tune behavior.

External service & privacy

This plugin connects to AvalAI

To provide AI features, the plugin communicates with the AvalAI API at https://api.avalai.ir/v1 or https://api.avalapis.ir/v1 (selectable in settings).

Your prompt content — and, where relevant, images — together with your API key are sent to AvalAI only when you (or an AI feature) run a generation request, plus a request to list models and validate the key.

The plugin adds no front-end output and no external links on your public site. Use of AvalAI is subject to its terms and privacy policy — see avalai.ir and docs.avalai.ir.

Requirements

7.0+
WordPress
7.4+
PHP
AvalAI
API key required

Frequently asked questions

Where do I enter the API key?

On the WordPress AI settings page, next to other providers. It is stored in the connectors_ai_avalai_api_key option, or can be provided via the AVALAI_API_KEY constant/environment variable.

How do I switch between the two AvalAI endpoints?

Go to Settings → AvalAI and pick the primary or mirror endpoint, or enter a custom URL. Advanced setups can fix it with the AVALAI_BASE_URL constant.

Can I choose which model is used?

Yes. Under Settings → AvalAI you can select a dedicated model for text, image and vision tasks. Each list only shows models that support that task, so you can pick a cheaper or faster model and avoid unexpected costs.

Will my generated images slow down my site?

No. AI images are automatically downscaled and converted to WebP on import (this can be turned off in settings), while WordPress still generates all responsive sizes.

Does it work like the official OpenAI and Google connectors?

Yes — it uses the same WordPress AI provider framework, so it behaves as a drop-in provider and all existing AI features keep working.