Linux 软件免费装
Banner图

AIPCF - AI Provider for Cloudflare

开发者 deshabhishek007
fitehal
更新时间 2026年9月14日 23:12
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

ai alt-text cloudflare image-generation meta-description

下载

1.8.12 1.8.13 1.0.0 1.0.1 1.0.2 1.0.3

详情介绍:

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 What you get What you need
  1. A Cloudflare account. No credit card is needed for the Workers AI daily allowance.
  2. An API token created from the "Workers AI" template at dash.cloudflare.com/profile/api-tokens.
  3. 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 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. 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.

安装:

  1. Install and activate the plugin. You land on Cloudflare AI, a new item in the admin menu.
  2. 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.
  3. Click Apply recommended defaults. That picks the models, turns on the budget guard and caching, and approves the connector.
  4. 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.

屏幕截图:

  • Setup panel after activation - connect, apply the recommended defaults, and the recommended AI plugin.
  • Models: default model with cost and capability labels, light model for short tasks, image model.
  • Budget & cache: the daily guard, what happens when it is reached, and caching.
  • A neuron receipt in the block editor after generating a meta description.
  • Backfill: backlog, progress and controls.
  • Prompts: every plugin prompt, editable, with a test button.
  • Site Health showing the Cloudflare Workers AI test.

升级注意事项:

1.8.12 Big update from 1.0.3: new "Cloudflare AI" menu (old links redirect), OpenAI-compatible endpoint for newer models, neuron budget guard, AI Gateway, backfill, image generation, translation. Credentials and model choice are kept; a setup panel offers the recommended defaults, nothing changes until you click.

常见问题:

Is it really free?

Cloudflare Workers AI includes 10,000 neurons a day on every account, with no card on file. Measured on a live site, a meta description costs about 2 neurons and an alt text about 17, so a normal site never gets near the limit. Above the allowance Cloudflare bills per neuron at its published rate; the plugin's budget guard is there so that does not happen by accident.

What happens when the daily budget is reached?

You choose: pause AI requests until midnight UTC, or switch every request to the cheapest model on your account. Either way you get an e-mail at 80% and at 100%. The count resets with Cloudflare's day.

Which model should I use?

Start with the recommended defaults: Gemma 4 26B for writing and Granite 4 Micro for short tasks. They were picked by measuring output quality against neurons on real posts. Llama 3.3 70B writes a little better and costs several times more per token. The Models tab shows the neurons per 1,000 tokens for every model on your account, read from Cloudflare's price list.

Do I need the WordPress AI plugin?

Not for AIPCF's own features (backfill, translation, usage tracking, budget guard). You need it for AI inside the block editor: excerpts, titles, meta descriptions, summaries, alt text on upload and image generation. Install it from wordpress.org; AIPCF registers itself as the provider.

Does it work with the Classic editor?

The backfill, translation and budget features do. The in-editor buttons come from the WordPress AI plugin and need the block editor.

Where does my content go?

To Cloudflare, and nowhere else. When a feature runs, the post title and content (or the image) go to Cloudflare Workers AI on your own account. Nothing is sent until you enter your credentials, and the External Services section below lists every endpoint. With an AI Gateway you decide in the Cloudflare dashboard whether prompts are logged.

Where is my API token stored?

On WordPress 7.0+ it lives in the core Connectors screen (Settings > Connectors), like every other AI provider key. You can also define it as a constant in wp-config.php. The plugin never sends it anywhere except Cloudflare.

Will the backfill overwrite descriptions or alt text I wrote?

No. It only fills empty fields. Posts that already have a meta description and images that already have alt text are never touched. It writes to the meta key of your SEO plugin (Yoast, Rank Math, AIOSEO or SEOPress), so you can edit the result where you always do.

Can I stop the backfill, or undo it?

Turn off "Hourly backfill" on the Backfill tab and it stops after the current batch. Descriptions it wrote are ordinary post meta; edit or clear them like any other. Items it skipped are listed on the tab with a retry link.

Does it slow my site down?

No. Requests only happen when a feature runs, and the backfill runs in the background through WP-Cron, one batch an hour. Visitors never wait on Cloudflare.

Can I use one Cloudflare account for several sites?

Yes, and many people do. Keep in mind the 10,000-neuron allowance is per Cloudflare account, not per site, so set each site's daily budget to a share of it. An AI Gateway shows the usage of all sites in one place.

Can I change what the plugin asks the model?

Yes. The Prompts tab holds every prompt the plugin sends on its own behalf, with placeholders and a test button. Developers can also use the aipcf_prompt filter.

A model says "Model Agreement: Prior to using this model, you must submit the prompt 'agree'"

Some Meta models (Llama 3.2 Vision) need a one-time licence acceptance per Cloudflare account. The plugin shows a notice with the steps and a re-check button. The Playground's chat box cannot send it; the notice includes the one-line request that does.

I get "connector has not been approved"

WordPress asks administrators to allow each AI connector once. "Apply recommended defaults" does it for you; otherwise go to Settings > Connectors and click Allow next to Cloudflare Workers AI.

Requests time out

The plugin waits up to 60 seconds. 70B-class and reasoning models can take longer on a cold start. Raise the limit with the aipcf_request_timeout filter or pick a smaller model.

Reasoning models return an empty answer

Qwen3, GLM and GPT-OSS spend tokens thinking before they answer. The plugin turns thinking off by default where the model allows it and applies a 2,048-token output limit when the caller sets none. If you still see empty answers, raise max_tokens or pick a non-reasoning model.

How do I start over, or remove everything?

"Reset plugin" at the foot of the About card clears the plugin's settings, usage history, caches and backfill progress, and keeps everything it generated. Deleting the plugin from the Plugins screen does the same cleanup.

Does this work without WordPress 7.0?

No. The AI Client arrives in WordPress 7.0; the plugin does nothing on older versions.

更新日志:

1.8.13 1.8.12 The first update since 1.0.3. If you are coming from 1.0.3, this is what changed: 1.7.8 1.6.0 1.5.0 1.4.8 1.3.0 1.2.0 1.1.2 1.0.0