gemini-imagegen

Generate and edit images from text prompts using the Gemini AI API.

1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/weorbitant/compound-engineering-feat-python-plugin --skill gemini-imagegen-weorbitant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-imagegen
Source: https://github.com/weorbitant/compound-engineering-feat-python-plugin/tree/main/skills/gemini-imagegen
Command: npx skills add https://github.com/weorbitant/compound-engineering-feat-python-plugin --skill gemini-imagegen-weorbitant

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-genai, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Generate and edit images using Gemini AI to turn prompts into visuals with controlled outputs. The tool supports text-to-image generation, image editing, multi-turn refinement, and composition from multiple reference images.

Core Features & Use Cases

  • Text-to-image generation: Create visuals from prompts with configurable aspect ratios and resolutions.
  • Image editing & refinement: Modify existing images via natural language instructions.
  • Multi-reference composition: Combine multiple references into a single new image.
  • Use Case: Create marketing mockups or concept art by iterating prompts and edits rapidly.

Quick Start

Provide a text prompt and optional reference images to generate an image with Gemini.

Frequently Asked Questions about gemini-imagegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images from text prompts using the Gemini API?

To generate images from text prompts using the Gemini API, you provide a descriptive text prompt to the Python script, which then calls the Gemini AI to transform your textual input into a visual output. You can configure the aspect ratio and image size for the generated result.

Can I edit existing images and refine them over multiple turns with Gemini?

Yes, you can edit existing images and perform multi-turn refinement by providing natural language instructions alongside your reference images. The Gemini API processes these instructions to modify the visual output iteratively within your design or marketing workflow.

How does multi-reference composition work for AI image generation?

Multi-reference composition works by combining multiple reference images into a single new visual using the Gemini API. You provide several source images, and the Python script processes them together to create a unified composition based on your text prompt.

Do I need a GEMINI_API_KEY to use Python scripts for AI image generation?

Yes, a valid GEMINI_API_KEY is required for authentication when running these Python scripts for AI image generation. The script enforces this API key check before communicating with the google-genai client to output text and image modalities.

What Python dependencies are required to run multi-reference image editing scripts?

You need the google-genai library and the Pillow package installed in your Python environment to run these multi-reference image editing scripts. These dependencies handle the API communication and the processing of the generated image outputs.

Are there limitations when using the Gemini API for text-to-image generation?

Text-to-image generation with the Gemini API requires Python dependencies like google-genai and Pillow, and relies on a valid GEMINI_API_KEY for authentication. Outputs are constrained by the configurable aspect ratios and image sizes supported by the API.