SuperAPI AI Directory

chanjing-customised-person

Coding & development

View repository

Updated 10-15 20:11

About this skill

Chanjing Customised Person

Feature Description

From the local machineupload the source videocreate a Chanjingcustomised digital human, and supports listing, querying, polling and deletion; the flow is consistent with the Open API:Get upload URL(create_upload_url) → to the returned sign_url initiate a PUT PUT upload body → create/list/get/poll/delete. Only the Chanjing Open API and the upload endpoint returned by the interface are used;do notintroduce credentials from other cloud providers. The scriptdoes notdepend on ffmpeg/ffprobe. Environment variablesare all optional(default ~/.chanjing and the official API base URL). For credentials, token persistence and network boundaries see manifest.yaml。

Runtime Dependencies

  • python3 and, in the same repository, scripts/*.py; it can read a local video file path and upload it

Environment Variables and Machine-Readable Declaration

  • Environment variable key names and descriptions:manifest.yaml(environment section) and this document
  • variable key names, credential model, compliance permissions、clientPermissions、agentPolicy:manifest.yaml

Usage Commands

  • ClawHub(slug is subject to the registry):clawhub run chanjing-customised-person
  • This repository:python skills/chanjing-customised-person/scripts/create_person.py …(see Standard Workflow)

Registration and Review (Single Source of Truth)

English registration, primary credentials,primaryEnv omission, optional env, sensitive fields and outbound boundaries:subject to the manifest.yaml in the same directory(consistent with credential_hint、description frontmatter ). This document starts from When to Use and describes business capabilities and flows;do not duplicate with manifest.yaml the long comparison tables。

When to Use This Skill

Use this Skill when the user wants to do these things:

  • Upload a real-person source video and create a Chanjing customised digital human
  • Query the customised digital human list or the details of a single avatar
  • Poll the production progress of a customised digital human
  • Delete customised digital humans that are no longer needed

If the requirement is "use an existing digital human to synthesise a talking-head video", prefer chanjing-video-compose。
If the requirement is "upload a real-person video for lip-sync driving", prefer chanjing-avatar。

Preconditions

Before executing this Skill, you must first complete AK/SK and Token verification via chanjing-credentials-guard .

This Skill is shared with guard:

  • ~/.chanjing/credentials.json
  • https://open-api.chanjing.cc

When there are no credentials, the script will automatically open the Chanjing login page and prompt for the configuration command.

Review and Security (Credentials and Boundaries)

For the item-by-item description related to Purpose / Credentials / Persistence / Network , see manifest.yaml(including permissions.network_mode: open and signUrlPutNote). The following is only the SKILL body supplement:

  • credentials.json: the script reads local credentials; the refreshed access_token / expire_in is written back to the same fileasexpected behaviour. Directory/file permissions must be restricted (e.g. directory 0700, file 0600), andensure it is never committed to the version control repository(see manifest doNotCommitToVcs)。
  • sign_url and PUT host:upload_file.py / get_upload_url.py first request open-api.chanjing.cc 's create_upload_url, then initiate an HTTPS PUT to the sign_url in the response; the host of this URL is often Chanjing-side object storage or CDN,may not be inthe fixed host allowlist; the manifest has been changed to network_mode: open to declare this truthfully.
  • create_person.py --callback: if a URL is passed in, the remote service may send to that endpoint POST Task result; the payload may contain status and resource references, etc.Sensitive information; you must trust this endpoint yourself and bear the risks of outbound requests and data exposure.
  • Local video: read only the video bytes from the path provided by the user and upload them to the API-specified endpoint; do not scan other unrelated system paths.

Standard Workflow

  1. Upload a local source video to obtain file_id(recommended upload_file.py: internally GET …/create_upload_url → PUT sign_url(body is the file) → poll file_detail until ready; alternatively, use it step by step with get_upload_url.py + your own PUT + polling)
  2. Call create_person.py to create a custom digital human task and obtain person_id
  3. Call poll_person.py to poll until successful and obtain preview_url, or use get_person --field audio_man_id to get the voice id
  4. To view historical avatars in batches, use list_persons.py
  5. To clean up resources, use delete_person.py

Covered APIs

This Skill currently covers:

  • GET /open/v1/common/create_upload_url
  • GET /open/v1/common/file_detail
  • POST /open/v1/create_customised_person
  • POST /open/v1/list_customised_person
  • GET /open/v1/customised_person
  • POST /open/v1/delete_customised_person

Scripts

Script directory:

  • skills/chanjing-customised-person/scripts/
Script Description
_auth.py Read credentials, obtain or refresh access_token
get_upload_url.py Call create_upload_url, output JSON such as sign_url、mime_type、file_id (you need to PUT it yourself)
upload_file.py create_upload_url + HTTPS PUT sign_url + poll file_detail, output file_id
create_person.py Create a custom digital human task, output person_id; optional --callback(the server may send to this URL POST sensitive task payload)
list_persons.py List custom digital human avatars
get_person.py Get details of a single digital human, output JSON by default
poll_person.py Poll avatar details until complete, output by default preview_url
delete_person.py Delete a custom digital human, output the deleted person_id

Usage Examples

Example 1: Create a custom digital human from a local video

FILE_ID=$(python3 skills/chanjing-customised-person/scripts/upload_file.py \
  --file ./source.mp4)

PERSON_ID=$(python3 skills/chanjing-customised-person/scripts/create_person.py \
  --name "演示数字人" \
  --file-id "$FILE_ID" \
  --train-type figure)

python3 skills/chanjing-customised-person/scripts/poll_person.py --id "$PERSON_ID"

Example 2: View full details

python3 skills/chanjing-customised-person/scripts/get_person.py \
  --id "C-ef91f3a6db3144ffb5d6c581ff13c7ec"

Example 3: List and delete

python3 skills/chanjing-customised-person/scripts/list_persons.py

python3 skills/chanjing-customised-person/scripts/delete_person.py \
  --id "C-ef91f3a6db3144ffb5d6c581ff13c7ec"

Output Convention

By default, do not automatically download any preview video or cover image:

  • create_person.py output person_id
  • poll_person.py output preview_url, for continued preview or saving
  • Only when the user explicitly requests it should the returned resource URL be saved locally

If you later need to save preview resources to disk, it is recommended to use:

  • outputs/customised-person/

Additional Resources

For more API details and triggering examples, see:

  • skills/chanjing-customised-person/reference.md
  • skills/chanjing-customised-person/examples.md