gemini-image-simple
Generate and edit images with Gemini API using pure Python stdlib. Zero dependencies - works on locked-down environments where pip/uv aren't available.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cluka-399/gemini-image-simpleWhat This Skill Does
The gemini-image-simple skill allows users to generate and edit images using Google's advanced Gemini Pro Image (referred to as Nano Banana Pro) model. Its primary advantage is its complete lack of external dependencies, relying solely on Python's standard library. This makes it exceptionally versatile, enabling its use in restricted environments like Fly.io's free tier or locked-down containers where package managers such as pip or uv are unavailable. The skill offers full image generation capabilities and robust image editing features. The setup is straightforward: simply set the GEMINI_API_KEY environment variable. The skill leverages urllib.request, json, and base64 from the standard library to interact with the Gemini API, ensuring broad compatibility with any Python 3.10+ installation.
Installation
To install the gemini-image-simple skill, use the following command:
clawhub install openclaw/skills/skills/cluka-399/gemini-image-simple
Use Cases
This skill is ideal for:
- Developers in restricted environments: Deploying AI image generation on platforms that disallow external package installations.
- Rapid prototyping: Quickly generating or modifying images without the overhead of setting up complex development environments.
- Content creators: Generating unique visuals for social media, blogs, or presentations.
- Designers: Iterating on image concepts, applying different styles, or adding elements to existing graphics.
- Automated workflows: Integrating image generation into scripts where external dependencies are problematic.
Example Prompts
Generate a photorealistic image of a red panda wearing a monocle, sitting in a vintage armchair.Edit the attached image 'forest.jpg' to make it look like a Van Gogh painting.Create an image of a futuristic cityscape at night with neon lights, in a cyberpunk style.
Tips & Limitations
- API Key: Ensure the
GEMINI_API_KEYenvironment variable is correctly set. You can obtain an API key from Google AI Studio. - Model Choice: The skill defaults to
nano-banana-pro-preview(Gemini 3 Pro Image). The scriptgenerate.pycan be modified to use other available models like Imagen or Gemini 2.5 Flash if desired. - Input Formats: Supported input formats for image editing include PNG, JPG, JPEG, GIF, and WEBP.
- Python Version: Requires Python 3.10 or later due to potential underlying API requirements or standard library features.
- Error Handling: While robust, complex API errors might require consulting the Gemini API documentation. The standard library implementation might offer less detailed error feedback than libraries like
google-genai. - Rate Limits: Be mindful of Google's API rate limits for image generation and editing.
- Image Size/Complexity: Very high-resolution or extremely complex generation requests might take longer to process or encounter timeouts.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cluka-399-gemini-image-simple": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api