vidu-cli-0.2.4 is not a library.
vidu-cli
A command-line client for the Vidu video generation API.
Installation
Configuration
Set environment variables:
# China: service.vidu.cn, Global: service.vidu.com
Usage
vidu-cli <COMMAND>
Commands:
upload Upload image → get ssupload URI
task Task operations
element Element (主体) operations
Upload
Upload a local image and get a reusable ssupload:?id=xxx URI:
Task
Submit a task
Task types and constraints:
| Type | Models | Duration | Resolution | Aspect Ratio |
|---|---|---|---|---|
text2video |
3.0, 3.1, 3.2 | 3.0→5s, 3.1→2-8s, 3.2→1-16s | 1080p | 16:9, 9:16, 1:1, 4:3, 3:4 |
img2video |
3.0, 3.1, 3.2 | 3.0→5s, 3.1→2-8s, 3.2→1-16s | 1080p | — |
headtailimg2video |
3.0, 3.1, 3.2 | 3.0→5s, 3.1→2-8s, 3.2→1-16s | 1080p | — |
character2video |
3.0, 3.1, 3.1_pro, 3.2 | 3.0→5s, 3.1→2-8s, 3.2→1-16s | 1080p | 16:9, 9:16, 1:1, 4:3, 3:4 |
text2image |
3.1, 3.2_fast_m, 3.2_pro_m | 0 (image) | 1080p, 2k, 4k | 16:9, 9:16, 1:1, 4:3, 3:4 |
reference2image |
3.1, 3.2_fast_m, 3.2_pro_m | 0 (image) | 1080p, 2k, 4k | 16:9, 9:16, 1:1, 4:3, 3:4 |
Examples:
# Text to video
# Image to video (local file or URL)
# First-last frame video
# Character to video (with element material)
Get task result
Returns: task_id, state, type, model, err_code, err_msg.
Use --output / -o to download media files to a local directory when the task is complete:
If the task state is not success, the download is skipped and the response includes download_skipped: true.
Lip sync
Drive mouth movement on an existing video using text or audio:
# Text mode
# Audio mode
Supported video: MP4/MOV/AVI ≤500MB. Supported audio: MP3/WAV/AAC/M4A ≤100MB.
List available lip-sync voices
TTS (Text-to-Speech)
Convert text to speech audio:
# Basic usage
# Full parameters
Parameters:
| Parameter | Required | Default | Range | Description |
|---|---|---|---|---|
--prompt |
Yes | - | 1-2000 chars | Text content to convert to speech |
--voice-id |
Yes | - | See voice list | Voice ID for speech synthesis |
--speed |
No | 1.0 | 0.5-2.0 | Speech speed multiplier |
--volume |
No | 80 | 0-100 | Audio volume level |
--emotion |
No | - | Any text | Emotion description (optional) |
--language-boost |
No | - | Chinese, English, auto, etc. | Enhance recognition of specific languages/dialects |
List available TTS voices
Element (主体)
Manage reusable character/material elements:
# Check if element name is available
# Pre-process element image
# Create element
# List your elements
# Search community elements
License
MIT