Solutions
POST https://api.vidu.com/ent/v2/trending-replicate
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Filed
Required
Type
Description
video_url
Required
String
The initial Video you want to replicate
- Accepts public URL or Base64 format.
- Supported formats: mp4,mov
- Only input 1 video
- The duration of video must between 5s and 180s
- The post body of the HTTP request should not exceed 20MB, and it must include an appropriate content type string. For instance,
data:video/mp4;base64,{base64_encode}
images
Required
Array[String]
The images you want to generate(objects or model)
- Accepts 1-7 images
- Accepts public URL or Base64 format.
- Supported formats: png, jpeg, jpg, webp
- The aspect ratio of the images must be less than 1:4 or 4:1
- All images are limited to 50MB
- The post body of the HTTP request should not exceed 20MB, and it must include an appropriate content type string. For instance,
data:image/png;base64,{base64_encode}
prompt
Optional
string
Text prompt
A textual description for video generation, with a maximum length of 2000 characters
aspect_ratio
Optional
string
The aspect ratio of the output video
Defaults to 16:9, accepted: 16:9 9:16 1:1,4:3,3:4
resolution
Optional
String
Resolution parameter, ,default 1080p
enum:540p、720p、1080p
remove_audio
Optional
Bool
remove Initial Video sound or not
true:remove the sound
false:keep the sound
callback_url
Optional
string
Callback
When creating a task, you need to actively set the callback_url with a POST request. When the video generation task changes its status, Vidu will send a callback request to this URL, containing the latest status of the task. The structure of the callback request content will be the same as the return body of the GET Generation API.
The "status" in the callback response includes the following states:
- processing: Task is being processed.
- success: Task is completed (if sending fails, it will retry the callback three times).
- failed: Task failed (if sending fails, it will retry the callback three times).
Vidu uses a callback signature algorithm for verification, check out the details here: Callback Signature
Field
Type
Description
task_id
string
Task ID
state
string
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
images
Array[String]
The images used for this call
prompt
string
The text prompt used for this call
resolution
String
The resolution parameter used for this call
aspect_ratio
string
The aspect ratio parameter used for this call
remove_audio
string
This call remove Initial Video sound or not
credits
int
The credits used for this call
{
  "task_id": "your_task_id_here",
  "state": "created",
  "images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
  "prompt": "",
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "remove_audio": false,
  "credits":credits_number
}
GET https://api.vidu.com/ent/v2/tasks/{id}/creations
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Field
Type
Required
Description
id
String
Required
Task ID
Field
Subfield
Type
Description
id
String
TaskID
state
String
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
err_code
String
In case of an error, a specific error code will be returned.
credits
Int
The number of credits consumed by this task.
Unit: credits.
payload
String
The payload parameter used for this call
bgm
Bool
Whether to use bgm for this call.
off_peak
Bool
Whether to use off_peak mode for this call.
progress
Int
The progress of this call
creations
Array
Generated results
id
String
Creation id
url
String
The URL of the generated results, valid for one hour
cover_url
String
The cover URL of the generated results, valid for one hour
{
  "id":"your_task_id",
  "state": "success",
  "err_code": "",
  "credits": 400,
  "payload":""
  "creations": [
    {
      "id": "your_creations_id",
      "url": "your_generated_results_url",
      "cover_url": "your_generated_results_cover_url",
      "watermarked_url": "your_generated_results_watermarked_url"
    }
  ],
  "progress":90
}