Generate and edit images with Gemini API using the OpenAI Python SDK.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install gemini-image-proxy或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install gemini-image-proxy⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/gemini-image-proxy/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: gemini-image-proxy version: 1.0.0 description: Generate and edit images with Gemini API using the OpenAI Python SDK. metadata: openclaw: emoji: "🎨" requires: env: ["GOOGLE_PROXY_API_KEY", "GOOGLE_PROXY_BASE_URL"] ---
Generate and edit images using Gemini 3 Pro Image via the OpenAI Python SDK and an OpenAI-compatible API endpoint.
| Feature | This Skill | Others (nano-banana-pro, etc.) | | ------------------------ | ------------------------- | ------------------------------ | | Dependencies | openai (SDK) | google-genai, pillow, etc. | | Requires pip/uv | ✅ Yes | ✅ Yes | | Works on Fly.io free | ✅ Yes (with pip) | ❌ Fails | | Works in containers | ✅ Yes (with pip) | ❌ Often fails | | Image generation | ✅ Full | ✅ Full | | Image editing | ✅ Yes | ✅ Yes | | Setup complexity | Install SDK + set API key | Install packages first |
Bottom line: This skill uses the OpenAI SDK, so you must install openai once with pip.
python3 -m pip install openai
# Set env
export GOOGLE_PROXY_API_KEY="your_api_key"
export GOOGLE_PROXY_BASE_URL="https://example.com/v1"
# Generate
python3 /data/clawd/skills/gemini-image-simple/scripts/generate.py "A cat wearing a tiny hat" cat.png
# Edit existing image
python3 /data/clawd/skills/gemini-image-simple/scripts/generate.py "Make it sunset lighting" edited.png --input original.png
python3 {baseDir}/scripts/generate.py "your prompt" output.png
python3 {baseDir}/scripts/generate.py "edit instructions" output.png --input source.png
Supported input formats: PNG, JPG, JPEG, GIF, WEBP
Set these environment variables:
GOOGLE_PROXY_API_KEY (your API key)GOOGLE_PROXY_BASE_URL (OpenAI-compatible base URL, e.g. https://example.com/v1)Uses Gemini 3 Pro Image (gemini-3-pro-image) via the OpenAI Python SDK:
client.images.generate(...) for new imagesclient.images.edits(...) for editsopenai packageThat's it. Works on any Python 3.10+ installation with openai installed.
Currently using: gemini-3-pro-image
Other available models (can be changed in generate.py if needed):
gemini-3-pro-image-preview - Preview variantimagen-4.0-ultra-generate-001 - Imagen 4.0 Ultraimagen-4.0-generate-001 - Imagen 4.0gemini-2.5-flash-image - Gemini 2.5 Flash with image gen# Landscape
python3 {baseDir}/scripts/generate.py "Misty mountains at sunrise, photorealistic" mountains.png
# Product shot
python3 {baseDir}/scripts/generate.py "Minimalist product photo of a coffee cup, white background" coffee.png
# Edit: change style
python3 {baseDir}/scripts/generate.py "Convert to watercolor painting style" watercolor.png --input photo.jpg
# Edit: add element
python3 {baseDir}/scripts/generate.py "Add a rainbow in the sky" rainbow.png --input landscape.png安装 Gemini Image Proxy 后,可以对 AI 说这些话来触发它
Help me get started with Gemini Image Proxy
Explains what Gemini Image Proxy does, walks through the setup, and runs a quick demo based on your current project
Use Gemini Image Proxy to generate and edit images with Gemini API using the OpenAI Python SDK
Invokes Gemini Image Proxy with the right parameters and returns the result directly in the conversation
What can I do with Gemini Image Proxy in my design & creative workflow?
Lists the top use cases for Gemini Image Proxy, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/gemini-image-proxy/ 目录(个人级,所有项目可用),或 .claude/skills/gemini-image-proxy/(项目级)。重启 AI 客户端后,用 /gemini-image-proxy 主动调用,或让 AI 根据上下文自动发现并使用。
Gemini Image Proxy 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Gemini Image Proxy 可免费安装使用。请查阅仓库了解许可证信息。
Generate and edit images with Gemini API using the OpenAI Python SDK.
Gemini Image Proxy 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using Gemini Image Proxy
Identifies repetitive steps in your workflow and sets up Gemini Image Proxy to handle them automatically