WeryAI Image Toolkits
WeryAI image tools, image editing, image post-processing, background remove, background change, face swap, reframe, repair, text erase, translate, upscale, image-to-prompt.
WeryAI image tools for image editing and image post-processing on existing images.
Use this skill for official WeryAI image editing, image post-processing, and WeryAI image tools on an existing image source. Use when you need WeryAI image tools for image-to-prompt, background change, background remove, canvas expand, face swap, reframe, repair, text erase, image translate, image upscale, or prompt extraction. This skill is intentionally strict about secret declaration and input safety: the only runtime secret is WERYAI_API_KEY, and media inputs support http/https URLs plus local/file sources that are uploaded first.
This is not an image generation skill. Use it when the user wants to analyze, clean up, repair, translate, reframe, expand, upscale, or otherwise transform an existing image with WeryAI rather than generate a brand-new image from a prompt.
Dependencies: scripts/image_toolkits.js in this directory, WERYAI_API_KEY, and Node.js 18+. No other skills are required.
Example Prompts
- - INLINECODE4
- INLINECODE5
- INLINECODE6
- INLINECODE7
- INLINECODE8
Quick Summary
- - Main jobs:
image-to-prompt, background-change, background-remove, expand, face-swap, reframe, repair, text-erase, translate, INLINECODE18 - Main inputs:
img_url plus tool-specific parameters such as image_size, prompt, bg_color, face_img_url, aspect_ratio, target_lang, original_image_size, canvas_size, INLINECODE28 - Main trust signals: dry-run support, explicit per-tool validation, parameter guidance by intent, sync and async handling,
WERYAI_API_KEY alignment with other WeryAI skills
Authentication and first-time setup
Before the first real processing run:
- 1. Create a WeryAI account.
- Open the API key page at
https://www.weryai.com/api/keys. - Create a new API key and copy the secret value.
- Add it to the required environment variable
WERYAI_API_KEY. - Make sure the WeryAI account has available balance or credits before paid processing.
OpenClaw-friendly setup
- - This skill already declares
WERYAI_API_KEY in metadata.openclaw.requires.env and primaryEnv. - After installation, if the runtime asks for required environment variables, paste the key into
WERYAI_API_KEY. - If you are configuring the runtime manually, export it before running commands:
CODEBLOCK0
Quick verification
Use one safe check before the first paid run:
CODEBLOCK1
- -
tools confirms the local CLI is available and shows the supported tool registry. - INLINECODE37 validates the request shape without calling WeryAI or spending credits.
Prerequisites
- -
WERYAI_API_KEY must be set before running image_toolkits.js for paid calls. - Node.js
>=18 is required because the runtime uses built-in fetch. - INLINECODE42 and
face_img_url can be http/https URLs or local/file sources. Local/non-http(s) sources are uploaded first. - Real
submit, wait, and status commands can consume WeryAI credits or depend on existing paid tasks.
Security And API Hosts
- -
WERYAI_API_KEY: Treat it as a secret. Configure it only in the runtime environment; never write the secret value into the skill files. - This skill supports directly passing local file paths. If a local file path is provided, the runtime will automatically upload the local file to the WeryAI server for processing.
- Optional override
WERYAI_BASE_URL defaults to https://api.weryai.com. Only override it with a trusted host. - For higher assurance, run paid jobs in a short-lived shell or isolated environment, and review
scripts/image_toolkits.js before production use.
Tool Routing
Route user intent to the narrowest tool:
- - Turn an image into a descriptive prompt -> INLINECODE52
- Replace or recolor background -> INLINECODE53
- Remove background -> INLINECODE54
- Expand canvas or outpaint around an image -> INLINECODE55
- Swap a face in an image -> INLINECODE56
- Change image aspect ratio -> INLINECODE57
- Restore an old or damaged photo -> INLINECODE58
- Erase text or watermark -> INLINECODE59
- Translate text inside an image -> INLINECODE60
- Enhance and upscale image quality -> INLINECODE61
If the user asks for text-to-image or image-to-image generation from scratch, use weryai-image-generator instead of this skill.
Parameter Guidance
Guide the user progressively. Ask only for the smallest missing set of parameters required for the selected tool.
Recommended guidance pattern
Use short operator-style guidance like this:
- - General help: When the user asks "how to use this skill", DO NOT paste raw shell commands. Instead, explain the capabilities in natural language and give 2-3 prompt examples.
Defaults you may apply safely
- -
translate: INLINECODE64 - For
background-remove, repair, text-erase, and upscale, no extra parameter is needed beyond INLINECODE69
Parameters that usually require user confirmation
- -
background-change.prompt or INLINECODE71 - INLINECODE72
- INLINECODE73
- INLINECODE74
- INLINECODE75
- INLINECODE76 ,
expand.canvas_size, and INLINECODE78
When to ask follow-up questions
- - Ask for
image_size when the user wants image-to-prompt and has not supplied the source image size in KB. - Ask for
prompt or bg_color when the user wants background change but has not said whether the new background is descriptive or a flat color. - Ask for
face_img_url when the user wants face swap but has not supplied the replacement face image. - Ask for
aspect_ratio when the user wants reframe but has not specified the target shape. - Ask for
target_lang when the user wants image translate but does not name the destination language. - Ask for canvas dimensions and placement only when the user wants expand.
Tool Matrix
Read references/image-tools-matrix.md when you need the exact required fields, enum values, sync behavior, or defaults for a tool.
Preferred Commands
CODEBLOCK2
Workflow
- 1. Identify whether the user wants image editing/post-processing or image generation.
- Route the request to one tool ID.
- Collect
img_url and only the extra parameters required by that tool. - Apply supported defaults where safe.
- Show the final tool, parameters, and URLs before the paid run if the request is ambiguous or expensive.
- Use
--dry-run when you need to verify the payload locally first. - For async tools, use
wait by default to deliver final processed image URLs in the same turn. - Enforce bounded polling with a maximum timeout of 5 minutes (300 seconds); do not run unbounded loops.
- If timeout is reached, return the
taskId to the user and ask if they want you to check the status again. Do NOT show the raw node status command to the user; use it internally. - Use
submit for synchronous image-to-prompt or when the user explicitly wants task creation without polling. - Use
status when the user already has a task_id.
Input Rules
- -
img_url and face_img_url can be http/https URLs or local/file sources. - INLINECODE96 requires
image_size in KB. - INLINECODE98 requires
prompt or bg_color. - INLINECODE101 requires
original_image_size, canvas_size, and original_image_location. - INLINECODE105 must use a supported
aspect_ratio. - INLINECODE107 must include
target_lang; type can be text or image. - Do not invent undocumented request fields.
Output
All commands print JSON to stdout. Successful results can include:
- -
taskId, taskIds, INLINECODE114 - INLINECODE115
- INLINECODE116
- INLINECODE117
- INLINECODE118
- INLINECODE119
- INLINECODE120 , INLINECODE121
User-facing delivery requirement:
- - If image URLs are available, return at least one user-visible image link (for example
[Image](https://...)) or inline rendering when supported. If multiple images are generated, render all of them using markdown image syntax consecutively. - Alongside image output, include key parameters when available:
tool, model, aspect_ratio, image_number, resolution. - Do not use
taskId as the sole deliverable unless the user explicitly requested task creation without waiting. - If timeout is reached before completion, return the
taskId to the user and ask if they want you to check the status again. Do NOT show the raw node status command to the user; use it internally.
Definition of done
The task is done when:
- - local validation passes without CLI-side errors,
- INLINECODE130 returns final processed images for async tools,
- or
wait reaches a terminal result with at least one processed image URL, - or
image-to-prompt returns a prompt string successfully, - or
status returns a clear in-progress or terminal state, - or
wait hits timeout and returns taskId plus a follow-up status command, - and the output makes it explicit whether image URLs or prompt text are present.
Constraints
- - Do not treat this skill as a text-to-image or image-to-image generator.
- Do not ask the user to choose raw API fields when a safe default already fits the request.
- Do not use unsupported file types for
img_url or face_img_url; local sources are uploaded before the toolkit request. - Do not re-run paid processing casually because each
submit or wait call can create a new paid task. - Do not broaden this skill beyond the documented WeryAI image-tools API surface.
Re-run behavior
- -
submit and wait are not idempotent for async tools. - INLINECODE142 is synchronous and safe to re-run if the user explicitly wants a fresh prompt analysis.
- INLINECODE143 and
tools are safe to re-run.
References
WeryAI 图像工具包
WeryAI 图像工具,图像编辑,图像后期处理,背景移除,背景更换,换脸,重新构图,修复,文字擦除,翻译,放大,图像转提示词。
WeryAI 图像工具用于对现有图像进行图像编辑和图像后期处理。
当需要对现有图像源进行官方 WeryAI 图像编辑、图像后期处理以及 WeryAI 图像工具操作时使用此技能。当需要使用 WeryAI 图像工具进行图像转提示词、背景更换、背景移除、画布扩展、换脸、重新构图、修复、文字擦除、图像翻译、图像放大或提示词提取时使用。此技能对秘密声明和输入安全性有严格限制:唯一的运行时秘密是 WERYAIAPIKEY,媒体输入支持 http/https URL 以及需要先上传的本地/文件源。
这不是一个图像生成技能。当用户想要使用 WeryAI 分析、清理、修复、翻译、重新构图、扩展、放大或以其他方式转换现有图像,而不是根据提示词生成全新图像时使用。
依赖项: 此目录中的 scripts/imagetoolkits.js、WERYAIAPI_KEY 和 Node.js 18+。不需要其他技能。
示例提示词
- - 使用 WeryAI 移除此 HTTPS 图像的背景。
- 将此图像中的文字翻译成英文并返回翻译后的图像。
- 使用 WeryAI 将此肖像中的脸部替换为参考图像中的脸部。
- 将此方形图像扩展为 1024x1024 的画布。
- 使用 WeryAI 图像转提示词功能将此图像转换为可复用的提示词。
快速摘要
- - 主要任务:图像转提示词、背景更换、背景移除、扩展、换脸、重新构图、修复、文字擦除、翻译、放大
- 主要输入:imgurl 以及特定工具参数,如 imagesize、prompt、bgcolor、faceimgurl、aspectratio、targetlang、originalimagesize、canvassize、originalimagelocation
- 主要信任信号:支持试运行、明确的逐工具验证、按意图提供参数指导、同步和异步处理、WERYAIAPIKEY 与其他 WeryAI 技能保持一致
身份验证和首次设置
在首次实际处理运行之前:
- 1. 创建一个 WeryAI 账户。
- 打开 https://www.weryai.com/api/keys 的 API 密钥页面。
- 创建一个新的 API 密钥并复制密钥值。
- 将其添加到所需的环境变量 WERYAIAPIKEY 中。
- 确保 WeryAI 账户在付费处理前有可用余额或积分。
OpenClaw 友好设置
- - 此技能已在 metadata.openclaw.requires.env 和 primaryEnv 中声明了 WERYAIAPIKEY。
- 安装后,如果运行时要求提供所需的环境变量,请将密钥粘贴到 WERYAIAPIKEY 中。
- 如果您手动配置运行时,请在运行命令前导出它:
sh
export WERYAIAPIKEY=yourapikey_here
快速验证
在首次付费运行前使用一次安全检查:
sh
node scripts/image_toolkits.js tools
node scripts/imagetoolkits.js wait --tool background-remove --json {imgurl:https://example.com/image.jpg} --dry-run
- - tools 确认本地 CLI 可用并显示支持的工具注册表。
- --dry-run 验证请求格式,无需调用 WeryAI 或消耗积分。
前提条件
- - 在运行 imagetoolkits.js 进行付费调用之前,必须设置 WERYAIAPIKEY。
- 需要 Node.js >=18,因为运行时使用内置的 fetch。
- imgurl 和 faceimgurl 可以是 http/https URL 或本地/文件源。本地/非 http(s) 源会先被上传。
- 真正的 submit、wait 和 status 命令会消耗 WeryAI 积分或依赖于现有的付费任务。
安全性和 API 主机
- - WERYAIAPIKEY:将其视为秘密。仅在运行时环境中配置;切勿将密钥值写入技能文件中。
- 此技能支持直接传递本地文件路径。如果提供了本地文件路径,运行时将自动将本地文件上传到 WeryAI 服务器进行处理。
- 可选的覆盖项 WERYAIBASEURL 默认为 https://api.weryai.com。仅使用受信任的主机进行覆盖。
- 为了更高的安全性,请在短期 shell 或隔离环境中运行付费作业,并在生产使用前审查 scripts/image_toolkits.js。
工具路由
将用户意图路由到最精确的工具:
- - 将图像转换为描述性提示词 -> 图像转提示词
- 替换或重新着色背景 -> 背景更换
- 移除背景 -> 背景移除
- 扩展画布或围绕图像进行外绘 -> 扩展
- 替换图像中的脸部 -> 换脸
- 更改图像宽高比 -> 重新构图
- 修复旧照片或损坏的照片 -> 修复
- 擦除文字或水印 -> 文字擦除
- 翻译图像中的文字 -> 翻译
- 增强和放大图像质量 -> 放大
如果用户要求从头开始进行文本到图像或图像到图像的生成,请使用 weryai-image-generator 而不是此技能。
参数指导
逐步引导用户。仅询问所选工具所需的最小缺失参数集。
推荐的指导模式
使用如下简短的操作员式指导:
- - 一般帮助:当用户询问如何使用此技能时,不要粘贴原始 shell 命令。相反,用自然语言解释功能并给出 2-3 个提示词示例。
您可以安全应用的默认值
- - 翻译:type=image
- 对于 背景移除、修复、文字擦除 和 放大,除了 img_url 外不需要额外参数
通常需要用户确认的参数
- - 背景更换.prompt 或 背景更换.bgcolor
- 换脸.faceimgurl
- 重新构图.aspectratio
- 图像转提示词.imagesize
- 翻译.targetlang
- 扩展.originalimagesize、扩展.canvassize 和 扩展.originalimage_location
何时提出后续问题
- - 当用户想要图像转提示词但未提供源图像大小(KB)时,询问 imagesize。
- 当用户想要背景更换但未说明新背景是描述性的还是纯色时,询问 prompt 或 bgcolor。
- 当用户想要换脸但未提供替换脸部图像时,询问 faceimgurl。
- 当用户想要重新构图但未指定目标形状时,询问 aspectratio。
- 当用户想要图像翻译但未指定目标语言时,询问 targetlang。
- 仅当用户想要扩展时,询问画布尺寸和位置。
工具矩阵
当需要某个工具的确切必填字段、枚举值、同步行为或默认值时,请阅读 references/image-tools-matrix.md。
推荐命令
sh
移除图像背景
node scripts/image
toolkits.js wait --tool background-remove --json {imgurl:https://example.com/image.jpg}
使用描述性提示词更换背景
node scripts/image
toolkits.js wait --tool background-change --json {imgurl:https://example.com/image.jpg,prompt:clean white studio background}
轮询现有任务
node scripts/image_toolkits.js status --task-id
工作流程
- 1. 确定用户想要的是图像编辑/后期处理还是图像生成。
- 将请求路由到一个工具 ID。
- 收集 imgurl 以及该工具所需的额外参数。
- 在安全的情况下应用支持的默认值。
- 如果请求模糊或成本较高,在付费运行前显示最终的工具、参数和 URL。
- 当需要先在本地验证负载时,使用 --dry-run。
- 对于异步工具,默认使用 wait 在同一轮中传递最终处理后的图像 URL。
- 执行有界轮询,最大超时时间为 5 分钟(300 秒);不要运行无界循环。
- 如果达到超时时间,将 taskId 返回给用户,并询问他们是否希望您再次检查状态。不要向用户显示原始的 node 状态命令;在内部使用它。
- 对于同步的 图像转提示词 或当用户明确希望创建任务而不进行轮询时,使用 submit。
- 当用户已有 taskid 时,使用