gemini-image

Generate images from text prompts or reference images via the Gemini image generation API.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/chhpt/skills --skill gemini-image-chhpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-image
Source: https://github.com/chhpt/skills/tree/main/skills/gemini-image
Command: npx skills add https://github.com/chhpt/skills --skill gemini-image-chhpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It turns natural-language drawing requests into actual images by calling an image generation API, supporting both text-to-image and image-to-image workflows without manual API handling. ## Core Features & Use Cases - Text-to-Image Generation: Send a descriptive prompt to the API and receive a generated image URL. - Image-to-Image & Multi-Image Reference: Upload one or more reference images and combine them with a text prompt to guide style or content. - Use Case: A user says "draw a cute orange cat" or provides two reference photos and asks to blend their styles; the Skill constructs the prompt, calls the API, and returns the resulting image URL. ## Quick Start Ask the assistant to generate an image, for example: draw a cute orange cat in watercolor style.

Frequently Asked Questions about gemini-image

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

FAQPage Schema
How do I generate an image from a text prompt with an API?

Send a POST request to the image generations endpoint with your prompt, model name, and size in the JSON body, authenticated with a Bearer API key. The response contains the generated image URL at data[0].url.

How to do image-to-image generation with reference photos?

Upload your reference image first to obtain a URL, then prepend that URL to your text description in the prompt field. Multiple image URLs can be combined in one prompt to blend styles or content from several references.

Can I use multiple reference images in one generation request?

Yes, the prompt format supports multiple image URLs followed by a text description, such as two URLs plus an instruction to fuse the images. The API uses all provided references when generating the output.

Where does the API key for image generation come from?

The API key is read from the config/secrets.md configuration file and passed as a Bearer token in the Authorization header. Keep this file private since it contains sensitive credentials.

Why is my generated image URL not returned correctly?

The image URL is located at data[0].url in the API response JSON. If extraction fails, verify the request succeeded, the model name and size parameters are valid, and the response was not an error message.