| 开发者 | deepakbhojwani |
|---|---|
| 更新时间 | 2026年8月1日 22:05 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0.2 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
cloudflare provider.
/wp-content/plugins/ai-provider-for-cloudflare/, or install through the WordPress plugins screen.account-id:api-token (for example cc3a43c9...:cfut_...). No file editing is needed.
wp-config.php: put the token in the key and the account ID in a constant (or set environment variables of the same names):Sign in at dash.cloudflare.com, 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.
Cloudflare's API URL includes your account ID (for example …/accounts/{account_id}/ai/…), 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 account-id:api-token in the API key field; alternatively set the CLOUDFLARE_ACCOUNT_ID constant and put just the token in the key. The account ID is not a secret, but it is required.
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.
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.
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.
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 — 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.
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.
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.