Install
openclaw skills install magic-text2videoCreate a text-to-video job from user-provided copy. Submits to the remote video service via one API key.
openclaw skills install magic-text2videoCreate a video generation task from text. The job is submitted immediately; Polling to obtain task status and video URL.
✅ USE this skill when:
❌ DON'T use this skill when:
export MAGIC_API_KEY="your-key"
MAGIC_API_KEY is required by the remote video service client.
TEXT (i.e., the script to be used for video generation).video-create subcommand to create a task, read the JSON from stdout, and extract the task_id.task_id in the chat (optionally include the original JSON output for debugging).video-wait subcommand with the task_id as --task-id, polling until successful.video-wait 的 stdout 中提取 video_url.video_url in the chat (you may also include the original output).Extract the text the user wants to generate a video from and assign it to TEXT.
", properly escape them before constructing the command (for example, by replacing " with \") to avoid shell parsing errors.Run the following command (executed by the agent/tool; {baseDir} will be replaced with the Skill directory):
python3 {baseDir}/scripts/media_gen_client.py video-create \
--text "TEXT"
{
"biz_code": 10000,
"msg": "Success",
"data": {
"task_id": "2032443088023777280"
},
"trace_id": "664c6e22-1edd-11f1-bf4c-8262dce7d13f"
}
video_url in the chatUse the task_id obtained in the previous step and refer to it as task_id.
Run the following command to poll the task status (check every 10 seconds and wait up to 600 seconds); if it times out, wait a while and retry:
python3 {baseDir}/scripts/media_gen_client.py video-wait --task-id YOUR_TASK_ID --poll 10 --timeout 600
{
"biz_code": 10000,
"msg": "Success",
"data": {
"task_id": "1234567890",
"task_status": 2,
"video_url": "https://www.magiclight.com/examplevideo.mp4"
},
"trace_id": "c89aeca8-1edd-11f1-bf4c-8262dce7d13f"
}
"Task completed ✅ task_id: abc-123 Video URL: https://example.com/path/to/video.mp4"