{"id":326903,"date":"2026-06-17T07:46:17","date_gmt":"2026-06-17T07:46:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ai-provider-for-avalai\/"},"modified":"2026-06-17T07:45:46","modified_gmt":"2026-06-17T07:45:46","slug":"razhur-connector-for-avalai","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/razhur-connector-for-avalai\/","author":23517285,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.12","stable_tag":"1.0.12","tested":"7.0","requires":"7.0","requires_php":"7.4","requires_plugins":null,"header_name":"Razhur Connector for AvalAI","header_author":"ARASH MORADI","header_description":"Razhur Connector for AvalAI \u2014 access to many different AI models through the AvalAI gateway, for the WordPress AI Client. Not affiliated with AvalAI.","assets_banners_color":"","last_updated":"2026-06-17 07:45:46","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/Razhur.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":27,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.12":{"tag":"1.0.12","author":"arashmoradi99","date":"2026-06-17 07:45:46"}},"upgrade_notice":{"1.0.11":"<p>Plugin renamed to &quot;Razhur Connector for AvalAI&quot; and additional compliance fixes.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.12"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"AvalAI connected as a provider on the WordPress AI settings page.","2":"Settings -&gt; AvalAI: API endpoint and per-task model selection.","3":"Per-task model selection (text, image, vision) and image optimization.","4":"Image Options: optimization and a default aspect ratio."}},"plugin_section":[],"plugin_tags":[2353,267470,25308,1890,25198],"plugin_category":[],"plugin_contributors":[267471],"plugin_business_model":[],"class_list":["post-326903","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-avalai","plugin_tags-connector","plugin_tags-gateway","plugin_tags-image-generation","plugin_contributors-arashmoradi99","plugin_committers-arashmoradi99"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/razhur-connector-for-avalai.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Razhur Connector for AvalAI adds <strong>AvalAI<\/strong> (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 \u2014 such as GPT, Gemini, Claude, Flux, Imagen and Qwen \u2014 through a single unified API.<\/p>\n\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Drop-in AI provider<\/strong> \u2014 registers AvalAI with the WordPress AI system; no core changes needed.<\/li>\n<li><strong>Many models<\/strong> \u2014 access a large set of text and image models, fetched live from AvalAI.<\/li>\n<li><strong>Per-task model selection<\/strong> \u2014 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.<\/li>\n<li><strong>Default aspect ratio<\/strong> \u2014 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.<\/li>\n<li><strong>Automatic image optimization<\/strong> \u2014 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.<\/li>\n<li><strong>Clean English file names<\/strong> \u2014 generated images are saved with tidy ASCII file names instead of long names derived from the prompt.<\/li>\n<li><strong>Selectable API endpoint<\/strong> \u2014 choose between the two AvalAI endpoints, or enter a custom base URL.<\/li>\n<li><strong>Secure key handling<\/strong> \u2014 the API key is stored through the WordPress AI settings page and masked in REST responses.<\/li>\n<li><strong>Translation ready<\/strong> \u2014 fully internationalized, shipping with English and a complete Persian (fa_IR) translation.<\/li>\n<\/ul>\n\n<h4>Supported AI features<\/h4>\n\n<ul>\n<li>Content generation<\/li>\n<li>Article generation<\/li>\n<li>Content rewriting<\/li>\n<li>Image generation (including featured images)<\/li>\n<li>Vision \/ alt text generation<\/li>\n<li>Other AI-assisted workflows provided by the WordPress AI system<\/li>\n<\/ul>\n\n<h4>API endpoints<\/h4>\n\n<p>AvalAI provides two equivalent endpoints; either can be selected in the settings:<\/p>\n\n<ul>\n<li>https:\/\/api.avalai.ir\/v1 (primary, default)<\/li>\n<li>https:\/\/api.avalapis.ir\/v1 (mirror)<\/li>\n<\/ul>\n\n<h4>Requirements<\/h4>\n\n<ul>\n<li>WordPress 7.0 or higher (the AI Client SDK is bundled in WordPress 7.0 core).<\/li>\n<li>PHP 7.4 or higher.<\/li>\n<li>An AvalAI API key.<\/li>\n<\/ul>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to the external service <strong>AvalAI<\/strong> to provide its AI features. Without connecting to this service, the plugin does nothing.<\/p>\n\n<ul>\n<li><strong>What is sent:<\/strong> when you (or an AI feature) run a generation request, your prompt content \u2014 and, where relevant, images \u2014 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.<\/li>\n<li><strong>When it is sent:<\/strong> only when an AI request is performed, and when listing\/validating models on the settings page.<\/li>\n<li><strong>Where it is sent:<\/strong> to the AvalAI API at <code>https:\/\/api.avalai.ir\/v1<\/code> or <code>https:\/\/api.avalapis.ir\/v1<\/code> (selectable in settings).<\/li>\n<li>The plugin adds no front-end output and no external links on the public site.<\/li>\n<\/ul>\n\n<p>Use of this service is subject to AvalAI's terms and privacy policy:<\/p>\n\n<ul>\n<li>Website: https:\/\/avalai.ir<\/li>\n<li>Documentation and privacy policy: https:\/\/docs.avalai.ir\/en\/<\/li>\n<\/ul>\n\n<p>Using this plugin requires an AvalAI account and API key.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/ai-provider-for-avalai\/<\/code>, or install it from the Plugins screen.<\/li>\n<li>Activate the plugin through the \"Plugins\" menu in WordPress.<\/li>\n<li>Go to <strong>Settings -&gt; AvalAI<\/strong> and select the API base URL (primary or mirror).<\/li>\n<li>Go to the WordPress AI settings page (<strong>Settings -&gt; AI<\/strong>) and enter your AvalAI API key, or define it via the <code>AVALAI_API_KEY<\/code> constant or environment variable. You can obtain a key at https:\/\/ava.al\/keys.<\/li>\n<li>Optionally, use the \"Model Selection\" and \"Image Options\" sections on the AvalAI settings page to choose a model and a default aspect ratio per task.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"where%20do%20i%20enter%20the%20api%20key%3F\"><h3>Where do I enter the API key?<\/h3><\/dt>\n<dd><p>On the WordPress AI settings page, next to the other providers. The key is stored in the <code>connectors_ai_avalai_api_key<\/code> option, or it can be provided via the <code>AVALAI_API_KEY<\/code> constant or environment variable.<\/p><\/dd>\n<dt id=\"how%20do%20i%20switch%20between%20the%20two%20avalai%20endpoints%3F\"><h3>How do I switch between the two AvalAI endpoints?<\/h3><\/dt>\n<dd><p>Go to Settings -&gt; AvalAI and choose the primary or mirror endpoint, or enter a custom URL. Advanced setups can fix it with the <code>AVALAI_BASE_URL<\/code> constant.<\/p><\/dd>\n<dt id=\"my%20api%20key%20fails%20validation%20when%20i%20save%20it.\"><h3>My API key fails validation when I save it.<\/h3><\/dt>\n<dd><p>The system validates the key by listing models against the configured base URL. Make sure the correct base URL is selected under Settings -&gt; AvalAI and that your server can reach that endpoint, then save the key again.<\/p><\/dd>\n<dt id=\"can%20i%20choose%20which%20model%20is%20used%3F\"><h3>Can I choose which model is used?<\/h3><\/dt>\n<dd><p>Yes. Under Settings -&gt; AvalAI you can select a dedicated model for text, image and vision tasks. Each list only shows models that support that task.<\/p><\/dd>\n<dt id=\"will%20generated%20images%20slow%20down%20my%20site%3F\"><h3>Will generated images slow down my site?<\/h3><\/dt>\n<dd><p>No. AI-generated images are automatically downscaled and converted to WebP on import (this can be disabled in settings), while WordPress still generates all responsive image sizes.<\/p><\/dd>\n<dt id=\"does%20optimization%20affect%20normal%20media%20uploads%3F\"><h3>Does optimization affect normal media uploads?<\/h3><\/dt>\n<dd><p>No. Image optimization only applies to images created through the WordPress AI system, not to regular media uploads.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.12<\/h4>\n\n<ul>\n<li>Replaced generic prefixes with a distinct plugin-specific prefix to avoid conflicts: the namespace is now Razhur\\AvalAiConnector, and all option names and filter hooks use the razhur_avalai_ prefix.<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Renamed the plugin to \"Razhur Connector for AvalAI\" with a distinctive, non-affiliated name and added a non-affiliation notice. Improved boolean setting sanitization (rest_sanitize_boolean) and corrected the contributor username.<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>Compliance fixes for the WordPress.org Plugin Directory: escape exception output, remove the discouraged load_plugin_textdomain() call (translations are loaded automatically), add direct-file-access protection to the autoloader, and rewrite the readme in English.<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Removed the duplicate Plugin URI header (it matched the Author URI) and prepared the plugin for submission, including an \"External services\" disclosure section.<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Updated the plugin descriptions so AvalAI is correctly presented as a gateway to many different AI models.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Fixed: saving the plugin settings no longer clears the connector API key (settings now use a dedicated settings group).<\/li>\n<li>Improved model classification using the \"mode\" field returned by AvalAI, so all image models appear correctly in the image model list.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>The plugin is now fully translatable. Added a translation template (POT) and a complete Persian (fa_IR) translation.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Image optimization is now an option in the settings (enabled by default), with a warning about large images when disabled.<\/li>\n<li>Generated image file names are now created in English (ASCII). Filter: <code>razhur_avalai_image_filename<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Added a default image aspect ratio setting. The selected ratio (1:1, 3:2, 2:3, 16:9, 9:16) is sent as the <code>size<\/code> parameter with every image request, with an optional prompt-text hint. Filter: <code>razhur_avalai_image_size<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Added per-task model selection (text, image, vision) on the AvalAI settings page; each list shows only relevant models. Applied through the <code>wpai_preferred_text_models<\/code>, <code>wpai_preferred_image_models<\/code> and <code>wpai_preferred_vision_models<\/code> filters, without modifying the core AI plugin.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Added automatic optimization of AI-generated images on import (downscale to a maximum of 1536px and convert to WebP), while WordPress still generates all responsive sizes. Filters: <code>razhur_avalai_optimize_images<\/code>, <code>razhur_avalai_image_max_dimension<\/code>, <code>razhur_avalai_image_quality<\/code>, <code>razhur_avalai_image_mime<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed \"cURL error 28: Operation timed out\" errors (especially for image generation) by setting an adequate request timeout. Filter: <code>razhur_avalai_request_timeout<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release. Adds AvalAI as an AI provider with access to many different models and a configurable API base URL.<\/li>\n<\/ul>","raw_excerpt":"Use AvalAI as an AI provider in WordPress: generate text and images with many different models through a single unified gateway.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/326903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=326903"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/arashmoradi99"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=326903"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=326903"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=326903"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=326903"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=326903"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=326903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}