gemini-image-simple

Generate and edit images via Gemini API using Python's standard library.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/bibo1243/claw_memory --skill gemini-image-simple
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-image-simple
Source: https://github.com/bibo1243/claw_memory/tree/main/gaa_all/.agent/skills/gemini-image-simple
Command: npx skills add https://github.com/bibo1243/claw_memory --skill gemini-image-simple

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill provides a no-dependency way to generate and edit images using Gemini API from Python's standard library, enabling image tasks in restricted environments.

Core Features & Use Cases

  • No external dependencies: uses only the Python standard library (urllib.request, json, base64).
  • Generate new images from prompts and edit existing images by passing an input image.
  • Suitable for environments without pip/uv, containers, and lightweight hosts.

Quick Start

Run the generate.py script with a prompt to produce an output image.

Frequently Asked Questions about gemini-image-simple

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

FAQPage Schema
How do I generate images with the Gemini API in Python without installing pip packages?

You can generate images using only Python's standard library modules like urllib.request and json, sending prompts directly to the Gemini API without needing pip or external dependencies.

Can I edit existing images using the Gemini API in a restricted container environment?

Yes, you can edit existing images by passing input image data as base64-encoded strings to the Gemini API, allowing image modification in containers or offline setups without external dependencies.

How do I make HTTP requests to the Gemini API using only the Python standard library?

The Python standard library provides urllib.request and json modules to construct HTTP requests and parse API responses, enabling direct interaction with the Gemini API without third-party HTTP clients.

What environment variables are required to authenticate image generation scripts using urllib?

Authentication requires setting the GEMINI_API_KEY environment variable, which the standard library script reads to authorize requests when generating or editing images via the Gemini API.

What is the best way to run AI image generation scripts on servers without package managers?

Using pure standard library Python scripts is the best approach for servers without pip or uv, as it relies solely on built-in modules to execute Gemini API image generation tasks.

Why does my no-dependency image editing script fail to send base64 data to the Gemini API?

Image editing scripts fail if the input image is not properly base64-encoded or if the GEMINI_API_KEY environment variable is missing, as both are required for standard library API requests.