WordPress 7.0 ships with something genuinely exciting — a built-in AI Client that lets any theme or plugin tap into large language models for things like excerpt generation, comment moderation, and content suggestions. The catch? The default providers are Anthropic, Google, and OpenAI. Every request costs money, and your content leaves your infrastructure.
I wanted something different. So I built AIPCF.
What is AIPCF?
AIPCF — AI Provider for Cloudflare — registers Cloudflare Workers AI as a provider for the WordPress AI Client. Once you install it and add your Cloudflare credentials, every WordPress AI feature automatically routes through Cloudflare’s edge network instead of a commercial API.
It’s free to start, fast, and your prompts never reach a third-party AI company’s servers.
Why Cloudflare Workers AI?
Three reasons convinced me to build this:
The free tier is actually useful. Cloudflare gives you 10,000 neurons per day at no cost — roughly 200–500 generation requests. For a typical blog running AI-assisted excerpt generation and comment moderation, that’s more than enough to run indefinitely without spending a cent.
Inference at the edge. Requests are processed on Cloudflare’s global network, close to your visitors. No cold starts, no single-region bottleneck.
Data residency. Your prompts and completions stay within Cloudflare’s network. They don’t get forwarded to OpenAI, Anthropic, or anyone else. For sites dealing with sensitive content — legal, medical, private communities — that matters a lot.
What models does it support?
The plugin fetches the live list of text generation models directly from your Cloudflare account. Right now that includes models from Meta (Llama 4, Llama 3.x), Mistral, Google Gemma, DeepSeek, and Qwen — and as Cloudflare adds new models, they automatically appear in the settings dropdown. No plugin update needed.
The default model is Meta Llama 4 Scout 17B — fast, capable, and well within the free tier for most use cases.
Setting it up takes about two minutes
- Install the plugin from WordPress.org
- Go to Settings → Cloudflare Workers AI
- Paste in your Cloudflare Account ID and an API token with “Workers AI – Edit” permission
- Save — the plugin tests the connection automatically
That’s it. WordPress AI features start using Cloudflare immediately.
If you prefer to keep credentials out of the database, you can set them in wp-config.php:
define( 'CLOUDFLARE_WORKERS_AI_ACCOUNT_ID', 'your-account-id' );
define( 'CLOUDFLARE_WORKERS_AI_API_TOKEN', 'your-api-token' );
For developers
If you want to call Cloudflare Workers AI directly in your own plugin or theme, you can use the WordPress AI Client API:
use WordPress\AiClient\AiClient;
$result = AiClient::prompt( 'Summarise this post in two sentences.' )
->usingProvider( 'cloudflare-workers-ai' )
->usingModel( '@cf/meta/llama-4-scout-17b-16e-instruct' )
->generateTextResult();
echo $result->toText();
Swap the model ID and you’re running DeepSeek R1, Qwen QwQ, or any other model Cloudflare supports — without touching anything else.
What’s next
This release covers text generation. The roadmap includes:
- AI Gateway support — Cloudflare’s proxy layer adds request caching, rate limiting, and usage analytics. This is the feature no other WP AI provider can match, and it’s next on the list.
- Image generation — FLUX and Stable Diffusion models are ready on Cloudflare’s side. Once WordPress adds image generation support to the AI Client, this plugin will be ready.
- Streaming responses — Cloudflare Workers AI supports server-sent events. Streaming would make long responses feel significantly faster in the UI.
The plugin is free, open source, and on WordPress.org.
👉 Download AIPCF from WordPress.org
If you run into anything or have a feature request, open an issue or reply here.