45Squared AI Powered Image Generator

Description

45Squared AI Powered Image Generator brings Google’s powerful AI image generation to WordPress. Create stunning images from text descriptions, edit existing images with natural language instructions, and insert them directly into your posts — all without leaving the WordPress admin.

Features:

  • Text-to-Image Generation — Describe what you want and get AI-generated images in seconds
  • Image Editing — Edit existing images with natural language (“remove the background”, “make it a watercolor painting”)
  • Gutenberg Block — Generate and insert images directly in the block editor
  • Media Library Integration — All generated images are saved with full metadata
  • Multiple Models — Choose between Nano Banana (fast), Nano Banana Pro (high quality), or Nano Banana 2 (balanced)
  • Flexible Aspect Ratios — 1:1, 16:9, 9:16, 4:3, and 3:2
  • Generation History — Track all your generations with prompts, timestamps, and models used
  • Secure — API key is encrypted at rest and never exposed in page source

External services

This plugin connects to the Google Gemini API (generativelanguage.googleapis.com) to generate and edit images using AI.

What data is sent and when

  • When a user generates an image: the text prompt, selected model, aspect ratio, and image size are sent to the API.
  • When a user edits an existing image: the text prompt and the source image binary data are sent to the API.
  • When a user tests the API connection from the settings page: a minimal request is sent to verify the API key is valid.

No data is sent automatically. All requests are initiated explicitly by a logged-in WordPress administrator or editor.

Service provider

This service is provided by Google LLC.

Blocks

This plugin provides 1 block.

  • 45Squared AI Powered Image Generator Generate AI images using Google's Gemini directly in the editor.

Installation

  1. Upload the 45squared-ai-powered-image-generator folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Go to Settings > Nano Banana to configure your API key

Getting Your Google AI API Key:

  1. Go to Google AI Studio and sign in with your Google account
  2. In the top navigation, hover over “Solutions” and choose “Gemini API”
  3. Accept the Terms of Service when prompted
  4. In the left sidebar, navigate to “API Keys”
  5. Click “Create API Key” or view an existing key — accept the terms and conditions, and a key will be created by default
  6. Copy your API key
  7. Paste it in Settings > Nano Banana and click Save Changes
  8. Click Test Connection to verify

Enable Billing (Required):

Image generation requires billing to be enabled on your Google Cloud project. Without billing, API requests will be rejected with a quota error.

  1. Go to the Google Cloud Console Billing page
  2. Create a billing account if you don’t have one, or select an existing one
  3. Link the billing account to the Google Cloud project associated with your API key

FAQ

What is Nano Banana?

Nano Banana is Google’s AI image generation technology built on the Gemini model family. It can create and edit images from text descriptions.

How much does it cost?

The plugin is free. API usage is billed by Google. Approximate costs per image (as of March 2026):

  • Nano Banana: ~$0.02/image
  • Nano Banana Pro: ~$0.08/image
  • Nano Banana 2: ~$0.045/image

Check Google AI pricing for current rates.

Which model should I choose?

  • Nano Banana — Best for speed and high-volume generation
  • Nano Banana Pro — Best for professional, high-fidelity images
  • Nano Banana 2 — Best balance of quality and speed (recommended)

What PHP extensions are required?

  • openssl — for API key encryption
  • curl — for API requests
  • json — for response parsing

Most hosting providers include these by default.

Is my API key secure?

Yes. Your API key is encrypted using AES-256-CBC before being stored in the database. It is never output in page HTML or REST API responses.

Can I use this with the block editor?

Yes! Search for “Nano Banana” in the block inserter. The block lets you generate an image from a prompt and inserts it as a standard Image block.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“45Squared AI Powered Image Generator” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.1

  • Fix: API key now works immediately after first save (resolved double-encryption issue)

1.0.0

  • Initial release
  • Text-to-image generation via admin page
  • Image-to-image editing from Media Library
  • Gutenberg block for in-editor generation
  • Support for Nano Banana, Nano Banana Pro, and Nano Banana 2 models
  • Encrypted API key storage
  • Generation history tracking