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
Customer-facing model ID used for the request.
Value: vidu-cn-reference2video-vidu2.0
input[].params.model string required
Upstream Vidu model value. Use vidu2.0.
images array[string] required
Reference images used to keep subjects consistent across the generated video.
prompt string required
Text description for video generation.
duration integer
Video duration in seconds.
resolution string
Video resolution, for example 720p.
callback_url string
Callback URL for asynchronous task notifications.
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 present when status is failed.
code
stringError code
message
stringDetailed error message
output array
Generation results, present when the request succeeds.
content
arrayList of generated resource content
type
stringResource type.
Value:
videourl
stringGenerated resource URL. Text utility endpoints may return a text field instead of a URL.
jobId
stringUpstream task ID.
usage object
Usage statistics, present when the request succeeds.
cost
stringTotal cost in USD.
discount
numberDiscount amount.
metadata object
Metadata information.