generate-image

Generate images from text prompts using the Gemini API.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/tegnike/ai-agent-game-streamer --skill generate-image-tegnike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-image
Source: https://github.com/tegnike/ai-agent-game-streamer/tree/main/.agents/skills/generate-image
Command: npx skills add https://github.com/tegnike/ai-agent-game-streamer --skill generate-image-tegnike

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables generating high-quality images from text prompts by calling the Gemini API, allowing creators to rapidly visualize ideas without requiring local image generation tools.

Core Features & Use Cases

  • Generate images from natural language prompts using Gemini's gemini-3-pro-image-preview model.
  • Fine-grained controls: aspectRatio and imageSize to fit various layouts.
  • Use Case: Create concept art, social media visuals, thumbnails, or marketing assets with a single prompt.

Quick Start

Run a basic image generation example. Replace YOUR_PROMPT_HERE and set GEMINI_API_KEY to authorize the request.

For Quick Start, you can try: curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent"
-H "x-goog-api-key: $GEMINI_API_KEY"
-H "Content-Type: application/json"
-d '{"contents": [{"parts": [{"text": "YOUR_PROMPT_HERE"}]}], "generationConfig": {"responseModalities": ["IMAGE"]}}' | jq -r '.candidates[0].content.parts[0].inlineData.data' | base64 -d > output.png

Frequently Asked Questions about generate-image

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?

To generate images from text prompts using the Gemini API, you send a POST request to the generativelanguage endpoint with your text prompt and GEMINI_API_KEY, specifying IMAGE in the responseModalities to receive base64-encoded image data.

Can I use the Gemini API for AI art generation without local image tools?

Yes, you can use the Gemini API for AI art generation without local tools by calling the gemini-3-pro-image-preview model remotely, allowing you to rapidly visualize ideas and create concept art directly through API requests.

Does the Gemini API image generation support aspect ratio and image size controls?

The Gemini API image generation supports aspectRatio and imageSize options within the generationConfig, enabling you to fine-tune the output dimensions to fit various layouts for social media visuals or marketing assets.

What is the best way to automate image generation via curl for rapid visual prototyping?

The best way to automate image generation via curl for rapid visual prototyping is to execute a POST request with your prompt and GEMINI_API_KEY, then pipe the JSON response through jq to extract and decode the base64 image data into a PNG file.

Do I need an API key to generate content with the gemini-3-pro-image-preview model?

Yes, you need an API key to generate content with the gemini-3-pro-image-preview model, which must be provided via the GEMINI_API_KEY environment variable or passed directly in the x-goog-api-key header for authorization.