image-generation

Generate images from JSON prompts and reference images via the Gemini API.

135|12|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Citrus-bit/medrix-flow --skill image-generation-citrus-bit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-generation
Source: https://github.com/Citrus-bit/medrix-flow/tree/main/skills/public/image-generation
Command: npx skills add https://github.com/Citrus-bit/medrix-flow --skill image-generation-citrus-bit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, Pillow, and includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the creation of high-quality images from structured JSON prompts and optional reference images, removing the complexity of crafting reproducible prompts and invoking image generation APIs.

Core Features & Use Cases

  • Structured Prompting: Produce JSON-formatted prompts that capture subject, style, composition, lighting, and technical specs for reliable generation.
  • Reference-guided Generation: Support multiple reference images to guide facial features, style, or product details with validation of input images.
  • Automated Execution: Run an included Python script to call the Gemini image generation API and save outputs to the workspace; useful for character design, scene composition, product visualization, and comic panel generation.

Quick Start

Create a JSON prompt in /mnt/user-data/workspace describing the desired image, then run the provided generate.py script with that prompt, any reference images, and an output path to produce the final image.

Frequently Asked Questions about image-generation

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

FAQPage Schema
How do I generate images using a structured JSON prompt and reference images?

To generate images from a structured JSON prompt, create a JSON file describing the subject, style, and composition, then run the included Python script with optional reference images to call the Gemini API and save outputs.

What is reference-guided image generation and how does it work with Python?

Reference-guided image generation uses input images to direct facial features, style, or product details. The Python workflow validates these reference images and incorporates them into the structured prompt for the Gemini API call.

Do I need a Gemini API key to run the automated image generation script?

Yes, you need a GEMINI_API_KEY available to the generate.py script. The script uses this key to authenticate and call the Gemini image generation API, producing the final high-quality image outputs.

Can I use this Python workflow for character design and product visualization?

Yes, this Python workflow is applicable to character design, scene composition, product visualization, and comic panel generation. It handles controlled prompts and reference-guided outputs to produce reliable visual results.

Does the image generation script validate input reference images before processing?

Yes, the workflow includes image validation for input reference images. The Python script validates the provided reference images before executing the Gemini API call to ensure reliable generation outputs.

What are the limitations of using structured JSON prompts for image generation?

Using structured JSON prompts requires strict formatting to capture subject, style, lighting, and technical specs. The workflow depends on external dependencies like the requests and Pillow libraries to process images and execute the API call.