gemini-imagegen

Generate and edit images via the Gemini API with multi-turn refinement.

Updated Jun 28, 2022
One-click install
npx skills add https://github.com/pcasaretto/nix-home --skill gemini-imagegen-pcasaretto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-imagegen
Source: https://github.com/pcasaretto/nix-home/tree/main/home-manager/modules/common/pi/compound-engineering/skills/gemini-imagegen
Command: npx skills add https://github.com/pcasaretto/nix-home --skill gemini-imagegen-pcasaretto

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, transforming text prompts into visual assets and refining existing images based on user instructions.

Core Features & Use Cases

  • Text-to-Image Generation: Create original images from detailed text descriptions.
  • Image Editing & Manipulation: Modify existing images by adding elements, changing styles, or altering content.
  • Multi-Turn Refinement: Iteratively improve generated or edited images through conversational prompts.
  • Use Case: A marketing team needs a series of social media graphics. They can use this Skill to generate initial concepts from prompts, then refine them by requesting specific color changes or adding text overlays.

Quick Start

Use the gemini-imagegen skill to generate an image of a futuristic cityscape 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 images from text prompts using the Gemini API?

Text-to-image generation with the Gemini API is achieved by submitting detailed text descriptions to the model, which outputs original visual assets. You can create photorealistic scenes, stylized art, and product mockups directly from your text prompts.

Can I edit existing images and add text overlays using the Gemini API?

Yes, image editing with the Gemini API supports modifying existing images by adding elements, changing styles, or altering content. It specifically handles tasks like adding text overlays and manipulating existing visual assets based on user instructions.

What environment variables and dependencies are required for Gemini text-to-image generation?

Gemini text-to-image generation requires the GEMINI_API_KEY environment variable for authentication. The process also depends on the google-genai library for API interaction and the Pillow library for image processing.

How do I iteratively refine AI art through multi-turn conversations?

Multi-turn refinement of AI art is done by submitting conversational prompts to iteratively improve generated or edited images. You can request specific color changes or add elements across multiple interactions to achieve the desired visual result.

Does the Gemini API support composing images from multiple reference images?

Yes, the Gemini API supports composition from multiple reference images. This allows you to combine and manipulate multiple existing images simultaneously to create a single, cohesive visual asset.

What are the limitations of using Gemini models for image generation?

Image generation with Gemini utilizes specific preview models like gemini-3-pro-image-preview, meaning capabilities may evolve and require specific API access. It is designed for tasks like photorealistic scenes and stylized art but depends on precise prompt engineering for optimal results.