← 返回
未分类 Key 中文

corespeed-nanobanana

Generate and edit images using Google Gemini models via Corespeed AI Gateway. Supports text-to-image generation, image editing, multi-image input, and text r...
通过 Corespeed AI 网关使用 Google Gemini 模型生成和编辑图像,支持文本生成图像、图像编辑、多图输入及文本输出等功能。
zypher-agent zypher-agent 来源
未分类 clawhub v0.0.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 437
下载
💾 6
安装
1
版本
#latest

概述

Corespeed NanoBanana — Gemini Image & Text Generation

Auth: Set CS_AI_GATEWAY_BASE_URL and CS_AI_GATEWAY_API_TOKEN environment variables.

Workflow

  1. Pick a model from the table below (default: gemini-2.5-flash-image for image generation)
  2. Run the script with your prompt

Usage

uv run {baseDir}/scripts/gemini.py --prompt "your prompt" -f output.ext [-i input.ext] [--model MODEL]
  • --prompt, -p — Text prompt (required)
  • --filename, -f — Output filename (required)
  • --input, -i — Input image file(s), repeat for multiple
  • --model, -m — Model name (default: gemini-2.5-flash-image)
  • --modalities — Response type: auto, image, text, image+text (default: auto)
  • --json — Output structured JSON (recommended for agent consumption)

Output format is determined by file extension: .png/.jpg → image generation, .txt/.md → text output.

Image Generation

# Text-to-image
uv run {baseDir}/scripts/gemini.py -p "a watercolor fox in autumn forest" -f fox.png

# Image editing
uv run {baseDir}/scripts/gemini.py -p "Remove background, add beach sunset" -f edited.png -i photo.jpg

# Multi-image compositing
uv run {baseDir}/scripts/gemini.py -p "Blend these two scenes together" -f blend.png -i scene1.png -i scene2.png

Image Analysis

# Describe an image
uv run {baseDir}/scripts/gemini.py -p "Describe this image" -f desc.txt -i photo.jpg --model gemini-2.5-flash

# Compare images
uv run {baseDir}/scripts/gemini.py -p "What are the differences?" -f diff.txt -i before.jpg -i after.jpg --model gemini-2.5-flash

Text Generation

# Use the most capable model for complex tasks
uv run {baseDir}/scripts/gemini.py -p "Write a haiku about coding" -f haiku.txt --model gemini-2.5-pro

Models

ModelTypeBest For
-----------------------
gemini-2.5-flash-imageImage + TextImage generation & editing (default)
gemini-2.5-flashTextFast analysis, vision, general tasks
gemini-2.5-proTextComplex reasoning, highest quality
gemini-2.5-flash-liteTextFastest, simple tasks

Notes

  • No manual Python setup required. The script uses PEP 723 inline metadata. uv run automatically creates an isolated virtual environment and installs the google-genai dependency on first run.
  • Image output is returned inline as base64 from the Gemini API — no separate download step.
  • Use timestamps in filenames: yyyy-mm-dd-hh-mm-ss-name.ext.
  • Script prints MEDIA: line for OpenClaw to auto-attach generated images.
  • Do not read generated media back; report the saved path only.
  • Only gemini-2.5-flash-image can generate images. Other models are text-only.
  • Use --json for structured output: {"ok": true, "files": [...], "text": "...", "model": "...", "tokens": {...}}

Support

Built by Corespeed. If you need help or run into issues:

版本历史

共 1 个版本

  • v0.0.2 当前
    2026-03-30 22:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 216 📥 46,618
office-efficiency

corespeed-slide

zypher-agent
使用 JSX/TSX 配合 Deno 生成专业的 PowerPoint (.pptx) 演示文稿,支持幻灯片、文本、形状、表格、图表(柱状图、折线图、饼图、环形图)、图片等元素。
★ 0 📥 607
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 329 📥 92,996