gemini-imagegen

Generate and edit images via the Gemini API with text prompts.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/sammyjoyce/pi-compound-engineering --skill gemini-imagegen-sammyjoyce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-imagegen
Source: https://github.com/sammyjoyce/pi-compound-engineering/tree/main/skills/gemini-imagegen
Command: npx skills add https://github.com/sammyjoyce/pi-compound-engineering --skill gemini-imagegen-sammyjoyce

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the process of creating and modifying visual content, enabling users to generate unique images from text prompts and refine existing ones with ease.

Core Features & Use Cases

  • Text-to-Image Generation: Create images from detailed text descriptions.
  • Image Editing & Refinement: Modify existing images by applying changes based on conversational instructions.
  • Multi-Turn Iteration: Refine generated or edited images through a chat-like interface.
  • Use Case: Design a logo for a new startup by providing a text prompt, then iteratively refine its colors and style until satisfied.

Quick Start

Use the gemini-imagegen skill to generate an image of a futuristic city skyline at sunset.

Frequently Asked Questions about gemini-imagegen

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

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

Text-to-image generation with the Gemini API involves sending detailed text descriptions to the model, which then creates unique images. This Skill supports configurable resolutions and aspect ratios for visual content creation.

Can I edit and refine existing images through multi-turn conversations with Gemini?

Yes, image editing and multi-turn refinement are supported. You can modify existing images by applying conversational instructions, allowing iterative refinement of generated images through a chat-like interface.

Do I need an API key to generate and edit images with Gemini?

Yes, you need a GEMINI_API_KEY environment variable for authentication to generate and edit images. This environment variable connects your requests to the Gemini API for processing image generation tasks.

What's the best way to compose images from multiple reference images using AI art generation?

Composing images from multiple reference images is achieved by providing several inputs to the Gemini API. The model merges these references together, supporting advanced features like Google Search grounding for accurate visual content.

Does this image generation approach support configurable resolutions and aspect ratios?

Yes, image generation operates with configurable resolutions and aspect ratios. You can specify these dimensions when sending text prompts to the Gemini API to ensure the output matches your visual content requirements.

Why use prompt engineering for AI image generation instead of standard text-to-image tools?

Prompt engineering for AI image generation allows multi-turn iteration and conversational refinement, offering more control over the final output. Standard text-to-image tools often lack this iterative editing capability and multi-reference composition.