AIPCF connects WordPress to
Cloudflare Workers AI. Once connected, the AI features built into WordPress 7.0+ and the WordPress AI plugin run on Cloudflare's models: excerpts, titles and meta descriptions in the editor, alt text on upload, image generation. A background job fills in the meta descriptions and alt text your archive is missing. Everything runs inside Cloudflare's daily allowance of 10,000 neurons, and a budget guard makes sure a busy day never turns into a bill.
AIPCF is an independent community plugin, not an official Cloudflare or WordPress product. It was built out of need, and love for the idea that every small site should get useful AI without a bill.
What it costs, measured on a live site
- a meta description, excerpt or title: about 2 neurons (about 5,000 a day inside the allowance)
- a generated 1024x1024 image: about 170 neurons (about 55 a day)
- describing an image for alt text: about 17 neurons
- translating a sentence: under 1 neuron
What you get
- In the editor, with the WordPress AI plugin: excerpts, titles, meta descriptions, summaries, alt text on upload, image generation.
- Across your archive: an hourly backfill fills missing meta descriptions (Yoast, Rank Math, AIOSEO, SEOPress) and image alt text, a batch at a time, within its own daily budget. It works with or without the AI plugin. A 140-post backlog cost about 175 neurons on a real site.
- A receipt after every action: feature, model, neurons and time, shown in the editor. Today's total sits in the admin bar. A monthly e-mail sums up requests, tokens and neurons.
- Translation for any theme or plugin:
aipcf_translate( $text, 'mr' ), 100 languages via M2M100 and 22 Indian languages via IndicTrans2.
What you need
- A Cloudflare account. No credit card is needed for the Workers AI daily allowance.
- An API token created from the "Workers AI" template at dash.cloudflare.com/profile/api-tokens.
- Your Account ID, the 32-character code on the right of the Workers & Pages page in the Cloudflare dashboard.
The setup panel walks through all three, and one click applies the recommended defaults.
How it stays inside the allowance
- Recommended defaults: Gemma 4 26B for writing, Granite 4 Micro for short tasks, the 10,000-neuron daily guard, no paid fallbacks, caching on.
- Daily budget guard: e-mail at 80%; at 100% either pause until midnight UTC or switch to the cheapest model instead of failing.
- Short tasks on a small model: titles, excerpts, meta descriptions, moderation and alt text go to a model that costs a fraction of the neurons; long-form keeps your default.
- Caching: repeated identical prompts are answered from cache for zero neurons, at Cloudflare's edge through AI Gateway or locally. A "Regenerate" click within ten minutes bypasses it so you get a new answer.
- Never fall back to paid providers: one switch keeps Anthropic, Google and OpenAI out of the AI plugin's fallback list.
- Site Health: one test that goes amber only for things that need you: not connected, connector unapproved, a licence gate, the gateway bypassed, the budget reached.
Every Workers AI model
The model list is read from your account and cached for 12 hours. Each entry shows context window, neurons per 1,000 tokens from your account's current price list, and whether it supports tool calling or image input.
- Chat models: Llama, Gemma, GPT-OSS, Qwen, Mistral, DeepSeek, GLM, Granite, Kimi, Nemotron and whatever Cloudflare adds next. Requests use Cloudflare's OpenAI-compatible endpoint, so new families work without a plugin update.
- Tool calling, JSON output with schema, system instructions, stop sequences and penalties through the standard AI Client API. Reasoning models keep their thinking on the AI Client's thought channel, out of the answer.
- Vision: Llama 3.2 11B Vision reads inline and remote images.
- Image generation: FLUX.1 schnell, SDXL Lightning, SDXL, DreamShaper, Leonardo Lucid Origin and Phoenix.
AI Gateway
Enter a gateway name and requests go through
Cloudflare AI Gateway for edge caching, rate limits, spend limits, logs and analytics. Each request is tagged with the site, feature, model and user, so the gateway's analytics answer "which feature is spending my neurons". If the gateway ever refuses a request, the plugin falls back to direct calls for an hour and tells you.
Editable prompts
Every prompt the plugin sends on its own behalf is on the Prompts tab, with placeholders, reset to default, and a test button that shows the result and its cost. Developers keep the
aipcf_prompt filter.
The AI plugin (recommended)
AIPCF is the engine. The
WordPress AI plugin adds the block-editor features that use it: excerpts, titles, meta descriptions, alt text on upload, summaries, image generation. It is recommended, not required; AIPCF's own features (backfill, translation, usage tracking, budget guard) work without it.
- Install and activate the plugin. You land on Cloudflare AI, a new item in the admin menu.
- Add your Cloudflare API token on Settings > Connectors (WordPress 7.0+ manages provider keys there) and your Account ID on the Overview tab. The setup panel has the exact clicks for creating the token.
- Click Apply recommended defaults. That picks the models, turns on the budget guard and caching, and approves the connector.
- Optional: install the WordPress AI plugin for AI in the block editor, and enter an AI Gateway name on the AI Gateway tab for edge caching and logs.
wp-config.php constants (optional)
define( 'CLOUDFLARE_WORKERS_AI_ACCOUNT_ID', 'your-account-id' );
define( 'CLOUDFLARE_WORKERS_AI_API_TOKEN', 'your-api-token' );
define( 'CLOUDFLARE_WORKERS_AI_DEFAULT_MODEL', '@cf/google/gemma-4-26b-a4b-it' );
define( 'CLOUDFLARE_AI_GATEWAY_TOKEN', 'gateway-auth-token' ); // only for authenticated gateways
Settings saved on the page take precedence over the constants. Environment variables with the same names are also read.
1.8.13
- Fixed: "Run one batch now" did nothing while the hourly backfill switch was off, and said nothing either. It now runs regardless and reports what it filled, skipped and what is left.
- Removed a leftover check that made the backfill depend on the Abilities API; it has used its own prompts since 1.7.
1.8.12
The first update since 1.0.3. If you are coming from 1.0.3, this is what changed:
- Your credentials and model choice are kept. The settings page has moved from Settings to its own "Cloudflare AI" menu; old links redirect. A setup panel offers the recommended defaults (Gemma 4 26B for writing, Granite 4 Micro for short tasks, a daily budget guard, caching); nothing is applied until you click.
- Requests use Cloudflare's OpenAI-compatible endpoint, so newer model families (Gemma 4, GPT-OSS, Qwen3, GLM, Granite) work, and the "Missing result.response" failures of 1.0.x are gone.
- The model list is read from your account with context, cost in neurons and capability labels, refreshed every 12 hours.
- New since 1.0.3: neuron usage tracking with a daily budget guard and e-mails; a receipt in the editor after every AI action and today's total in the admin bar; Cloudflare AI Gateway support with edge caching and analytics; light-model routing for short tasks; response caching; image generation; translation; hourly backfill for missing meta descriptions and image alt text; editable prompts; a monthly usage e-mail; a Site Health test; "Reset plugin".
- The settings screen was redesigned: sidebar navigation, section cards, switches, one line of help per field with a "Why?" link, advanced fields hidden until asked for.
- Fixed along the way: the configured default model was not first in the provider's list; text sent as content parts broke Llama; a 5-second request timeout; Meta licence gates were opaque; vision requests failed on the OpenAI-compatible endpoint; "Regenerate" returned the cached answer; edge cache hits were counted at full cost.
1.7.8
- New: Prompts tab. Every prompt the plugin sends on its own behalf is editable, with placeholders, reset and a test button.
- New: meta-description backfill no longer needs the WordPress AI plugin. The AI plugin is recommended with an install link, not required.
- New: Models tab shows how many models were read from the account and when, with a "Refresh now" link.
- Fixed: "Regenerate" in the editor returned the cached answer. A repeat of the same request within ten minutes now bypasses the local and gateway caches.
- Fixed: editor receipts were fetched after every abilities request instead of only after a run.
- Changed: the "Try it" hint names a feature that is actually on; usage labels read "Other (direct API calls)" and "Backfill: meta description".
- Code passes the WordPress security and i18n sniffs; 78 integration tests on the WordPress test framework.
1.6.0
- New: two-step setup after activation with one-click recommended defaults and a token walkthrough.
- New: neuron receipts in the block editor after every AI action, and today's total in the admin bar.
- New: monthly usage e-mail on the 1st.
- New: Site Health test.
1.5.0
- New: tabbed settings with an Overview (status cards, today's neurons, quick actions).
1.4.8
- New: image generation (FLUX.1 schnell, SDXL, DreamShaper, Leonardo) registered with the AI plugin's image features.
- New: translation via M2M100 and IndicTrans2,
aipcf_translate().
- New: hourly backfill for missing meta descriptions and image alt text, with its own daily budget, failed and decorative markers, and support for offloaded media read by URL.
- New: vision requests go through Cloudflare's native endpoint with a system message, which the OpenAI-compatible endpoint rejects for images.
- New: Meta licence gates are detected and explained with a re-check button.
- Fixed: responses served from the AI Gateway edge cache were counted at full cost; a model-level 403 no longer triggers the gateway bypass.
1.3.0
- New: light-model routing for short tasks (titles, excerpts, meta descriptions, moderation, alt text).
- New: local response cache for deterministic requests.
- New: "Never fall back to paid providers".
1.2.0
- New: Cloudflare AI Gateway support with edge cache TTL, request metadata, prompt-logging toggle, authenticated gateways, dynamic routes and automatic direct fallback.
- New: neuron usage tracking per day, feature and model, with a daily budget guard and 80%/100% e-mails.
1.1.2
- Changed: requests use Cloudflare's OpenAI-compatible endpoint, so new model families work without a plugin update.
- New: the model list is read live from the account, grouped by vendor, with context, cost and capability labels.
- Fixed: the configured default model was not the first in the provider's list; text content sent as parts broke Llama; a 5-second request timeout; model caches not cleared after upgrades.
1.0.0
- Cloudflare Workers AI registered as a provider for the WordPress AI Client.