返回顶部
r

recraftRecraft图像处理

Generate, vectorize, upscale, replace background, variate, remove background, and transform images via Recraft API.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,220
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

recraft

Recraft

使用捆绑脚本通过 Recraft API 生成、矢量化、放大、替换背景、变换、移除背景以及转换图像。

设置

  1. 1. 要获取您的 API 密钥,请登录 Recraft 并访问页面:https://www.recraft.ai/profile/api
  2. 点击“生成新密钥”按钮生成令牌(仅当您的 API 单位余额大于零时可用)
  3. 设置环境变量:
bash export RECRAFTAPITOKEN=your-api-token

命令

生成图像

bash
uv run {baseDir}/scripts/recraft.py generate --prompt 您的图像描述 --style Recraft V3 Raw --filename output.png --size 16:9

图像到图像

bash
uv run {baseDir}/scripts/recraft.py image-to-image --prompt 您的图像描述 --style Recraft V3 Raw --input /path/to/input.png --filename output.png --strength 0.5

替换背景

bash
uv run {baseDir}/scripts/recraft.py replace-background --prompt 您的背景描述 --style Recraft V3 Raw --input /path/to/input.png --filename output.png

矢量化图像

bash
uv run {baseDir}/scripts/recraft.py vectorize --input /path/to/input.png --filename output.svg

移除背景

bash
uv run {baseDir}/scripts/recraft.py remove-background --input /path/to/input.png --filename output.png

清晰放大

bash
uv run {baseDir}/scripts/recraft.py crisp-upscale --input /path/to/input.png --filename output.png

创意放大

bash
uv run {baseDir}/scripts/recraft.py creative-upscale --input /path/to/input.png --filename output.png

变换图像

bash
uv run {baseDir}/scripts/recraft.py variate --input /path/to/input.png --filename output.png --size 16:9

获取用户信息

bash
uv run {baseDir}/scripts/recraft.py user-info

参数

  • - --prompt, -p:图像生成或编辑的文本描述,最多 1000 个字符
  • --input, -i:输入图像路径(用于编辑/转换命令)
  • --filename, -f:输出文件名
  • --style, -s:视觉风格(默认:Recraft V3 Raw)
- Recraft V3 Raw、Photorealism、Illustration、Vector art、Icon
  • - --size:输出尺寸(宽高比)(默认:1:1)
- 1:1、2:1、1:2、3:2、2:3、4:3、3:4、5:4、4:5、6:10、14:10、10:14、16:9、9:16
  • - --strength:图像到图像的变换强度(0.0-1.0,默认:0.5),0 表示几乎相同,1 表示最小相似度

API 密钥

  • - RECRAFTAPITOKEN 环境变量
  • 或在 ~/.openclaw/openclaw.json 中设置 skills.recraft.apiKey / skills.recraft.env.RECRAFTAPITOKEN

注意事项

  • - 在文件名中使用时间戳:yyyy-mm-dd-hh-mm-ss-name.png。
  • 脚本会打印 MEDIA: 行,供 OpenClaw 在支持的聊天提供商上自动附加。
  • 不要回读图像;仅报告保存路径。
  • 矢量艺术和图标样式输出 SVG 格式。
  • 速率限制:每分钟 100 个请求;每秒 5 个请求。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 recraft-ai-1776359968 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 recraft-ai-1776359968 技能

通过命令行安装

skillhub install recraft-ai-1776359968

下载

⬇ 下载 recraft v1.0.0(免费)

文件大小: 4.84 KB | 发布时间: 2026-4-17 14:19

v1.0.0 最新 2026-4-17 14:19
Initial release of the recraft skill.

- Generate, vectorize, upscale, variate, replace/remove backgrounds, and transform images via the Recraft API.
- Offers multiple visual styles including photorealism, illustration, vector art, and icon.
- Supports custom prompt, input/output file paths, style, size, and transformation strength.
- Includes commands for image generation, editing, background operations, upscaling, and user info retrieval.
- Requires RECRAFT_API_TOKEN for authentication; setup instructions and rate limits documented.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部