Overview
Generate dynamic videos driven purely by text, covering 2 types of scenarios:
- High-quality default mode: creative videos, advertising materials, copy visualization, concept demos; 4–15s, ratios adaptive/16:9/4:3/1:1/3:4/9:16/21:9, 480p/720p, audio on by default.
- High-dynamics fast mode: pursuing dynamic effects / vivid visuals, or requiring a short 3s duration; 3–15s, only 16:9/1:1/9:16, 720p, audio off by default, stronger dynamic effects.
Not handled: image-driven video generation, audio-driven generation, video editing, adding effects/changing style to videos.
API Mapping
| Scenario | Backend API |
|---|---|
| High-quality default mode | video_toffee_t2v_v20 |
| High-dynamics fast mode | video_bonbon_txt2vid_v30 |
model mapping:
auto(default) / not passed → decided by routing rulestoffee→video_toffee_t2v_v20bonbon→video_bonbon_txt2vid_v30- Mutual fallback: if one fails, switch to the other and retry
Dependencies
- meitu-cli:
>=2.0.6 - Credentials:CONFIG AKSK →
meitu tools update; EXEC AKSK → run command (see rootCONFIG.md) - Environment variables:
MEITU_OPENAPI_TOOL_TASK_MODE=command
Core Workflow
Preflight → Execute → Deliver
Preflight
meitu --version≥ 2.0.6meitu auth verify --json- Confirm registry contains
text-to-video - Resolve output_dir:
openclaw.yaml→./output/;else →~/.openclaw/workspace/visual/output/text-to-video/ - Duration clamping: user requests <3s → clamp to 3s and inform
Execute
Trigger signals / routing rules
Decision order:
- Duration <3s → clamp to 3s
- Dynamics priority / 3s short duration matched → candidate
video_bonbon_txt2vid_v30 - If ratio is 4:3/3:4/21:9/adaptive → ratio priority, switch back to
video_toffee_t2v_v20 - No special requirements →
video_toffee_t2v_v20(default)
| Scenario | Decision keywords | Routing |
|---|---|---|
| Dynamics priority | dynamic, vivid | video_bonbon_txt2vid_v30 |
| 3s short duration | 3 seconds | video_bonbon_txt2vid_v30 |
| Default / no special requirements | General | video_toffee_t2v_v20 |
| Special ratios (4:3/3:4/21:9/adaptive) | -- | Force video_toffee_t2v_v20(ratio priority) |
| Want 480p | -- | video_toffee_t2v_v20(bonbon does not support 480p) |
Parameter definitions
General parameters:
| Parameter | Type | Required | Range | Default value | Description |
|---|---|---|---|---|---|
prompt |
STRING | Yes | -- | -- | Video content description. If missing → ask follow-up |
video_duration |
NUMBER | Yes | 3–15 | Varies by API | toffee: 4–15, default 10; bonbon: 3–15, default 5 |
sound |
STRING / BOOL | Yes | on/off or true/false | Varies by API | toffee: BOOL generate_audio, default true; bonbon: STRING on/off, default off |
aspect_ratio |
STRING | Yes | adaptive / 16:9 / 1:1 / 9:16 / 4:3 / 3:4 / 21:9 | Varies by API | toffee supports all ratios, default adaptive; bonbon only 16:9/1:1/9:16, default 16:9 |
resolution |
STRING | No | 480p / 720p | 720p | Only supported by toffee; bonbon is fixed at 720p |
Parameter mapping for each API:
video_toffee_t2v_v20(high-quality default)
| Unified parameter | API parameter | Mapping rule |
|---|---|---|
prompt |
prompt |
Direct pass-through |
video_duration |
video_duration |
clamp(4, 15), default 10 |
sound |
generate_audio |
on→true / off→false; default true |
aspect_ratio |
ratio |
Full-ratio direct pass-through, default adaptive |
resolution |
resolution |
480p/720p, default 720p |
video_bonbon_txt2vid_v30(high dynamic fast)
| Unified parameters | API parameters | Mapping rules |
|---|---|---|
prompt |
prompt |
Direct pass-through |
video_duration |
video_duration |
clamp(3, 15), default 5 |
sound |
sound |
on/off direct pass-through, default off |
aspect_ratio |
aspect_ratio |
Supports 16:9/1:1/9:16; other ratios switch to toffee |
Tool invocation
Default high quality:
meitu text-to-video \
--skill_name skill_text-to-video \
--prompt "{video_description}" \
--video_duration 10 \
--aspect_ratio adaptive \
--resolution 720p \
--sound true \
--json --download-dir {output_dir}
High dynamic fast (3s):
meitu text-to-video \
--skill_name skill_text-to-video \
--prompt "{dynamic_scene}" \
--model bonbon \
--video_duration 3 \
--aspect_ratio 16:9 \
--sound off \
--json --download-dir {output_dir}
Error fallback
| Scenario | Handling method |
|---|---|
prompt missing |
Prompt "Please describe the video content you want to generate" |
| Duration <3s | Clamp to 3s, notify "Text-to-video supports a minimum of 3 seconds" |
| Duration <4s + default mode | toffee minimum 4s → fallback video_bonbon_txt2vid_v30 |
| Special ratio + fast mode | bonbon only 16:9/1:1/9:16 → switch video_toffee_t2v_v20, notify "The current ratio does not support dynamic mode, switched to default mode" |
| Duration unspecified + default mode | Default 10s |
| Duration unspecified + fast mode | Default 5s |
video_toffee_t2v_v20 failed |
switch video_bonbon_txt2vid_v30 retry |
video_bonbon_txt2vid_v30 failed |
switch video_toffee_t2v_v20 retry → still fails, return error |
| Timeout >600s | Reduce duration / resolution and retry once → still fails, return error |
| Content compliance interception | Directly return compliance prompt, no retry, no fallback |
Conflict rules:
- Dynamic + special ratio → ratio takes priority, use
video_toffee_t2v_v20 - 3s duration + default mode → duration takes priority, use
video_bonbon_txt2vid_v30 - Want 480p → use
video_toffee_t2v_v20(bonbon does not support)
Deliver
Parse --json:
ok: true→downloaded_files[0].saved_pathas local videook: false→ outputcode+hint
Persist to disk:mv {file} {output_dir}/{YYYY-MM-DD}_{descriptive-name}.mp4
Output
- Format: MP4
- Naming:
{YYYY-MM-DD}_{descriptive-name}.mp4 - Location: project →
./output/; one-time →~/.openclaw/workspace/visual/output/text-to-video/
Baseline Task ID
See root directory references/task-id-baseline.md in text-to-video entry.