[ 'flux-1-schnell' => 'FLUX.1 Schnell ⭐ (Fast, FREE tier - RECOMMENDED)', 'flux-2-dev' => 'FLUX.2 Dev (Multi-reference, Partner - experimental)', ], 'Stable Diffusion' => [ 'stable-diffusion-xl-lightning' => 'SDXL Lightning (Very fast, Beta)', 'stable-diffusion-xl-base-1.0' => 'SDXL Base 1.0 (Beta)', ], 'Other' => [ 'dreamshaper-8-lcm' => 'Dreamshaper 8 LCM (Photorealism)', ], ]; } /** * Get Cloudflare Workers AI provider info */ function botwriter_get_cloudflare_info() { return [ 'name' => 'Cloudflare AI', 'description' => __('Cloudflare Workers AI provides serverless AI inference with generous free tier. Uses FLUX.1 Schnell for high-quality images.', 'botwriter'), 'website' => 'https://www.cloudflare.com/developer-platform/workers-ai/', 'api_url' => 'https://dash.cloudflare.com/?to=/:account/ai/workers-ai', 'docs_url' => 'https://developers.cloudflare.com/workers-ai/models/', 'pricing_url' => 'https://developers.cloudflare.com/workers-ai/platform/pricing/', 'free_credits' => __('10,000 Neurons/day FREE (~230 images with FLUX.1 Schnell!)', 'botwriter'), 'pricing_summary' => [ 'FLUX.1 Schnell' => '~43 neurons (~$0.00047/image)', 'FLUX.2 Dev' => '~150 neurons (~$0.0017/image)', 'SDXL Lightning' => 'Beta pricing', ], 'features' => [ __('10,000 Neurons FREE daily!', 'botwriter'), __('FLUX.1 Schnell - 12B parameter model', 'botwriter'), __('No GPU management needed', 'botwriter'), __('Serverless & auto-scaling', 'botwriter'), __('Global edge network', 'botwriter'), __('Simple REST API', 'botwriter'), ], 'pros' => [ __('~230 FREE images/day', 'botwriter'), __('High quality FLUX model', 'botwriter'), __('Very cheap after free tier', 'botwriter'), __('Global Cloudflare network', 'botwriter'), ], 'cons' => [ __('No image size control', 'botwriter'), __('Limited to 8 steps max', 'botwriter'), __('Requires Cloudflare account', 'botwriter'), ], ]; } /** * Render Cloudflare Workers AI settings tab content */ function botwriter_render_cloudflare_settings($settings, $is_active) { $info = botwriter_get_cloudflare_info(); $models = botwriter_get_cloudflare_models(); ?>