gemini-api

Generate and edit images via the Google Gemini Image API.

7|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/MadAppGang/magus --skill gemini-api-madappgang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-api
Source: https://github.com/MadAppGang/magus/tree/main/plugins/nanobanana/skills/gemini-api
Command: npx skills add https://github.com/MadAppGang/magus --skill gemini-api-madappgang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive reference for using the Google Gemini Image API, enabling users to generate, edit, and manipulate images programmatically.

Core Features & Use Cases

  • Text-to-Image Generation: Create images from textual descriptions.
  • Image Editing: Modify existing images based on prompts.
  • Style and Aspect Ratio Control: Customize image output with various styles and aspect ratios.
  • Error Handling and Retries: Robust mechanisms for managing API errors and network issues.
  • Use Case: Developers can integrate this API into applications to allow users to generate custom avatars, product mockups, or artistic images based on text input.

Quick Start

Use the gemini-api skill to generate an image named 'output.png' with the prompt 'A minimal 3D cube'.

Frequently Asked Questions about gemini-api

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

FAQPage Schema
How do I generate images from text using the Google Gemini API?

Text-to-image generation with the Google Gemini API uses models like gemini-3-pro-image-preview or gemini-2.5-flash-image. You provide a textual prompt to programmatically create custom images such as avatars or product mockups.

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

The Gemini Image API supports modifying existing images based on prompts and allows style and aspect ratio control. You can customize image output using specific command-line interface flags for your desired dimensions.

Does the Gemini Image API support using reference images for generation?

Yes, the Gemini Image API explicitly supports reference images. This allows you to guide the image generation or editing process by providing existing images alongside your textual prompts.

How does the Gemini API handle transient network errors during image generation?

The Gemini API manages transient failures with automatic retry behavior using exponential backoff. A comprehensive list of error codes is provided to help developers handle network issues and API failures robustly.

What is the best way to customize command-line flags for Gemini image generation?

To customize Gemini image generation, use command-line interface flags to specify output details like file names and aspect ratios. This allows precise control over text-to-image generation and image editing tasks.