Communitygithub.com

Agents365-ai/videogenCN

Claude Code skill: Chinese video model generation via Alibaba Cloud Bailian — Wan/PixVerse/Kling/Vidu/HappyHorse, t2v/i2v/kf2v/r2v

videogenCN とは?

videogenCN is a Claude Code agent skill that claude Code skill: Chinese video model generation via Alibaba Cloud Bailian — Wan/PixVerse/Kling/Vidu/HappyHorse, t2v/i2v/kf2v/r2v.

対応Claude Code~Codex CLI~Cursor
npx skills add Agents365-ai/videogenCN

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント


name: videogen-wan description: Use when generating video clips with Chinese video models — text-to-video (文生视频), image-to-video (图生视频), first/last-frame and reference-to-video across 4 platforms: Bailian (Wan/PixVerse/Kling/Vidu/HappyHorse), Jimeng (doubao-seedance), MiniMax (Hailuo), Hunyuan (hy-video) author: Agents365-ai created: 2026-07-05 updated: 2026-07-09 homepage: https://github.com/Agents365-ai/videogenCN metadata: {"openclaw":{"requires":{"bins":["python3"],"env":["DASHSCOPE_API_KEY"]},"primaryEnv":"DASHSCOPE_API_KEY","emoji":"🎬"}}

Videogen-Wan - Chinese Video Generation Skill

Overview

Generate short video clips using Chinese video models across three providers — Alibaba Cloud Bailian (DashScope), Volcengine Ark (Jimeng/即梦), and MiniMax (海螺 AI).

Four modes, auto-selected from the inputs you provide:

ModeInputsDefault model
t2v 文生视频prompt onlywan2.7-t2v-2026-04-25 (Bailian)
i2v 图生视频prompt + --imagewan2.6-i2v-flash (Bailian)
kf2v 首尾帧prompt + --image + --last-framepixverse/pixverse-c1-kf2v (Bailian)
r2v 参考生视频prompt + --ref (1-7 images)pixverse/pixverse-c1-r2v (Bailian)

Video generation is asynchronous: the script submits a task, polls every 10s (long jobs can take 10-15 minutes), then downloads the MP4. Result URLs expire after 24h, so the script always downloads immediately.

Local images: Wan and HappyHorse accept base64 data URIs directly; PixVerse/Kling/Vidu only accept public URLs, so the script auto-uploads local files to DashScope temporary storage (48h oss:// URL) before submitting. Jimeng converts local files to base64; MiniMax uploads via its file API.

When to Use This Skill

  • User asks to 生成视频 / 文生视频 / 图生视频 / 首尾帧 / 参考生视频, or to make a video clip from a prompt or image
  • User names a Chinese video model: 万相/Wan, 爱诗/PixVerse, 可灵/Kling, Vidu, HappyHorse, 即梦/Jimeng, 海螺/MiniMax
  • User needs B-roll, animated stills, character-consistent clips, or transitions between two frames

Workflow

Step 0: Prompt Refinement (交互式提示词打磨)

CRITICAL — always run this step for t2v/i2v generation. User prompts are often too short, vague, or missing key visual details that video models need. Claude acts as a prompt engineer to polish the prompt before generation.

0.1 Analyze the user's raw input

Extract what's there and what's missing:

DimensionCheck
SubjectWho/what is the main focus? Describe appearance, action, expression
SceneWhere does it take place? Background, environment, atmosphere
LightingTime of day? Light quality? (golden hour, neon, soft diffused, backlit)
CameraShot type? (close-up, wide, aerial, tracking). Movement? (push-in, pan, orbit)
Mood/StyleEmotional tone? Visual style? (cinematic, anime, documentary, surreal)
MotionWhat moves? How? Speed, direction, dynamics
TemporalAny sequence? Beginning→middle→end?

0.2 Generate three refined variants

Present 3 variants in a table, each with a different creative direction:

| # | 风格方向 | 优化后提示词 | 建议参数 |
|---|---------|-------------|---------|
| 1 | [风格名]  | [完整中文提示词] | 5s / 16:9 / 1080P |
| 2 | [风格名]  | [完整中文提示词] | 8s / 16:9 / 1080P |
| 3 | [风格名]  | [完整中文提示词] | 5s / 9:16 / 1080P |

Variant design principles:

  • Variant 1: 忠于原意 — preserve the user's core idea, add rich visual detail, cinematic quality
  • Variant 2: 创造性发散 — a different artistic interpretation of the same core idea
  • Variant 3: 实用主义 — optimized for a specific platform format (vertical short-video, loopable clip, etc.)

Prompt writing rules for video models:

  • Write in Chinese (all supported models optimize for Chinese)
  • Front-load the subject and core action (first 20 chars matter most)
  • Use concrete visual nouns ("金色麦田") not abstract concepts ("丰收的感觉")
  • Describe motion explicitly ("缓缓推近", "随风飘动", "从远到近奔跑")
  • Add camera and lighting cues at the end ("电影感镜头", "逆光剪影", "浅景深")
  • Keep within 150 characters — video prompts are not novels
  • For Wan 2.7 multi-shot: use 第N个镜头[N-Ns]: 描述 format

0.3 User feedback loop

After presenting the three variants, ask the user to choose or give feedback. Accept these modifier keywords:

User saysAction
"用第N个" / "N"Use variant N as-is
"更诗意" / "更浪漫"Regenerate all three with more poetic/lyrical tone
"更简洁"Strip to essentials, shorter prompts
"加动态元素"Add more motion, action, kinetic energy
"改为夜景" / "下雪" / etcApply specific scene change to all variants
"混合1和3"Combine subject of 1 with style of 3
"直接用" / "不改了"Skip refinement, use raw prompt
Custom feedbackApply feedback and regenerate

Iterate until the user explicitly approves a prompt (says "好", "可以", "用这个", "生成吧", etc.), then proceed to Step 1.

0.4 Skip conditions

Skip refinement when:

  • User explicitly says "直接生成" / "不用优化" / "skip"
  • The prompt is already detailed (>80 chars with visual details already present)
  • Mode is kf2v/r2v (reference images are the primary input)

Step 1: Decide mode and provider

From the approved prompt and any --image/--last-frame/--ref inputs, determine:

  • Mode: t2v / i2v / kf2v / r2v (same auto-detection as before)
  • Provider: use --provider flag or auto-detect from model name
  • Model: use --model flag, or provider/model defaults
  • Parameters: duration, resolution, ratio from the variant's suggestion or user override

Step 2: Confirm and generate

Show the final command and confirm with the user (especially for long/expensive generations). Run the script; it blocks until the task finishes and saves the MP4.

Step 3: Deliver

Report the output path, file size, and generation time. If no output path was given, save to the current working directory.

Cost note: video APIs bill per second of output. For long or many clips, confirm with the user before submitting.

Providers

Alibaba Bailian 百炼

One API key (DASHSCOPE_API_KEY) covers all five model families. Third-party models (PixVerse/Kling/Vidu/HappyHorse) are Beijing region (cn) only.

Volcengine Ark (Jimeng 即梦)

Simple Bearer token auth via ARK_API_KEY. Uses the Ark Content Generation API (https://ark.cn-beijing.volces.com/api/v3). Supports t2v and i2v with native audio, lip-sync, and camera motion control.

MiniMax 海螺 AI

Simple Bearer token auth (MINIMAX_API_KEY). Three-step async flow (submit → query → retrieve download URL). Supports t2v and i2v.

Models

Wan 通义万相 (Alibaba Bailian)

ModelModeResolutionDurationNotes
wan2.7-t2v-2026-04-25t2v720P/1080P≤15st2v default. Multi-shot: 第N个镜头[N-Ns]: ...
wan2.5-t2v-previewt2v480P-1080P5/10sGenerates audio, --no-audio supported
wan2.2-t2v-plust2v480P/1080P5sStable quality
wanx2.1-t2v-turbo / -plust2v480P-720P3-5sFast/cheap
wan2.6-i2v-flashi2v720P/1080P2-15si2v default, --no-audio supported
wan2.6-i2vi2v720P/1080P2-15sBest i2v quality
wan2.5-i2v-previewi2v480P-1080P5/10sAudio
wan2.2-i2v-plus / -flashi2v480P-1080P5sSilent
wanx2.1-i2v-turbo / -plusi2v480P-720P3-5sEffect templates

PixVerse 爱诗 (Bailian third-party)

pixverse/pixverse-{c1,v6,v5.6}-{t2v,it2v,kf2v,r2v} — e.g. pixverse/pixverse-c1-it2v

  • c1/v6: duration 1-15s, 360P-1080P; v5.6: 5/8/10s (1080P: 5/8s only)
  • c1 excels at dynamic scenes/combat/high-speed motion; v5.6 is legacy
  • it2v = first-frame i2v, kf2v = first+last frame, r2v = 1-7 reference images with @ref_name prompt syntax
  • Audio off by default, enable with --audio

Kling 可灵 (Bailian third-party)

kling/kling-v3-video-generation, kling/kling-v3-omni-video-generation

  • One model code covers t2v/i2v/kf2v — the mode is set by which media you attach; omni adds reference images (--ref)
  • Duration 3-15s; resolution via mode: 1080P→pro, else std (720P); ratio 16:9/9:16/1:1

Vidu (Bailian third-party)

vidu/viduq3-{pro,turbo}_{text2video,img2video,start-end2video}, vidu/viduq2*

  • q3: 1-16s, audio supported (--audio); q2: 1-10s, no audio
  • 540P/720P/1080P; start-end2video = first+last frame

HappyHorse (Bailian third-party)

happyhorse-1.1-t2v, happyhorse-1.0-t2v, happyhorse-1.1-i2v, happyhorse-1.0-i2v

  • 3-15s, 720P/1080P; t2v supports many ratios; i2v matches input image ratio

Jimeng 即梦 (Volcengine Ark)

ModelModeResolutionDurationNotes
doubao-seedance-2-0-260128t2v/i2vup to 2K≤15sDefault. Audio, lip-sync, camera control
doubao-seedance-2-0-fast-260128t2v/i2vup to 1080P≤15sFast variant
doubao-seedance-1-5-pro-251215t2v/i2vup to 1080PsmartAudio, smart duration
doubao-seedance-1-0-prot2v/i2vup to 1080PStandard v1
  • Auth: ARK_API_KEY (Bearer token)
  • API: https://ark.cn-beijing.volces.com/api/v3
  • Local images auto-encoded as base64 data URIs
  • Ratio: 16:9, 9:16, 1:1, 21:9, etc.

MiniMax 海螺 AI

ModelModeResolutionDurationNotes
video-01t2v/i2v720P6sCovers both modes
  • Auth: Bearer token (MINIMAX_API_KEY)
  • Local images auto-uploaded via MiniMax file API
  • Prompt optimizer enabled by default

Prompt Refinement Examples

These examples show the Step 0 interactive refinement in action.

Example 1: Vague short prompt

User: "生成视频:一只猫"

Claude responds with:

你的原始提示词比较简短,我帮你打磨了三个版本:

#风格方向优化后提示词建议参数
1温馨日常一只橘猫蜷缩在窗台上,午后阳光透过纱帘洒在毛发上,猫咪眯着眼睛打盹,微风轻拂窗帘5s / 16:9
2灵动活泼一只黑白奶牛猫在花园里追逐蝴蝶,敏捷跳跃,花瓣被带起在空中飞舞,慢动作特写5s / 16:9
3赛博朋克一只发光机械猫在霓虹闪烁的雨夜街头行走,全息投影的鱼在它周围游动,科幻电影质感5s / 9:16

你喜欢哪个方向?也可以说"更诗意""改为雪景""混合1和2"等。

Example 2: Iterative refinement

User: "第二个不错,但是我想改成在森林里"

Claude regenerates variant 2 with forest setting, maybe adjusting all three:

好的,以森林为场景重新打磨:

#风格方向优化后提示词建议参数
1灵动森林一只黑白毛色的猫咪在晨光森林中轻盈跳跃,透过树叶的阳光形成光束,苔藓和蕨类植物环绕,慢动作5s / 16:9
2神秘森林黑猫在迷雾森林中优雅行走,发光的蘑菇照亮小径,萤火虫在空气中浮动,奇幻电影画风8s / 16:9
3雨后森林橘白色小猫在雨后的原始森林中探索,叶片上的水珠闪烁,丁达尔光束穿透树冠,微距镜头跟拍5s / 16:9

哪个更接近你想要的?

User: "用第1个,生成吧"

Claude runs the script with the approved prompt.

Usage

Text-to-Video

# Bailian (default)
python scripts/generate_video.py \
  "一只柴犬在樱花树下奔跑,花瓣随风飘落,电影感镜头" shiba.mp4 \
  --duration 5 --resolution 1080P --ratio 16:9

# Jimeng (即梦)
python scripts/generate_video.py "一只柴犬在樱花树下奔跑" shiba.mp4 \
  --provider jimeng --duration 5

# MiniMax (海螺)
python scripts/generate_video.py "一只柴犬在樱花树下奔跑" shiba.mp4 \
  --provider minimax --duration 6

Image-to-Video

python scripts/generate_video.py "镜头缓缓推近,人物微笑" out.mp4 --image portrait.png
# Or with a third-party model (local file auto-uploaded):
python scripts/generate_video.py "cinematic dolly-in" out.mp4 \
  --image portrait.png -m pixverse/pixverse-c1-it2v
# Jimeng i2v:
python scripts/generate_video.py "镜头缓缓推近" out.mp4 \
  --image portrait.png --provider jimeng

First+Last Frame (kf2v)

python scripts/generate_video.py "花苞缓缓绽放成盛开的牡丹" bloom.mp4 \
  --image bud.png --last-frame bloom.png

Reference-to-Video (r2v)

python scripts/generate_video.py "@girl 在 @cafe 里弹吉他" out.mp4 \
  --ref girl=girl.png --ref cafe=cafe.jpg

Resume a Long-Running Task

python scripts/generate_video.py --task-id <task-id> out.mp4

Options

FlagMeaningDefault
--providerbailian / jimeng / minimaxauto-detect
-m/--modelmodel nameauto by mode
-i/--imagefirst-frame image (path/URL)
--last-framelast-frame image → kf2v
--refreference image name=path_or_url, repeatable → r2v
-d/--durationseconds5
-r/--resolution360P/480P/540P/720P/1080P1080P
--ratio16:9 or 9:1616:9
-s/--sizeexact W*H for size-based modelsfrom resolution+ratio
-n/--negativenegative prompt (Wan only)
--no-prompt-extenddisable prompt rewriting (Wan only)extend on
--audioenable audio on PixVerse/Kling/Viduoff
--no-audiosilent output on Wan audio modelsaudio on
--seedreproducibility (not Kling)random
--task-idresume polling an existing task (Bailian)
--list-modelslist models and exit

Requirements

pip install requests

Environment Variables

VariableRequiredProviderPurpose
DASHSCOPE_API_KEYyes (Bailian)BailianBailian API key (https://bailian.console.aliyun.com/)
DASHSCOPE_API_BASEnoBailiancn (default) / sg / us or a full URL
DASHSCOPE_VIDEO_MODELnoBailiandefault model override
ARK_API_KEYyes (Jimeng)JimengVolcengine Ark API key (https://console.volcengine.com/ark/)
MINIMAX_API_KEYyes (MiniMax)MiniMaxMiniMax API key (https://platform.minimax.io)

Third-party models on Bailian (PixVerse/Kling/Vidu/HappyHorse) are Beijing region (cn) only.

Model Selection Guide

Use caseModelProvider
Best quality t2v, multi-shot storywan2.7-t2v-2026-04-25Bailian
Fast action / combat scenespixverse/pixverse-c1-t2vBailian
Smart storyboard, native audio-visualkling/kling-v3-video-generationBailian
Long clips up to 16s with audiovidu/viduq3-pro_text2videoBailian
Douyin/XHS short-video styledoubao-seedance-2-0-260128Jimeng
Smooth motion, natural physicsvideo-01MiniMax
Animate an image (default)wan2.6-i2v-flashBailian
Transition between two framespixverse/pixverse-c1-kf2v or vidu/viduq3-pro_start-end2videoBailian
Character/subject consistencypixverse/pixverse-c1-r2v or kling/kling-v3-omni-video-generationBailian
Cheap draftswanx2.1-t2v-turbo, happyhorse-1.0-t2vBailian

Examples

# Vertical short-video clip for Douyin/Xiaohongshu
python scripts/generate_video.py "赛博朋克雨夜街头,霓虹灯倒映在积水中" \
  city.mp4 --ratio 9:16 --resolution 1080P

# Multi-shot 15s narrative (wan2.7)
python scripts/generate_video.py \
  "第1个镜头[0-5s]: 清晨的茶园,雾气缭绕。第2个镜头[5-10s]: 特写采茶人的手。第3个镜头[10-15s]: 茶叶在杯中舒展" \
  tea.mp4 --duration 15

# Kling with audio, 10 seconds
python scripts/generate_video.py "海浪拍打礁石,海鸥鸣叫" sea.mp4 \
  -m kling/kling-v3-video-generation --audio --duration 10

# Character-consistent scene from reference images (PixVerse r2v)
python scripts/generate_video.py "@hero 挥剑劈开 @monster,火花四溅" fight.mp4 \
  --ref hero=hero.png --ref monster=monster.png -m pixverse/pixverse-c1-r2v

# Jimeng t2v, vertical format
python scripts/generate_video.py "城市日落延时摄影,天空由橙变紫" sunset.mp4 \
  --provider jimeng --duration 10 --ratio 9:16

# MiniMax t2v with image animation
python scripts/generate_video.py "细雨中的古镇小巷,青石板路反光" rain.mp4 \
  --provider minimax --duration 6

関連スキル