Image to Video
POST https://api.vidu.com/ent/v2/img2video
Request Header
Field | Value | Description |
---|---|---|
Content-Type | application/json | Data Exchange Format |
Authorization | Token {your api key} | Replace {} with your API key |
Request Body
Field | Type | Required | Description |
---|---|---|---|
model | String | Required | Model name Accepted values: viduq1 vidu2.0 vidu1.5 |
images | Array[String] | Required | An image to be used as the start frame of the generated video For fields that accept images: - Only accepts 1 image - 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 length of the base64 decode must be under 10MB, and it must include an appropriate content type string. For instance,
|
prompt | String | Optional | Text prompt A textual description for video generation, with a maximum length of 1500 characters |
duration | Int | Optional | Video duration. Default values vary by model: - viduq1: default 5s, available: 5 - vidu2.0 and vidu1.5: default 4s, available: 4, 8 |
seed | Int | Optional | Random seed - Defaults to a random seed number - Manually set values will override the default random seed |
resolution | String | Optional | Resolution (based on model & duration): - viduq1 (5s): default 1080p, options: 1080p - vidu2.0 and vidu1.5 (4s): default 360p, options: 360p, 720p, 1080p - vidu2.0 and vidu1.5 (8s): default 720p, options: 720p |
movement_amplitude | String | Optional | The movement amplitude of objects in the frame Defaults to auto, accepted value: auto small medium large |
bgm | Bool | Optional | Whether to add background music to the generated video. Default: false. Acceptable values: true, false. When true, the system will automatically add a suitable BGM. |
payload | String | Optional | transparent transmission parameters No processing, only data transmission,with a maximum length of 1048576 characters |
callback_url | String | Optional | 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). |
curl -X POST -H "Authorization: Token {your_api_key}" -H "Content-Type: application/json" -d '{"model": "viduq1","images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],"prompt": "The astronaut waved and the camera moved up.","duration": "5","seed": "0","resolution": "1080p","movement_amplitude": "auto"}' https://api.vidu.com/ent/v2/img2video
Response Body
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 - failedtask failed |
model | String | The parameter of the model used for this call |
images | Array[String] | The images used for this call |
prompt | String | The text prompt used for this call |
duration | Int | The video duration parameter used for this call |
seed | Int | The random seed parameter used for this call |
resolution | String | The resolution parameter used for this call |
bgm | bool | The bgm parameter used for this call |
movement_amplitude | String | The camera movement amplitude parameter used for this call |
payload | String | The payload parameter used for this call |
created_at | String | Task creation time |
{"task_id": "your_task_id_here","state": "created","model": "viduq1","images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],"prompt": "The astronaut waved and the camera moved up.","duration": 5,"seed": random_number,"resolution": "1080p","movement_amplitude": "auto","payload":"","created_at": "2025-01-01T15:41:31.968916Z"}