Install
openclaw skills install auto-video-creatorAI-powered video generator using XLXAI Sora2 API. Create professional videos from text prompts or images in seconds.
openclaw skills install auto-video-creatorGenerate professional videos from text prompts or images using the XLXAI Sora2 API.
This skill focuses exclusively on video generation:
For upload/post functionality, use a separate skill (e.g., post-to-tiktok-getlate) or downstream workflow.
cp skills/xlxai-video/.env.example skills/xlxai-video/.env
# Edit skills/xlxai-video/.env and set XLXAI_API_KEY
export XLXAI_API_KEY="$YOUR_KEY"
python3 skills/xlxai-video/scripts/generate_video.py "Your video prompt here" --model sora2-portrait-4s
The script loads the API key from the XLXAI_API_KEY environment variable, handles task creation and polling, and returns JSON with the video URL when complete.
{
"task_id": "task_Ue8FsGswnj3fCaY91yAj84m8AA8lLVpm",
"status": "pending",
"model": "sora2-portrait-4s",
"created_at": "2026-03-03T18:19:30Z"
}
{
"task_id": "task_Ue8FsGswnj3fCaY91yAj84m8AA8lLVpm",
"status": "completed",
"video_url": "https://api.xlxai.store/video2-proxy/base/video/79193b56b4792daec07c5564bff412f193a6c20e5ee7ca0a323ab753da2420a9.mp4",
"progress": 100,
"duration": 38,
"message": "Generation complete",
"created_at": "2026-03-03T18:19:30Z",
"completed_at": "2026-03-03T18:20:08Z"
}
Notes:
Choose based on your needs:
sora2-portrait-4s — 4-second vertical video (default)sora2-portrait-8s — 8-second vertical videosora2-portrait-12s — 12-second vertical videosora2-landscape-4s — 4-second horizontal videosora2-landscape-8s — 8-second horizontal videosora2-landscape-12s — 12-second horizontal videoDefault: sora2-portrait-4s
Generate videos from text descriptions:
python3 scripts/generate_video.py "A 30-year-old American man in a suit presenting to camera" \
--model sora2-landscape-8s
Create videos from images with motion (local images auto-converted to data URI):
python3 scripts/generate_video.py "Man showcasing the suit, saying it's well-made and affordable" \
--model sora2-portrait-4s \
--image "/path/to/local/image.jpg"
Or use image URLs directly:
python3 scripts/generate_video.py "Man showcasing the suit, saying it's well-made and affordable" \
--model sora2-portrait-4s \
--image "http://example.com/image.jpg"
Get task ID immediately without waiting for completion:
python3 scripts/generate_video.py "Your prompt" --no-wait
Check status later:
python3 scripts/generate_video.py --check-status task_abc123
| Option | Description | Default |
|---|---|---|
--model | Video model (portrait/landscape, 4s/8s/12s) | sora2-portrait-4s |
--image | Image URL or local file path | — |
--no-wait | Return task ID immediately | false |
--poll-interval | Seconds between status checks | 10 |
--timeout | Max seconds to wait for completion | 600 |
--check-status | Check status of existing task | — |
On success, the script returns JSON with:
status: "completed"video_url: Download link for the generated videoprogress: 100duration: Generation time in secondstask_id: Unique task identifiercreated_at: Task creation timestampcompleted_at: Task completion timestampThe script handles:
cp skills/xlxai-video/.env.example skills/xlxai-video/.env
export XLXAI_API_KEY="$YOUR_KEY"
python3 skills/xlxai-video/scripts/generate_video.py "あなたのプロンプト" --model sora2-portrait-4s
python3 skills/xlxai-video/scripts/generate_video.py "シーンの説明" --image "/path/to/image.jpg"
cp skills/xlxai-video/.env.example skills/xlxai-video/.env
export XLXAI_API_KEY="$YOUR_KEY"
python3 skills/xlxai-video/scripts/generate_video.py "당신의 프롬프트" --model sora2-portrait-4s
python3 skills/xlxai-video/scripts/generate_video.py "장면 설명" --image "/path/to/image.jpg"