Install
openclaw skills install zyt-ai-creationUse Chanjing AI creation APIs to submit image or video generation tasks across multiple models, inspect task status, poll async results, and explicitly download generated assets when requested.
openclaw skills install zyt-ai-creation当用户要做这些事时使用本 Skill:
如果需求更接近“文生数字人”,优先使用 chanjing-text-to-digital-person。
如果需求更接近“已有数字人视频合成”,优先使用 chanjing-video-compose。
本 Skill 自己包含本地配置和鉴权流程,不依赖其他 skill 的运行时脚本。
本 Skill 使用:
~/.chanjing/credentials.jsonCHANJING_CONFIG_DIR:使用 $CHANJING_CONFIG_DIR/credentials.jsonhttps://open-api.chanjing.cc(可用 CHANJING_API_BASE 覆盖)当本地缺少 AK/SK 或 AK/SK 无效时,脚本可能在默认浏览器打开蝉镜官网登录页:
https://www.chanjing.cc/openapi/login
AI 创作的主接口是统一提交器:
submit_task 提交图片或视频生成任务,得到 unique_idpoll_task 轮询直到成功,得到 output_urlget_tasklist_tasksdownload_result这个 skill 默认做成“通用任务提交器”:
--body-file 或 --body-json 透传完整请求体本 Skill 当前覆盖:
POST /open/v1/ai_creation/task/submitPOST /open/v1/ai_creation/task/pageGET /open/v1/ai_creation/task脚本目录:
scripts/| 脚本 | 说明 |
|---|---|
chanjing-config | 写入/查看本地 app_id 与 secret_key,并清理旧 token 缓存 |
chanjing-get-token | 从本地凭证获取有效 access_token(必要时自动刷新) |
_auth.py | 读取本地凭证、获取或刷新 access_token |
submit_task | 提交 AI 创作任务,输出 unique_id |
get_task | 获取单个任务详情 |
list_tasks | 列出图片或视频任务 |
poll_task | 轮询任务直到完成,默认输出第一个结果地址 |
download_result | 下载图片或视频到 outputs/ai-creation/ |
示例 1:Seedream 3.0 文生图
TASK_ID=$(python3 scripts/submit_task \
--creation-type 3 \
--model-code "doubao-seedream-3.0-t2i" \
--prompt "赛博朋克城市夜景,霓虹灯,雨夜,电影镜头" \
--aspect-ratio "16:9" \
--clarity 2048 \
--number-of-images 1)
python3 scripts/poll_task --unique-id "$TASK_ID"
示例 2:腾讯 Kling v2.1 Master 图生视频
TASK_ID=$(python3 scripts/submit_task \
--creation-type 4 \
--model-code "tx_kling-v2-1-master" \
--ref-img-url "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/start.jpg" \
--ref-img-url "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/end.jpg" \
--prompt "角色从静止到转身,镜头平滑移动,叙事感强" \
--aspect-ratio "9:16" \
--clarity 1080 \
--quality-mode pro \
--video-duration 5)
python3 scripts/poll_task --unique-id "$TASK_ID"
示例 3:直接透传完整 JSON
python3 scripts/submit_task \
--body-file ./payload.json
下载是显式动作,不是默认动作:
poll_task 成功后应先返回远端 output_urldownload_result默认本地输出目录:
outputs/ai-creation/更多接口细节见:
skills/chanjing-ai-creation/reference.mdskills/chanjing-ai-creation/examples.md