gemini-imagegen

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

Updated Dec 21, 2023
One-click install
npx skills add https://github.com/Hff1230/FFNotes --skill gemini-imagegen-hff1230
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-imagegen
Source: https://github.com/Hff1230/FFNotes/tree/main/AI%E5%BA%93/Skill/compound-engineering-zh/skills/gemini-imagegen
Command: npx skills add https://github.com/Hff1230/FFNotes --skill gemini-imagegen-hff1230

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Gemini image generation and editing workflow using the Gemini API enables creating visuals from text prompts, editing existing images, applying styles, and composing multiple references without manual drawing.

Core Features & Use Cases

  • Generate images from text prompts using the Gemini Pro model and default image config.
  • Edit existing images with natural language instructions and adjustable aspect ratios and resolutions.
  • Compose and refine visuals from multiple references, including multi-turn refinements via chat, for design and creative workflows.

Quick Start

Run the generate_image.py script with a prompt and an output path to create an image from text.

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?

You can generate images from text prompts using the Gemini API by running the generate_image.py script with your desired prompt and an output path to create a single visual.

Can I edit existing images and adjust aspect ratios with the Gemini API?

You can edit existing images with the Gemini API by applying natural language instructions, utilizing image-config options to adjust aspect ratios and resolutions for your design workflow.

Does the Gemini API support multi-image composition for design workflows?

The Gemini API supports multi-image composition by combining and refining visuals from multiple references, enabling multi-turn refinements via chat for complex design and creative workflows.

Do I need a GEMINI_API_KEY to use the Gemini API for image generation?

You need a GEMINI_API_KEY and the google-genai dependency to authenticate and execute image generation, editing, and composition tasks within your Python environment.

What are the limitations of using the Gemini API for AI image editing?

Using the Gemini API for AI image editing is limited to text-based prompt instructions and requires Python dependencies like Pillow, meaning it cannot perform direct manual drawing or brush-based modifications.