← 返回 Skills 市场
dr-xiaoming

Blueai Nano Banana

作者 Dr-xiaoming · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
56
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install blueai-nano-banana
功能描述
通过蓝标 BlueAI Relay 调用 Nano Banana / Gemini image preview 系列模型生成图片。一行命令:传入 prompt 和模型名,输出 PNG 到本地路径。适用场景:moodboard 出图、海报草图、社媒素材、demo 占位图、小红书/公众号配图、PPT 配图、产品视觉脑...
使用说明 (SKILL.md)

BlueAI Nano Banana - 部门统一生图入口

蓝标内部所有 prompt → 图片任务的标准入口,走 BlueAI LLM Relay,使用部门统一额度。

谁该用

  • 龙虾 / OpenClaw agent 需要在工作流里出图
  • 项目 demo 需要快速占位图
  • 内容策划脑暴 moodboard
  • 给设计师准备视觉参考底稿(不是终稿——终稿走专业出图工具)

凭证

~/.openclaw/.env

BLUEAI_RELAY_BASE=https://bmc-llm-relay.bluemediagroup.cn
BLUEAI_RELAY_KEY=sk-...

没有这两个 key 时:联系金明(@Dr-xiaoming)申领额度。不要自己改 token,不要把 token 写进代码或 commit。

用法

单图

set -a; source ~/.openclaw/.env; set +a
python3 ~/.openclaw/workspace/skills/blueai-nano-banana/scripts/gen-image.py \
  /tmp/out.png \
  gemini-3.1-flash-image-preview \
  "一只在赛博朋克城市天台上吃竹子的熊猫,霓虹灯反射在毛上,电影感打光"

输出:OK /tmp/out.png (1,234,567 bytes, model=gemini-3.1-flash-image-preview, usage=1234 tokens)

配合 blueai-media-storage 上云拿 URL

set -a; source ~/.openclaw/.env; set +a

# 1. 出图
python3 ~/.openclaw/workspace/skills/blueai-nano-banana/scripts/gen-image.py \
  /tmp/moodboard-01.png \
  gemini-3.1-flash-image-preview \
  "\x3Cprompt>"

# 2. 上云拿 URL
URL=$(python3 ~/.openclaw/workspace/skills/blueai-media-storage/scripts/upload.py \
  --target TOS --task-name moodboard /tmp/moodboard-01.png | jq -r '.url')

# 3. 项目代码里直接放 $URL
echo "$URL"

批量出图(shell 循环)

set -a; source ~/.openclaw/.env; set +a
for i in 1 2 3; do
  python3 ~/.openclaw/workspace/skills/blueai-nano-banana/scripts/gen-image.py \
    "/tmp/concept-${i}.png" \
    gemini-3.1-flash-image-preview \
    "concept ${i}: 极简主义产品摄影,白色背景,柔光"
done

支持的模型

模型名 用途 速度
gemini-3.1-flash-image-preview 默认推荐,质量/速度平衡
gemini-2.5-flash-image-preview 老版本,兼容性场景
nano-banana Google 官方 alias

模型名透传到 BlueAI Relay,新模型上线后无需改 skill 即可使用。

失败排查

现象 原因 处理
RuntimeError: BLUEAI_RELAY_KEY not set .env 没加载或没 key set -a; source ~/.openclaw/.env; set +a
HTTP 401 / 403 key 失效或过期 联系金明,不要自己换
HTTP 429 rate limit 等 60s 重试,或换模型
could not extract base64 模型返回了文字而非图片(prompt 触发安全策略) 改 prompt,去掉敏感词
超时 (180s) relay 慢 / 大模型排队 重试,或换 flash 模型

红线

  • 不要把 RELAY_KEY 写进代码 —— 永远从 .env
  • 不要在 commit / PR / 聊天回复里复述 key 原值
  • 不要用本 skill 出商业终稿 —— 用 Midjourney / DALL-E / 设计师手作
  • 不要批量大规模刷量 —— 部门统一额度,被薅干会影响所有人
  • 使用前先 clawhub update --all —— 同步最新版本

与其他 skill 的关系

  • blueai-media-storage —— 出图后上云的下一步,强配套
  • catl-harness-pr —— 出图给宁德项目用时,源文件可以走 PR 入档
  • canvas / meme-maker —— 这些是图片"加工",本 skill 是图片"生成"

CHANGELOG

v0.1.0 (2026-05-25)

  • 初始封装,从 ~/.openclaw/workspace/scripts/gen-image.py 提取
  • RELAY_KEY 从硬编码改为读 ~/.openclaw/.env 环境变量
  • 三种 base64 提取格式兼容:data URL / 裸 base64 / JSON 包裹
  • 默认 timeout 180s
安全使用建议
Install only if you intend to use BlueAI Relay and its shared quota for image generation. Use explicit invocations, avoid sensitive prompts unless that relay is approved for them, and keep the relay key in the documented environment file rather than code or chat.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is prompt-to-image generation through BlueAI Relay, and the script only sends the chosen prompt/model to the relay, decodes the returned base64 image, and writes it to the requested output path.
Instruction Scope
The skill documents relay use and shared quota, but its trigger phrases are broad enough that users could invoke it unintentionally from ordinary image-related requests.
Install Mechanism
The package contains a markdown skill file and one Python helper script; no installer hook, package dependency hook, autorun mechanism, or background process was found.
Credentials
Network access and BLUEAI_RELAY_KEY use are proportionate to relay-based image generation and are disclosed, but prompts and generated content are sent to an organizational service.
Persistence & Privilege
The script reads credentials from environment variables, writes only the caller-specified image file, and does not persist credentials, modify shell profiles, install services, or request elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install blueai-nano-banana
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /blueai-nano-banana 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: BlueAI Relay → Nano Banana / Gemini image preview 出图入口。从 ~/.openclaw/workspace/scripts/gen-image.py 提取,RELAY_KEY 改为读 ~/.openclaw/.env。
元数据
Slug blueai-nano-banana
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Blueai Nano Banana 是什么?

通过蓝标 BlueAI Relay 调用 Nano Banana / Gemini image preview 系列模型生成图片。一行命令:传入 prompt 和模型名,输出 PNG 到本地路径。适用场景:moodboard 出图、海报草图、社媒素材、demo 占位图、小红书/公众号配图、PPT 配图、产品视觉脑... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 56 次。

如何安装 Blueai Nano Banana?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install blueai-nano-banana」即可一键安装,无需额外配置。

Blueai Nano Banana 是免费的吗?

是的,Blueai Nano Banana 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Blueai Nano Banana 支持哪些平台?

Blueai Nano Banana 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Blueai Nano Banana?

由 Dr-xiaoming(@dr-xiaoming)开发并维护,当前版本 v0.1.0。

💬 留言讨论