$name) { $flat[$id] = $name; } } if (!empty($flat)) { return $flat; } } } return [ 'gemini-3.1-flash-lite-image' => 'Gemini 3.1 Flash Lite Image (fastest, lowest cost)', 'gemini-3.1-flash-image' => 'Gemini 3.1 Flash Image (balanced, recommended)', 'gemini-3-pro-image' => 'Gemini 3 Pro Image (advanced, 4K)', 'gemini-2.5-flash-image' => 'Gemini 2.5 Flash Image (legacy)', ]; } /** * Get Gemini image provider info */ function botwriter_get_gemini_image_info() { return [ 'name' => 'Google Gemini', 'description' => __('Google\'s AI image generation using Gemini models. Excellent quality and fast generation.', 'botwriter'), 'website' => 'https://ai.google.dev', 'api_url' => 'https://aistudio.google.com/apikey', 'docs_url' => 'https://ai.google.dev/gemini-api/docs/image-generation', 'pricing_url' => 'https://ai.google.dev/gemini-api/docs/pricing', 'free_credits' => __('Uses same API key as Gemini text models', 'botwriter'), 'pricing_summary' => [ 'Gemini 3.1 Flash Lite Image' => __('See pricing page', 'botwriter'), 'Gemini 3.1 Flash Image' => __('See pricing page', 'botwriter'), 'Gemini 3 Pro Image' => __('See pricing page', 'botwriter'), 'Gemini 2.5 Flash Image (legacy)' => __('See pricing page', 'botwriter'), ], 'features' => [ __('Uses the same API key as Google Gemini text models', 'botwriter'), __('High-quality image generation', 'botwriter'), __('Excellent text rendering in images', 'botwriter'), __('Multiple aspect ratios supported', 'botwriter'), __('Supports Nano Banana 2 / 2 Lite / Pro families', 'botwriter'), ], 'pros' => [ __('Same API key as text models', 'botwriter'), __('Great prompt understanding', 'botwriter'), __('Fast generation speed', 'botwriter'), __('High quality outputs', 'botwriter'), ], 'cons' => [ __('Some content restrictions', 'botwriter'), __('Requires Google API billing', 'botwriter'), ], ]; } /** * Render Gemini image settings tab content */ function botwriter_render_gemini_settings($settings, $is_active) { $info = botwriter_get_gemini_image_info(); $models = botwriter_get_gemini_image_models(); $current_model = $settings['botwriter_gemini_image_model'] ?? 'gemini-3.1-flash-lite-image'; $google_api_key = $settings['botwriter_google_api_key'] ?? ''; $has_key = !empty($google_api_key); ?>

$price): ?>