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 used for the request
Value: viduq2_pro_reference
images array<string> required
Image references. Supports uploading 1 to 7 images. The model uses subjects from these images to generate videos with subject consistency.
Note 1: For this model, if no video is uploaded, 1 to 7 images are supported. If video is uploaded, 1 to 4 images are supported.
Note 2: Supports image Base64 input or image URL input (must be accessible).
Note 3: Supported image formats: png, jpeg, jpg, webp.
Note 4: Image resolution must be at least 128x128, aspect ratio must be less than 1:4 or 4:1, and file size must not exceed 50MB.
Note 5: HTTP request post body must not exceed 20MB, and encoding must include a proper content-type prefix, for example: data:image/png;base64,{base64_encode}.
videos array<string> required
Video references. Supports uploading 1 to 2 videos. The model uses these videos as references to generate videos with subject consistency.
Note 1: With video reference enabled, at most 1 video of 8 seconds or 2 videos of 5 seconds are supported.
Note 2: Supported video formats: mp4, avi, mov.
Note 3: Video resolution must be at least 128x128, aspect ratio must be less than 1:4 or 4:1, and file size must not exceed 100MB.
Note 4: Base64 decoded byte length must be less than 20MB, and encoding must include a proper content-type prefix, for example: data:video/mp4;base64,{base64_encode}.
prompt string required
Text prompt describing the video to generate.
Limit: Maximum 5000 characters.
bgm boolean
Whether to add background music to the generated video.
If set to true, the system automatically selects and adds suitable music from the preset BGM library. If omitted or set to false, no BGM is added.
BGM has no duration limit and is automatically adapted to video duration.
Note: In this model, when duration is 9 or 10, bgm does not take effect.
Options: true, false
Default: false
duration integer
Video duration parameter.
Options: 0 to 10 (0 means auto duration selection)
Default: 5
seed integer
Random seed. If omitted or set to 0, a random value is used. If set manually, the provided seed is used.
aspect_ratio string
Aspect ratio.
Options: 16:9, 9:16, 4:3, 3:4, 1:1
Default: 16:9
resolution string
Resolution parameter.
Options: 540p, 720p, 1080p
Default: 720p
payload string
Pass-through parameter. No processing is performed, only data transfer.
Limit: Maximum 1048576 characters.
off_peak boolean
Note: Temporarily unavailable
Off-peak mode.
true: Generate video in off-peak mode.
false: Generate video immediately.
Note 1: Off-peak mode consumes fewer credits.
Note 2: Tasks submitted in off-peak mode are generated within 48 hours. Unfinished tasks are automatically canceled and credits are refunded.
Note 3: You can also manually cancel off-peak tasks.
Note 4: Audio-video direct output does not support off-peak mode.
Options: true, false
Default: false
watermark boolean
Whether to add watermark.
true: Add watermark.
false: Do not add watermark.
Note 1: Current watermark content is fixed and AI-generated, and is disabled by default.
Note 2: You can obtain watermarked video content through the watermarked_url field.
Options: true, false
Default: false
wm_position integer
Watermark position.
1: Top-left
2: Top-right
3: Bottom-right
4: Bottom-left
Default: 3
wm_url string
Watermark image URL. If omitted, the default watermark is used (AI-generated).
meta_data string
Metadata identifier.
callback_url string
Callback URL.
Polling
Since result generation takes time, you need to poll the task status after creating the task.
The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.
See the examples on the right for polling requests and responses.
Response Format
error object
Error information. Only appears when status is failed.
code
integerError code
error_message
stringDetailed error message
output array
Generation result. Only appears when status is completed.
content
arrayGenerated content list
type
stringResource type
Value:
videourl
stringURL of generated content
usage object
Usage statistics. Only appears when status is completed.
cost
stringTotal cost (USD)
discount
numberDiscount amount
metadata object
Metadata information.