Home / All Skills / Content & Media Creation / flyworks-avatar-video
Content & Media Creation · freestylefly/canghe-skills

flyworks-avatar-video

Generate videos using Flyworks (a.k.a HiFly) Digital Humans. Create talking photo videos from images, use public avatars with TTS, or clone voices for custom audio.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandNetwork AccessWrite FileDual-pass Audit
Author freestyleflyGitHub freestylefly/canghe-skills ↗License MIT(仓库根 LICENSE)Commit dd0bf35595
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

The entire capability is implemented via a single Python CLI: argparse defines subcommands such as list/create/clone/check/manage_memory, and main() dispatches to the corresponding functions.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
parser = argparse.ArgumentParser(description="HiFly Agent Skill Client")
What is being done here: Consolidating all digital human video generation operations into a single command-line entry point directly callable by agents.

Authentication reads the environment variable HIFLY_API_TOKEN; if unset, it falls back to a hardcoded free trial token in the source code, operating under a 30-second duration and watermark limit.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
token = os.environ.get("HIFLY_API_TOKEN")
What is being done here: Using a demo token to ensure zero-configuration test runs, while requiring users to provide their own token to remove limitations.

All requests are directed to a fixed backend BASE_URL with the token included in the Bearer header.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
BASE_URL = "https://hfw-api.hifly.cc/api/v2/hifly"
What is being done here: Hardcoding the remote generation service address as a constant targeting HiFly/Flyworks digital human API endpoints.

Video, voice, and avatar operations are all asynchronous tasks: after submitting and obtaining a task_id, check_task_status/poll_avatar_task polls status codes (1: pending / 2: processing / 3: success / 4: failed) every 2 seconds.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
url = f"{BASE_URL}/{task_type}/task"
What is being done here: Wrapping the remote asynchronous queue into synchronous waiting, allowing agent calls to simply submit and await results.

Local assets (images/audio) are uploaded in two steps: requesting an upload URL and file_id from /tool/create_upload_url, uploading the file content via PUT, and then submitting for generation using the file_id.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
url = f"{BASE_URL}/tool/create_upload_url"
What is being done here: Converting local files into remotely accessible references, which is a prerequisite for talking photos and voice cloning.

Talking photo is a two-stage pipeline: first calling /avatar/create_by_image to build a custom avatar and polling for avatar_id, then using that avatar to run TTS and generate the video.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
url = f"{BASE_URL}/avatar/create_by_image"
What is being done here: Splitting "a single photo + text script + voice timbre" into avatar creation and video generation stages, allowing each to be retried independently.

Voice cloning submits to /voice/create with voice_type=8, returning a reusable Voice ID once the task completes.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
"voice_type": 8
What is being done here: Distinguishing standard TTS voices (1) from cloned voices (8), where cloned results can be referenced by subsequent TTS videos.

Local alias memory: Persists alias mappings for avatar/voice into memory.json in the same directory as the script for easy cross-session reuse.

skills/flyworks-avatar-video-1.0.0/scripts/hifly_client.py
MEMORY_FILE = Path(__file__).parent / "memory.json"
What is being done here: Using a small JSON file as a ledger for saved avatars and voices, managed via manage_memory.

2Core Capabilities

01Public avatar text-to-video (TTS: text + avatar + voice)
02Talking photo: Generate talking videos from a single image
03Voice cloning: Clone voice timbre from audio samples
04Audio-driven video (upload audio -> generate)
05Task status querying and polling
06Local alias memory management (add/list)
07List public avatars and public voices

3External Dependencies

KindDependency / Endpoint
apiHiFly/Flyworks 数字人 API
network视频产物 CDN
packagerequests(HTTP 客户端,requirements.txt)
clipython3(运行 hifly_client.py)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • scripts/: Execute local script or command: python scripts/hifly_client.py <list_public_avatars|list_public_voices|crea
  • 网络端点: Declare external network access: https://hfw-api.hifly.cc/api/v2/hifly (avatar/list, voice/list, video/create_b
  • 本地工作目录: File read/write and artifact output: load_memory/save_memory writes aliases to memory.json in the script directory.
Audit Notes: Orange (use after evaluation): This is a real service client with an executable script. Per its declared purpose, it reads the environment variable HIFLY_API_TOKEN (credentials) and uploads user assets (images/audio/text) to the external backend hfw-api.hifly.cc for generation—triggering both orange criteria: "reading credentials/env for its own use" and "sending user assets to an external generation/service backend". There is no reverse engineering, disguise, or protection evasion, so it does not reach Red; nor is it purely local, making it higher than Blue.

5Second-Pass Verification

  • [ok] 网络端点全部指向 hfw-api.hifly.cc — requests.get/post/put 的 url 均由 BASE_URL 或上传返回的 upload_url 构造,扫到 11 处请求调用,无额外域名。
  • [ok] 凭证读取点 — 仅 get_token() 读 HIFLY_API_TOKEN,源码第 15 行;默认 token 第 11 行硬编码。
  • [ok] 写盘面 — 仅 save_memory 写 memory.json(第 34 行);未见其它文件写入。
  • [ok] 是否有隐藏/混淆脚本 — 目录清单仅 9 个文本文件,无二进制/混淆体;扫描沙箱与危险旗标 0 命中。
  • [ok] 能力声明与代码相符 — SKILL/README 声称的公共头像、说话照片、声音克隆在脚本中均有对应函数与端点。
  • [ok] 默认 token 有效性声明 — 源码与 references/authentication.md 一致:demo token 自动启用,30s 上限且带水印。
  • [ok] 安装方式 — README 的 `npx skills add Flyworks-AI/skills` 属宿主安装行为,非本目录执行,故不计入档位。

6Verdict & Scenarios

  • Self-contained and ready to run: A single Python client covers avatar listing, TTS/audio video generation, talking photos, voice cloning, and task queries.
  • Zero-config trial: Built-in demo token allows immediate out-of-the-box execution (limited to 30s with watermark).
  • Documentation matches code: Embedded references include real API paths and response samples, making it easy for agents to replicate calls.
  • Best for: Users who need to quickly generate talking avatar videos using Flyworks/HiFly Digital Humans and accept uploading assets to this third-party service.
    Not for: Scenarios where transmitting portrait or audio assets to third parties is prohibited, offline generation is required, or strict credential management and error recovery are mandatory.
    Install Agent-Ready
    ① Verified Mirror 2026-10-10
    Option A · Direct DownloadDownload flyworks-avatar-video.tar.gz
    sha256: a042e06284f41218…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit dd0bf35595.