← 返回 Skills 市场
redfox-data

GPT-image2

作者 RedFox · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
32
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install image-gen-redfox
功能描述
GPT-image2 — 基于 gpt-image-2 模型,支持文生图与图生图,内置免费额度,开箱即用。
使用说明 (SKILL.md)

GPT-image2

调用 OpenAI 最新的 gpt-image-2 模型生成高质量图片。内置免费额度,粘贴提示词就能用。

Skill 特色

  • 内置公共 API Key,开箱即用,约 10000 次免费额度
  • 无需额外订阅或绑定信用卡
  • 支持命令行批量生成、参数化控制尺寸/格式/背景
  • 文生图 + 图生图双模式,--image 一个参数启用编辑模式
  • 用完额度后可前往 redfox.hk 注册获取免费 Token 继续使用

能力概述

  • 文生图:输入提示词,生成全新图片
  • 图生图:上传参考图 + 提示词,基于原图编辑生成
  • 模型:gpt-image-2(OpenAI 最新图像模型)
  • 输出格式:PNG、JPEG、WebP
  • 尺寸支持:仅支持测试验证过的分辨率(自定义分辨率可能导致生成过慢或失败)
    • 快速档:1024x1024(1:1)、1024x1536(2:3 竖版)、1536x1024(3:2 横版)、1792x1024(16:9 横版)、1024x1792(9:16 竖版,默认)
    • 高清档(画质更高,生成更慢):2048x2048、2048x1152、1152x2048
  • 批量生成:单次最多 10 张
  • 透明背景:支持 PNG/WebP 透明背景输出
  • 保真控制:图生图支持 high/low 保真度

使用方式

文生图 — 输入文字生成图片

# 基本生成
python3 "$SKILL_PATH/assets/imagegen.py" "一只橘色的猫咪坐在窗台上看着窗外的夕阳"

# 横版高清
python3 "$SKILL_PATH/assets/imagegen.py" "futuristic city skyline" --size 1792x1024

# 透明背景 logo
python3 "$SKILL_PATH/assets/imagegen.py" "minimalist cat logo, flat design" --bg transparent --format png

# 批量生成 4 张
python3 "$SKILL_PATH/assets/imagegen.py" "icon set, flat style" -n 4 --bg transparent

# WebP + 压缩
python3 "$SKILL_PATH/assets/imagegen.py" "product photo on white background" --format webp --compression 50

图生图 — 上传参考图编辑生成

# 基于参考图修改(自动上传图片 → 编辑生成)
python3 "$SKILL_PATH/assets/imagegen.py" "把猫咪改成白色,背景换成星空" --image ~/Pictures/cat.png

# 风格迁移,高保真
python3 "$SKILL_PATH/assets/imagegen.py" "改成赛博朋克风格" --image ref.jpg --fidelity high

# 低保真,大幅改动
python3 "$SKILL_PATH/assets/imagegen.py" "变成水彩画风格,加入樱花元素" --image photo.png --fidelity low

其他操作

# 仅提交任务(返回 taskId,不等待)
python3 "$SKILL_PATH/assets/imagegen.py" "complex scene" --no-download

# 查询已有任务结果
python3 "$SKILL_PATH/assets/imagegen.py" "" --task-id sfwmpic7xxxxxxxx

# 指定输出目录和文件名前缀
python3 "$SKILL_PATH/assets/imagegen.py" "illustration" -o ~/Pictures/AI --prefix artwork

参数说明

参数 说明 默认值
prompt 生成/编辑提示词(必填,最多 500 字) -
--image 参考图路径(启用图生图模式) -
--fidelity 图生图保真度:high / low -
--size 尺寸(仅支持白名单分辨率) 1024x1792
-n, --count 生成数量(1-10) 1
--quality 质量:low / medium / high / auto medium
--format 格式:png / jpeg / webp png
--bg 背景:transparent / opaque / auto auto
--compression 压缩比(0-100) 0
-o, --output-dir 输出目录 ~/Downloads/QoderImages
--prefix 文件名前缀 image
--no-download 仅提交不等待 -
--task-id 查询已有任务 -
--api-key 指定 API Key -

依赖安装

依赖 安装命令
requests pip3 install requests

首次使用

开箱即用 — 无需任何配置

脚本内置公共 API Key,提供约 10000 次免费额度。直接运行示例命令即可,零配置零成本。

python3 "$SKILL_PATH/assets/imagegen.py" "一只橘色的猫咪"

后续使用

公共 Key 额度用完后,前往 redfox.hk 注册账号获取自己的 API Token,三种配置方式任选其一:

配置方式 说明 命令
环境变量(推荐) 设置一次,全局生效 export REDFOX_API_KEY=ak_你的密钥
命令行参数 临时使用,单次生效 python3 "$SKILL_PATH/assets/imagegen.py" "prompt" --api-key ak_你的密钥
配置文件 持久化存储,跨会话保留 mkdir -p ~/.qoder/apis && echo '{"api_key":"ak_你的密钥"}' > ~/.qoder/apis/redfox.json

常见问题

Q:本 Skill 的特点是什么? A:命令行直接调用 gpt-image-2 模型,支持批量生成、参数化控制、图生图编辑,内置免费额度开箱即用。

Q:生成一张图片需要多久? A:通常 10-30 秒,复杂场景可能更久。脚本会自动轮询等待。

Q:图生图的保真度怎么选? A:--fidelity high 尽量保留原图细节(微调),--fidelity low 允许大幅改动(风格迁移)。不传则由模型自行判断。

Q:如何生成透明背景图? A:使用 --bg transparent,搭配 PNG 或 WebP 格式(JPEG 不支持透明)。

Q:额度用完了怎么办? A:前往 redfox.hk 注册获取自己的 API Token。

Q:支持哪些图片格式作为参考图? A:支持 PNG、JPEG、WebP 格式的本地图片文件。

Q:支持自定义分辨率吗? A:仅支持以下测试验证过的分辨率,其他分辨率可能导致生成过慢或失败:

  • 快速档:1024x1024、1024x1536、1536x1024、1792x1024、1024x1792(默认)
  • 高清档(画质更高,生成更慢):2048x2048、2048x1152、1152x2048

Q:提示词有长度限制吗? A:提示词最多支持 500 字,超过会被阻断并提示精简。

安全使用建议
Install only if you are comfortable sending prompts, API keys, and any reference images you choose to redfox.hk. Do not use confidential images or regulated data, and set a private output directory if generated files should not remain in Downloads/QoderImages. The built-in public API key is disclosed, but using your own revocable key is safer for account control.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The artifacts consistently describe text-to-image and image-to-image generation, and the Python script implements that purpose by submitting prompts, optionally uploading a user-specified reference image, polling for results, and downloading generated images.
Instruction Scope
The README uses broad natural-language examples, but the executable instructions are explicit CLI commands and there is no automatic background activation shown in the artifacts.
Install Mechanism
No installer, shell bootstrapper, or dependency mutation is present; the only stated dependency is the common Python requests package.
Credentials
The skill sends prompts and optional reference images to redfox.hk and writes images under a default Downloads/QoderImages directory; this is proportionate for image generation but users should avoid sensitive inputs.
Persistence & Privilege
It can read an API key from REDFOX_API_KEY or ~/.qoder/apis/redfox.json and recommends an optional persistent config file, but it does not create persistence automatically or request elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-gen-redfox
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-gen-redfox 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of image-gen-redfox using the GPT-image2 model. - Supports both text-to-image and image-to-image generation via command line. - Built-in free quota with public API key, no setup required. - Allows parameter control: resolution, output format, background transparency, batch generation, quality, and more. - Provides easy API key setup for continued use after free quota is spent. - Detailed usage instructions and troubleshooting tips included.
元数据
Slug image-gen-redfox
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

GPT-image2 是什么?

GPT-image2 — 基于 gpt-image-2 模型,支持文生图与图生图,内置免费额度,开箱即用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 32 次。

如何安装 GPT-image2?

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

GPT-image2 是免费的吗?

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

GPT-image2 支持哪些平台?

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

谁开发了 GPT-image2?

由 RedFox(@redfox-data)开发并维护,当前版本 v1.0.0。

💬 留言讨论