Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID
Value: viduq2_pro_fast_text2video
prompt string required
Text description for video generation, character length cannot exceed 2000 characters
duration integer
Video duration in seconds
Options: 1, 2, 3, 4, 5, 6, 7, 8
Default: 5
seed integer
Random seed. When not provided or set to 0, a random number will be used. Manual setting will use the specified seed
aspect_ratio string
Aspect ratio
Options: 16:9, 9:16, 3:4, 4:3, 1:1
Default: 16:9
resolution string
Video resolution
Options: 720p, 1080p
Default: 720p
bgm boolean
Whether to add background music to the generated video
When true, the system will automatically select and add appropriate music from the preset BGM library; when false, no BGM will be added
BGM has no time limit, the system will automatically adjust based on video duration
Options: true, false
Default: false
payload string
Pass-through parameter, no processing required, only data transmission, maximum 1048576 characters
off_peak boolean
Note: Temporarily unavailable
Off-peak mode. Off-peak mode consumes fewer credits. Tasks submitted in off-peak mode will be generated within 48 hours. Tasks not completed will be automatically cancelled and credits refunded
When true, generate video during off-peak hours; when false, generate video immediately
Options: true, false
Default: false
watermark boolean
Whether to add watermark. When true, add watermark; when false, do not add watermark
Currently watermark content is fixed and AI-generated, default is no watermark
Options: true, false
Default: false
wm_position integer
Watermark position, indicating where the watermark appears on the image
Options: 1 (top-left), 2 (top-right), 3 (bottom-right), 4 (bottom-left)
Default: 3
wm_url string
Watermark content, here is the image URL. When not provided, use default watermark: AI-generated content
meta_data string
Metadata identifier, JSON format string, pass-through field
You can use custom format or example format. Example below:
{
"Label": "your_label",
"ContentProducer": "yourcontentproducer",
"ContentPropagator": "your_content_propagator",
"ProduceID": "yourproductid",
"PropagateID": "your_propagate_id",
"ReservedCode1": "yourreservedcode1",
"ReservedCode2": "your_reserved_code2"
}
When this parameter is empty, default to vidu-generated metadata identifier
callback_url string
Callback URL
Polling
Since video generation takes time, you need to poll the task status after creation
The initial response returns the task ID and initial status. The actual generation results must be obtained by polling the task status endpoint
Response Format
error object
Error information. Only present when status is failed.
code
integerError code
error_message
stringDetailed error message
output array
Generation results. Only present when status is completed.
content
arrayList of generated content
type
stringResource type
Value:
videourl
stringGenerated content URL
usage object
Usage statistics. Only present when status is completed.
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information.
Error Codes
| Error Code | Description |
|---|---|
| 0 | No error |
| 008020095 | Internal generation error |
| 008020096 | Result parsing error |
| 008020097 | HTTP error response |
| 008020098 | Status check error |
| 008020099 | Task creation error |