360 Secure SkillHub
360 安全技能中心

YouCam Beauty Advisor

调用 YouCam(Perfect Corp)AI 分析自拍的脸型与肤色属性,结合本地指南推荐合适妆容,并按用户选择的预设整套妆容或自定义单品效果生成虚拟试妆预览图;支持查询费用、模板列表与任务状态,需配置 API 密钥并联网。

youcam-api
youcam-api
热度 60.69
最近更新 2026-10-14 16:17:20
分类:生活依赖:代码执行 / 第三方 API / 读写文件应用场景:图像生成 / 推荐 / 概念解释

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add youcam-beauty-advisor
Metadata
name
beauty-advisor
description
Recommend and preview makeup looks based on the user's face shape and skin tone, using YouCam (Perfect Corp) AI. Analyzes the selfie, suggests suitable looks, then renders a virtual makeup try-on image. Use for "推薦妝容", "幫我上妝", "makeup look", "virtual makeup". Do NOT use for skin-condition scoring, hair, or clothes.
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":["face-attr-analysis","skin-tone-analysis","makeup-vto","look-vto"],"permissions":[{"type":"exec","commands":["python"]}]}

Beauty Advisor

An analysis + generation skill: analyze face shape and skin tone, then recommend and preview a makeup look. Run the flow here through scripts/youcam_core.py.

When to trigger

When the user wants a makeup recommendation or a virtual try-on. For skin scores, hair, or clothes, hand off to the matching skill.

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

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

  • Full look (preset template) — apply a curated full-face look (look-vto)
  • Custom effects — specify individual items (lip color, eyeshadow, blush, …) (makeup-vto) Get costs with python scripts/youcam_core.py cost --feature look-vto and --feature makeup-vto (and --feature face-attr-analysis / --feature skin-tone-analysis for the analysis step), tell the user, and only run what they choose.

Get the latest API spec (do this every run)

Read the doc section(s) for the steps you will run and open the latest version for endpoints / parameters:

Prerequisites

  1. A clear, front-facing selfie.
  2. 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

  1. Analyze (as needed): face shape and eye/lip shape with python scripts/youcam_core.py run --feature face-attr-analysis --src_file <photo> --param features='["faceShape","faceAspectRatio","eyeShape","lipShape"]' (features is required and picks which attributes to measure), and run --feature skin-tone-analysis for colors.
    • The face shape comes back as faceshape: one of Triangle, Diamond, Heart, InvTriangle, Oblong, Oval, Round, Square, or Unknown; references/guide.md has advice for Round, Oblong, Square, and Heart.
    • If it is Unknown, don't guess a shape. face_aspect_ratio comes back as [1, r] (ideal 1 : 1.46): r above about 1.6 means a long face, below about 1.3 a short/wide one. Use it only for that long-vs-wide advice, and keep the rest general.
  2. Recommend: use references/guide.md to pick a look/colors from face shape + skin tone.
  3. Preview (the option the user chose):
    • Full look: list the looks with python scripts/youcam_core.py templates --feature look-vto (0 credits; each has an id, title, and thumb image; pass --starting_token <next_token> for the next page), let the user pick one, then run --feature look-vto --src_file <photo> --param template_id=<id>
    • Custom: run --feature makeup-vto --src_file <photo> --param effects='[{...}]' (each effects item is one category; see the doc's category schema and pattern catalogs)
  4. The generation returns a result image URL in data.results.url.
  5. 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 <feature> --task_id <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 URL exactly as given (you may make it a hyperlink, but do not modify or shorten it).
  • Explain the recommendation (why this look suits their face shape / skin tone).
  • Always end with this note: "This preview image is AI-generated and for reference only; actual makeup results may vary by product, skin, and lighting."