gemini-imagegen

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the creation and modification of images using advanced AI, eliminating the need for complex design software or manual editing for many tasks.

Core Features & Use Cases

  • Text-to-Image Generation: Create original images from detailed text prompts.
  • Image Editing & Refinement: Modify existing images based on natural language instructions.
  • Multi-Turn Conversations: Iteratively refine images through a chat interface.
  • Composition: Combine multiple images into a single output.
  • Use Case: Generate a photorealistic image of a futuristic cityscape at sunset, then refine it by adding flying vehicles and adjusting the lighting to a dramatic, moody tone.

Quick Start

Use the gemini-imagegen skill to generate an image of a robot playing a guitar in a park.

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?

Text-to-image generation with the Gemini API requires setting the GEMINI_API_KEY environment variable. You can then create original images from detailed prompts using the google-genai and Pillow libraries for processing.

Can I edit an existing image with AI using natural language instructions?

Image editing with the Gemini API supports modifying existing images through natural language instructions. You can iteratively refine images in a multi-turn conversation, adjusting details like lighting or adding elements such as flying vehicles.

How do I combine multiple reference images into a single composition?

Image composition combines multiple reference images into a single output using the Gemini API. By providing several input images, the API processes and merges them according to your prompt to generate the final composite result.

Do I need a specific API key to use Gemini for AI image generation?

Yes, AI image generation with Gemini requires the GEMINI_API_KEY environment variable. You must configure this key in your environment alongside the google-genai and Pillow dependencies to authenticate and execute API requests.

What is the best way to iteratively refine AI-generated images?

Iteratively refining AI-generated images is best done through multi-turn conversations with the Gemini API. This allows you to provide sequential natural language instructions to adjust elements like tone, lighting, and composition step by step.

What are the limitations of using Gemini for text-to-image generation?

Text-to-image generation with Gemini relies on the google-genai and Pillow libraries, meaning outputs are constrained by API capabilities and local image processing limits. Complex edits may require multiple conversational turns to achieve the desired result.