Razhur Connector for AvalAI adds AvalAI (https://avalai.ir) as a selectable AI provider for the WordPress AI system that ships with WordPress 7.0. AvalAI is an AI gateway (similar to OpenRouter) that gives you access to many different AI models — such as GPT, Gemini, Claude, Flux, Imagen and Qwen — through a single unified API.
Once activated and configured with your AvalAI API key, AvalAI appears alongside the other providers on the WordPress AI settings page, and every built-in AI feature simply works through AvalAI. No changes to the core AI plugin are required; this plugin behaves as a drop-in provider, exactly like the official OpenAI and Google connector plugins.
This is an independent, third-party plugin developed by Razhur. It is not affiliated with, endorsed by, or sponsored by AvalAI. “AvalAI” is used only to identify the service this plugin connects to.
Features
- Drop-in AI provider — registers AvalAI with the WordPress AI system; no core changes needed.
- Many models — access a large set of text and image models, fetched live from AvalAI.
- Per-task model selection — choose a dedicated model for text generation, image generation and vision (image understanding). Each list shows only the models that support that task, so you can pick a cheaper or faster model and avoid unexpected cost.
- Default aspect ratio — set a default image ratio (1:1, 3:2, 2:3, 16:9, 9:16) that is sent with every image request, with an optional prompt-text hint for models that ignore the size parameter.
- Automatic image optimization — large AI-generated PNG images are downscaled and converted to WebP on import to keep pages fast, while WordPress still generates all responsive sizes. This is optional and can be turned off.
- Clean English file names — generated images are saved with tidy ASCII file names instead of long names derived from the prompt.
- Selectable API endpoint — choose between the two AvalAI endpoints, or enter a custom base URL.
- Secure key handling — the API key is stored through the WordPress AI settings page and masked in REST responses.
- Translation ready — fully internationalized, shipping with English and a complete Persian (fa_IR) translation.
Supported AI features
- Content generation
- Article generation
- Content rewriting
- Image generation (including featured images)
- Vision / alt text generation
- Other AI-assisted workflows provided by the WordPress AI system
API endpoints
AvalAI provides two equivalent endpoints; either can be selected in the settings:
- https://api.avalai.ir/v1 (primary, default)
- https://api.avalapis.ir/v1 (mirror)
Requirements
- WordPress 7.0 or higher (the AI Client SDK is bundled in WordPress 7.0 core).
- PHP 7.4 or higher.
- An AvalAI API key.
External services
This plugin connects to the external service AvalAI to provide its AI features. Without connecting to this service, the plugin does nothing.
- What is sent: when you (or an AI feature) run a generation request, your prompt content — and, where relevant, images — together with your API key are sent to AvalAI. A request is also made to list the available models and to validate the API key.
- When it is sent: only when an AI request is performed, and when listing/validating models on the settings page.
- Where it is sent: to the AvalAI API at
https://api.avalai.ir/v1 or https://api.avalapis.ir/v1 (selectable in settings).
- The plugin adds no front-end output and no external links on the public site.
Use of this service is subject to AvalAI’s terms and privacy policy:
- Website: https://avalai.ir
- Documentation and privacy policy: https://docs.avalai.ir/en/
Using this plugin requires an AvalAI account and API key.