Introduction¶
When integrating face and template image fusion, the common practice is to integrate Tencent Cloud’s FuseFaceUltra API within your project, handle authentication and parameters yourself, and restrict the Coding Agent to only “writing calling code” without generating the image directly. If you want the Agent to return the fusion result synchronously after obtaining the template image and user face image during a conversation, you need to incorporate service activation, keys, script entry points, and model type selection into an executable Skill specification.
Below is an introduction to TencentCloud Image Face Fusion on SkillHub (coordinates @tencent-adm/tencentcloud-image-face-fusion, version 1.0.0): published by the Tencent Cloud Intelligent Creation Team, classified under design-media, sourced from enterprise, and marked with requires_api_key=true.
What is this¶
TencentCloud Image Face Fusion is an Agent Skill based on the universal SKILL.md format. It encapsulates Tencent Cloud’s Image Face Fusion (Professional Edition) capability: fusing a user’s face with the face in a material template image, returning the result via the synchronous interface FuseFaceUltra (domain facefusion.tencentcloudapi.com, version 2022-09-27).
The SkillHub page description matches the description within the skill package: it supports effect parameters such as custom beauty enhancement, face enhancement, teeth enhancement, and face warping (corresponding to the API’s FusionUltraParam); supports resolutions up to 8K (single side less than 8000 pixels); and provides multiple fusion model types (SwapModelType 1–6).
Core Features¶
The capabilities confirmed by checking the skill package and API reference documentation are as follows:
- Synchronous Face Fusion: The scenario is “Face Fusion (Professional Edition)”, the script is
scripts/main.py, and the return method is synchronous; image limits are ≤10M for base64 encoded images and ≤20M for URLs. - Input Methods:
--modelspecifies the material template image, and--facespecifies the user face image; both support URLs or local paths. - Model Types:
--swap-model-typesupports options 1–6, covering scenarios such as pan-entertainment, film/TV natural/HD, ID photos, closed-eye/occlusion friendly, and e-commerce/cultural tourism with high similarity; default is 1. - Compliance Mark:
--logo-addcontrols whether to add an AI synthesis mark to the result image (0 for no addition, 1 for addition, default 1). - Advanced API Parameters:
FusionUltraParamallows configuration of face warping (WarpRadio), face enhancement (EnhanceRadio), skin retouching (MpRadio), teeth enhancement (TeethEnhanceRadio), makeup transfer (MakeupTransferRadio), etc.; the template image supports fusion of up to 6 faces (MergeInfos). - Agent Execution Agreement: After installation, the Skill requires the Agent to directly execute the script when the user provides the template image and face image with the intention of fusion. In case of failure, it should return an error explanation and must not use the model to “fabricate” a fusion image.
Installation and Activation¶
Method 1: SkillHub CLI¶
First, check if skillhub is already on your local machine (see the SkillHub Installation Documentation for installation instructions):
command -v skillhub && skillhub --version
If not installed, you can perform a full installation or CLI-only installation according to the official documentation, for example:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
When installing the skill, you must use --dir to point to the skills directory of the current Agent. Common paths include:
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
Example (replace <skills directory> with the actual path):
skillhub install @tencent-adm/tencentcloud-image-face-fusion --dir <skills directory>
Method 2: Ask AI to Install via Official Prompt¶
The prompt provided on the SkillHub skill page is: According to https://skillhub.cn/install/skillhub.md, install @tencent-adm/tencentcloud-image-face-fusion.
Keys and Environment Variables¶
- Activate the service at the Tencent Cloud Face Fusion Console.
- Obtain
SecretIdandSecretKeyat API Key Management. - Set environment variables (Linux / macOS example):
export TENCENTCLOUD_SECRET_ID="YourSecretId"
export TENCENTCLOUD_SECRET_KEY="YourSecretKey"
The skill package requires that keys are not hardcoded into the code. Running main.py requires Python 3.7+ and tencentcloud-sdk-python (the script can install dependencies automatically).
Typical Usage¶
After installation and key configuration, the Agent should call main.py according to the specifications within the Skill. The command format is as follows (<SKILL_DIR> is the skill installation directory):
python3 <SKILL_DIR>/scripts/main.py --model "<MODEL_PIC_INPUT>" --face "<USER_FACE_INPUT>" [--swap-model-type <1-6>] [--logo-add <0|1>]
Reproducible examples from the skill package:
# Basic usage: Material template image + User face image (URL)
python3 /path/to/scripts/main.py --model "https://example.com/template.png" --face "https://example.com/user_face.png"
# ID photos, etc.: Cinematic HD, high face similarity
python3 /path/to/scripts/main.py --model "/path/to/template.jpg" --face "/path/to/face.jpg" --swap-model-type 4
# Do not add AI synthesis mark
python3 /path/to/scripts/main.py --model "https://example.com/template.png" --face "https://example.com/face.png" --logo-add 0
Upon success, the script outputs JSON, where FusedImage is the result image URL (or base64, depending on the API’s RspImgType); the URL is valid for 1 day. For more complete fields and error codes, refer to references/FuseFaceUltraApi.md within the skill, corresponding to the Tencent Cloud documentation Image Face Fusion (Professional Edition).
In clients like Cursor, you can also describe your requirements directly in natural language (providing template image and face image paths or URLs, whether specific swap-model-type is needed), and the Agent will read the installed SKILL.md to execute the above commands.
Use Cases and Notes¶
Who it is for: Teams that need to perform face template fusion in design/media Agent workflows and wish to utilize Tencent Cloud’s official interface and billing system; this skill has a rating of 100000 on SkillHub, with approximately 1949 downloads and 41 installations (data subject to SkillHub page statistics).
Usage Notes:
- Tencent Cloud API keys must be configured; calling will fail if the Face Fusion service is not activated.
- Image formats are jpg/png; the face and resolution must meet the minimum/maximum side length requirements in the API documentation.
- The applicable scope of
SwapModelType6 and someFusionUltraParamsettings is subject to the API documentation (e.g., some parameters are only effective for types 1–5). - If fusion fails, the Agent should report the error truthfully and should not switch to using a large model to generate a substitute image.
Conclusion¶
TencentCloud Image Face Fusion integrates the synchronous invocation, model selection, and compliance marking of Tencent Cloud’s Image Face Fusion (Professional Edition) into an Agent-executable Skill, reducing the cost of repeatedly integrating FuseFaceUltra. Official Entry: https://api.skillhub.cn/tencent-adm/tencentcloud-image-face-fusion; SkillHub Display Page: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-image-face-fusion.