{"id":346431,"date":"2026-08-01T14:06:17","date_gmt":"2026-08-01T14:06:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ai-provider-for-cloudflare\/"},"modified":"2026-08-01T14:05:52","modified_gmt":"2026-08-01T14:05:52","slug":"ai-provider-for-cloudflare","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/ai-provider-for-cloudflare\/","author":23373284,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0.2","requires":"6.9","requires_php":"7.4","requires_plugins":null,"header_name":"AI Provider for Cloudflare","header_author":"Deepak Bhojwani","header_description":"Cloudflare Workers AI provider for the WordPress AI Client (Llama, Mistral, Qwen, and FLUX images).","assets_banners_color":"545454","last_updated":"2026-08-01 14:05:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/aiacfpro.online","header_author_uri":"https:\/\/github.com\/Deepak-Bhojwani","rating":0,"author_block_rating":0,"active_installs":0,"downloads":37,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"deepakbhojwani","date":"2026-08-01 14:05:52"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3631044,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3631044,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3631044,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3631044,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3631044,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250},"banner.svg":{"filename":"banner.svg","revision":3631044,"resolution":false,"location":"assets","locale":false}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2353,3882,25308,223625,264978],"plugin_category":[],"plugin_contributors":[268900],"plugin_business_model":[],"class_list":["post-346431","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-cloudflare","plugin_tags-connector","plugin_tags-llama","plugin_tags-workers-ai","plugin_contributors-deepakbhojwani","plugin_committers-deepakbhojwani"],"banners":{"banner":"https:\/\/ps.w.org\/ai-provider-for-cloudflare\/assets\/banner-772x250.png?rev=3631044","banner_2x":"https:\/\/ps.w.org\/ai-provider-for-cloudflare\/assets\/banner-1544x500.png?rev=3631044","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/ai-provider-for-cloudflare\/assets\/icon.svg?rev=3631044","icon":"https:\/\/ps.w.org\/ai-provider-for-cloudflare\/assets\/icon.svg?rev=3631044","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin adds Cloudflare Workers AI as a provider for the WordPress AI Client. Unlike text-only connectors, it brings <strong>three<\/strong> capabilities to any AI-Client-powered feature, plugin, or theme \u2014 <strong>text generation, image generation, and image understanding (vision \/ alt text)<\/strong> \u2014 all running on Cloudflare's global edge network.<\/p>\n\n<p>Cloudflare Workers AI offers a free daily allocation (Neurons) on the free plan, and a single API token works across many hosted models \u2014 chat (Llama, Mistral, Gemma, Qwen, DeepSeek, and more), FLUX image generation, and multimodal vision.<\/p>\n\n<p><strong>What you get:<\/strong><\/p>\n\n<ul>\n<li><strong>Text generation<\/strong> with Cloudflare-hosted chat models (Llama, Mistral, Gemma, Qwen, DeepSeek, GPT-OSS, and more)<\/li>\n<li><strong>Image generation<\/strong> with Cloudflare-hosted FLUX models (FLUX.1 [schnell] and FLUX.2 [dev] \/ [klein])<\/li>\n<li><strong>AI alt text &amp; image understanding<\/strong> \u2014 works out of the box with a non-gated multimodal model, so the WordPress alt-text feature just works (no per-account license step)<\/li>\n<li>JSON \/ structured output support (on models that support JSON mode)<\/li>\n<li>Function calling (tool) support (on models that support function calling)<\/li>\n<li>Reasoning (\"thinking\") model support<\/li>\n<li>Auto-preferred: once your credentials are saved, AI features use Cloudflare automatically \u2014 no per-feature provider picking<\/li>\n<li>Automatic provider registration with the WordPress AI Client<\/li>\n<li>No setup screen to wrestle with \u2014 credentials go on the standard Connectors screen, and the model list is read live from your account<\/li>\n<\/ul>\n\n<p>The model list is read live from Cloudflare's model catalog, which is account-accurate, so only models your account can actually call are surfaced.<\/p>\n\n<p><strong>Requirements:<\/strong><\/p>\n\n<ul>\n<li>PHP 7.4 or higher<\/li>\n<li>For WordPress 6.9, the <a href=\"https:\/\/github.com\/WordPress\/php-ai-client\">wordpress\/php-ai-client<\/a> package must be installed<\/li>\n<li>For WordPress 7.0 and above, no additional changes are required<\/li>\n<li>A free Cloudflare account with Workers AI (an API token and your account ID)<\/li>\n<\/ul>\n\n<p>This plugin is a provider add-on: on its own it does nothing visible. It only takes effect once the PHP AI Client is available and another plugin (or your code) makes an AI request using the <code>cloudflare<\/code> provider.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to the Cloudflare Workers AI API to provide AI text and image generation. It is required for the plugin's core functionality and only runs when you (or a plugin using the PHP AI Client) trigger an AI request.<\/p>\n\n<ul>\n<li>What it does: sends your prompt text, model selection, and generation parameters to Cloudflare's Workers AI inference API and receives the generated text or image.<\/li>\n<li>When: only when an AI request is made via the PHP AI Client using the <code>cloudflare<\/code> provider. No data is sent on page load or in the background.<\/li>\n<li>Data sent: the prompt\/messages you provide, the chosen model ID, generation parameters, and your Cloudflare API token (as an Authorization header) for authentication. The request URL includes your Cloudflare account ID.<\/li>\n<li>Service: Cloudflare Workers AI \u2014 endpoint <code>api.cloudflare.com<\/code>.\n\n<ul>\n<li>Terms of Service: https:\/\/www.cloudflare.com\/website-terms\/<\/li>\n<li>Privacy Policy: https:\/\/www.cloudflare.com\/privacypolicy\/<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>Cloudflare and Workers AI are trademarks of Cloudflare, Inc. This plugin is an independent integration and is not affiliated with, endorsed by, or sponsored by Cloudflare, Inc.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/ai-provider-for-cloudflare\/<\/code>, or install through the WordPress plugins screen.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Ensure the PHP AI Client is available (bundled with WordPress 7.0, or via the WordPress AI plugin \/ the wordpress\/php-ai-client package on WordPress 6.9).<\/li>\n<li>Configure your Cloudflare credentials. Cloudflare needs two values \u2014 your account ID and an API token \u2014 because the account ID is part of every Cloudflare API URL. Provide them in either of these ways:<\/li>\n<\/ol>\n\n<ul>\n<li><strong>On the AI provider screen (recommended):<\/strong> in the Cloudflare API key field, enter both values joined by a colon, as <code>account-id:api-token<\/code> (for example <code>cc3a43c9...:cfut_...<\/code>). No file editing is needed.<\/li>\n<li><p><strong>In <code>wp-config.php<\/code>:<\/strong> put the token in the key and the account ID in a constant (or set environment variables of the same names):<\/p>\n\n<p>define( 'CLOUDFLARE_API_KEY', 'your-workers-ai-api-token' );\ndefine( 'CLOUDFLARE_ACCOUNT_ID', 'your-account-id' );<\/p><\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20get%20a%20cloudflare%20api%20token%20and%20account%20id%3F\"><h3>How do I get a Cloudflare API token and account ID?<\/h3><\/dt>\n<dd><p>Sign in at <a href=\"https:\/\/dash.cloudflare.com\">dash.cloudflare.com<\/a>, open Workers AI, and choose \"Use REST API\". From there you can create a Workers AI API token (it needs both the \"Workers AI - Read\" and \"Workers AI - Edit\" permissions) and copy your account ID, which is shown on the same page.<\/p><\/dd>\n<dt id=\"why%20do%20i%20need%20an%20account%20id%20as%20well%20as%20a%20token%3F\"><h3>Why do I need an account ID as well as a token?<\/h3><\/dt>\n<dd><p>Cloudflare's API URL includes your account ID (for example <code>\u2026\/accounts\/{account_id}\/ai\/\u2026<\/code>), so the plugin cannot make any request without it, and a Workers AI token cannot reveal the account ID on its own. The easiest way is to enter <code>account-id:api-token<\/code> in the API key field; alternatively set the <code>CLOUDFLARE_ACCOUNT_ID<\/code> constant and put just the token in the key. The account ID is not a secret, but it is required.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20work%20without%20the%20php%20ai%20client%3F\"><h3>Does this plugin work without the PHP AI Client?<\/h3><\/dt>\n<dd><p>No. This plugin requires the PHP AI Client. It provides the Cloudflare-specific implementation that the PHP AI Client uses, and registers itself automatically when the client is available.<\/p><\/dd>\n<dt id=\"which%20models%20are%20supported%3F\"><h3>Which models are supported?<\/h3><\/dt>\n<dd><p>The chat (text generation) models from Cloudflare's live catalog (Llama, Mistral, Gemma, Qwen, DeepSeek, GPT-OSS, and more), including vision-capable models that also accept image input, plus the FLUX.1 [schnell], FLUX.2 [dev], and FLUX.2 [klein] image generation models. JSON mode and function calling are available on the subset of models that support them.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20generate%20images%3F\"><h3>Does this plugin generate images?<\/h3><\/dt>\n<dd><p>Yes. It supports the Cloudflare-hosted FLUX.1 [schnell] and FLUX.2 ([dev], [klein-4b], [klein-9b]) image generation models. Vision-capable chat models can additionally accept images as input.<\/p><\/dd>\n<dt id=\"does%20image%20understanding%20%2F%20alt%20text%20generation%20work%3F\"><h3>Does image understanding \/ alt text generation work?<\/h3><\/dt>\n<dd><p>Yes. Image input (used by features such as alt text generation) is handled by a multimodal chat model. By default Mistral Small 3.1 is used: it is not license-gated (so it works on every account with no extra setup) and reliably follows accessibility instructions \u2014 writing real alt text for informative images and detecting decorative ones. Cloudflare's dedicated vision model, Llama 3.2 Vision, is also available for general image description, but it requires you to accept Meta's Llama license once before first use (open that model in the Cloudflare dashboard and click Agree, or send it one request with the prompt \"agree\"); until then it returns a 403, and it is not the default.<\/p><\/dd>\n<dt id=\"is%20there%20a%20free%20tier%3F\"><h3>Is there a free tier?<\/h3><\/dt>\n<dd><p>Cloudflare Workers AI includes a free daily allocation on the free plan. Usage beyond that requires the Workers Paid plan. See Cloudflare's pricing for current limits.<\/p><\/dd>\n<dt id=\"is%20this%20plugin%20affiliated%20with%20cloudflare%3F\"><h3>Is this plugin affiliated with Cloudflare?<\/h3><\/dt>\n<dd><p>No. Cloudflare and Workers AI are trademarks of Cloudflare, Inc. This plugin is an independent integration and is not affiliated with, endorsed by, or sponsored by Cloudflare, Inc.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Text generation with Cloudflare Workers AI chat models via the OpenAI-compatible Chat Completions API.<\/li>\n<li>Image generation with the Cloudflare-hosted FLUX.1 [schnell] and FLUX.2 [dev] \/ [klein] models via the Workers AI run endpoint.<\/li>\n<li>Image understanding \/ AI alt text via a non-gated multimodal model \u2014 works out of the box, no per-account license step.<\/li>\n<li>Auto-preferred: AI features use Cloudflare automatically once credentials are configured (via the wpai_preferred_text_models filter).<\/li>\n<li>Live model catalog (account-accurate) \u2014 only models your account can call are surfaced.<\/li>\n<li>JSON output, function calling, and reasoning support.<\/li>\n<\/ul>","raw_excerpt":"Cloudflare Workers AI for the WordPress AI Client \u2014 text generation, FLUX images, and AI alt text on Cloudflare&#039;s free edge.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/346431","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=346431"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/deepakbhojwani"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=346431"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=346431"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=346431"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=346431"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=346431"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=346431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}