虚拟试衣工作室

虚拟试衣工作室使用 YouCam AI 将服装试穿到人物照片上、更换背景,并可选择创建一段短动态视频。

youcam-api
2026年10月16日
0 收藏
349 下载

安装与下载

1 ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install youcam-clothes-tryon-studio

2 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/
工作区 {'/skills/'}

优先级:工作区 › 全局 › 内置

3 提示词安装

将此提示词复制到 Openclaw 即可自动安装。

请帮我使用 Clawhub 安装 skill-youcam-clothes-tryon-studio。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

更倾向于下载?

获取包含原生技能文件的ZIP压缩包。

下载技能 (.zip)

基本信息

名称 虚拟试衣工作室
Slug youcam-clothes-tryon-studio
创建者 youcam-api
创建时间 2026-10-16 06:06:50
更新时间 2026-10-16 06:06:50
收藏数 0
使用量 349
浏览量 9

安装指南

  1. ClawHub CLI 从源直接安装技能的最快方式。
    npx clawhub@latest install youcam-clothes-tryon-studio
  2. 手动安装 将技能文件夹复制到以下位置之一
    全局模式
    ~/.openclaw/skills/
    工作区
    /skills/
    优先级:工作区 > 本地 > 内置
  3. 提示词安装 将此提示词复制到 OpenClaw 即可自动安装。
    请帮我使用 Clawhub 安装 youcam-clothes-tryon-studio。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
    更倾向于下载?
    获取包含原生技能文件的ZIP压缩包。
    下载技能 (.zip)

什么是

虚拟试衣工作室是 Openclaw Skills 中的生成工作流,由 Perfect Corp YouCam APIs 提供支持,可用于虚拟服装展示。它结合 cloth-v4 服装试穿引擎,并可选用背景替换和图像转视频生成功能,生成转身、走秀或姿势展示效果。
此技能专为服饰探索、商品预览和购物体验而设计。使用时需要一张人物图片,以及服装参考图片或模板;生成前会确认 API 费用,每次运行都会获取最新 API 规格,并原样返回结果 URL。

应用场景

使用全身或半身照片虚拟试穿衬衫、连衣裙、西装或其他服装。
预览商品图片或穿着服装的参考图在特定人物身上的效果。
将图片背景替换为文字描述的场景,例如阳光明媚的海滩或摄影棚。
从 YouCam 目录中选择并应用预设背景模板。
将完成试穿的图片转换为简短的走秀、转身或姿势展示视频。
支持电商商品预览、时尚概念评审和服装搭配尝试。
将化妆、发型和皮肤分析请求转交给相应的专用技能。

工作原理

识别虚拟试衣请求,并确认任务适用于虚拟试衣工作室。
收集人物照片,以及服装参考图片或 YouCam 模板 ID。
获取 cloth-v4、bg-replace 和 image-to-video 的当前费用,然后询问用户希望执行哪些可选生成步骤,并说明预期总费用。
使用零积分密钥验证命令验证 YOUCAM_API_KEY。
在调用 API 前,获取最新的 YouCam 服装、背景替换和视频生成 API 规格。
使用所选服装类别和源图片/参考图片输入,运行必需的 cloth-v4 生成。
如有请求,使用自然语言提示或选定的预设模板,对原图或试穿结果运行 bg-replace。
如有请求,使用分辨率、时长和动作提示(例如转身或走秀)运行 image-to-video。
从 data.results.url 读取生成的资源 URL,并按原样返回图片或视频 URL。
如果任务报告 task_status 为 running,则保留其 task_id 并使用 status 轮询,直至成功或出错;切勿重新运行生成,因为这会产生新的费用。
每次回复结尾都必须附上所需的 AI 生成参考免责声明,说明合身度和外观可能存在差异。

配置指南

在 Openclaw Skills 环境中安装或放置此技能,并确保其 scripts/ 目录和 SKILL.md 文件完整无损。
从 https://yce.perfectcorp.com/api-console 获取 YouCam API 密钥。
通过环境变量或技能根目录中的凭据文件配置密钥。
export YOUCAM_API_KEY="your_api_key"
或者,按照 credentials.example.json 中记录的结构,在 SKILL.md 旁创建 credentials.json。
确认运行环境可以执行 Python,且能够访问外部地址 yce-api-01.makeupar.com。
验证凭据,不消耗积分:
python scripts/youcam_core.py validate-key
每次生成前,获取当前功能定价:
python scripts/youcam_core.py cost --feature cloth-v4
python scripts/youcam_core.py cost --feature bg-replace
python scripts/youcam_core.py cost --feature image-to-video
每次运行都要查阅最新 API 参考资料。如果有比本地 api-fallback.yaml 规格更新的版本,请使用 --version。所需功能包括 cloth-v4、bg-replace 和 image-to-video。

数据架构

此技能采用简洁、面向任务的输入和输出模型:
数据元素 用途
YOUCAM_API_KEY 身份验证凭据,从环境变量或根目录级别的 credentials.json 加载。
src_file 用于试穿的人物照片,或传入背景或视频生成的图片。
ref_file cloth-v4 使用的服装商品图片或穿着参考图片。
template_id 可选的服装或背景模板标识符。
garment_category 服装分类;已确认 full_body 可用,其他值需根据最新 API 文档核实。
type 背景模式,例如 prompt 或 template。
prompt 背景描述或动作指示。
resolution 视频输出分辨率,例如 720。
dst_duration 视频时长,单位为秒;image-to-video 按秒计费。
task_id 用于在最长 24 小时内轮询异步生成的标识符。
task_status 处理状态,例如 running、success 或 error。
data.results.url 返回给用户的规范生成图片或视频 URL。
生成的资源以远程结果 URL 表示,而非记录在文档中的本地输出目录。背景模板列表包含 id、title 和缩略图 URL,并支持通过 starting_token 分页。元数据分类按功能组织:cloth-v4 用于服装迁移,bg-replace 用于场景替换,image-to-video 用于动态生成。

高级特性

多阶段生成,并严格依据用户选择,仅运行其请求且需计费的功能。
生成前检查每项功能的费用,包括按秒计费的视频。
每次运行都获取最新 API 规格,并支持使用比
api-fallback.yaml
更新的版本。
服装输入方式灵活,可使用参考图片或 YouCam 模板 ID。
基于提示或目录模板替换背景,并支持分页发现模板。
生成动态视频,可配置分辨率、时长和动作提示。
通过任务 ID 和状态轮询恢复异步任务,避免重复收费。
在任何付费生成请求前进行零积分凭据验证。
精确保留 YouCam 结果 URL,便于可靠地分享和集成到下游流程。
按领域进行请求路由,避免将此 Openclaw Skills 工作流用于化妆、发型或皮肤分析。


name: clothes-tryon-studio description: >- Virtual clothes try-on studio using YouCam (Perfect Corp) AI. Swap outfits onto the
user's photo, optionally change the background, and optionally turn the result into a
short motion video (turn / runway / pose). Use for "換衣", "虛擬試穿", "outfit try-on",
"try on clothes". Do NOT use for makeup, hair, or skin analysis.
version: 1.1.1
requirements:
credentials:

  • name: YOUCAM_API_KEY source: env | credentials.json (in the skill root, next to SKILL.md)
    network:
  • yce-api-01.makeupar.com apis:
  • cloth-v4
  • bg-replace
  • image-to-video permissions:
  • type: exec commands: [python]

Clothes Try-on Studio

A generation skill: try on clothes, optionally change the background, optionally turn the result into a short motion video.

When to trigger

When the user wants to try clothes on virtually. For makeup, hair, or skin, hand off to the matching skill.

Ask first (this skill has multiple generation steps) and state cost

Before generating, ask the user which steps they want and tell them the credit cost of each:

Try on clothes (cloth-v4) — required base step
Change background (bg-replace) — optional
Motion video (image-to-video) — optional; note video is billed per second Get costs with python scripts/youcam_core.py cost --feature cloth-v4 (and --feature bg-replace, --feature image-to-video), tell the user the total, and only run what they choose.
Get the latest API spec (do this every run)
Clothes: https://docs.perfectcorp.com/reference/ai_clothes.md (latest engine cloth-v4)
Background change: https://docs.perfectcorp.com/reference/ai_photo_background_change.md
Video generator: https://docs.perfectcorp.com/reference/ai_video_generator.md Pass --version if newer than api-fallback.yaml.

Prerequisites

A photo of the person (full-body or upper-body) plus one garment reference image (product or worn photo) or a template_id.
Run python scripts/youcam_core.py validate-key (0 credits) to confirm the key. If it is not set, tell the user to get one at https://yce.perfectcorp.com/api-console and set the YOUCAM_API_KEY env var, or create credentials.json in the skill root (see credentials.example.json for the format).
Flow (only the chosen steps)
Try on (cloth-v4):

python scripts/youcam_core.py run --feature cloth-v4 --src_file

--ref_file
--param garment_category=full_body

(or use a template: --param template_id=; confirm the exact garment_category value from the latest doc — see Notes.)
(Optional) Change background (bg-replace): on the result or original image, run --feature bg-replace --src_file --param type=prompt --param prompt="A sunny beach" or use a preset background: list them with python scripts/youcam_core.py templates --feature bg-replace (0 credits; each has an id, title, and thumb image; pass --starting_token for the next page), let the user pick one, then run --feature bg-replace --src_file --param type=template --param template_id=.
(Optional) Motion video (image-to-video): run --feature "image-to-video" --src_file --param resolution=720 --param dst_duration=5 --param prompt="turn around / runway walk"
Each generation returns a result image/video URL in data.results.url.

If run prints "task_status": "running", the task is still processing and run stopped waiting. Do not run it again, since that starts a new task and charges again. Check back with python scripts/youcam_core.py status --feature --task_id , using the task_id from that output, until task_status is success or error. A task_id stays valid for 24 hours.

Output rules

Return the result image/video URL exactly as given (hyperlink is OK; do not modify or shorten it).
Video can take longer than run's default wait. If it returns running, check back with status as in step 5.
Always end with this note: "This try-on image/video is AI-generated and for reference only; actual fit and appearance may vary."

Notes

cloth-v4 garment_category is confirmed for full_body; the upper/lower-body token spelling is not yet 100% confirmed, so verify it against the latest doc parameter table before running (see the handoff GAPS).

头发诊断
发色与发型顾问