You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Media processing
VideoGeneration
Copy page
Download PDF
VideoGeneration
Description​
This interface generates videos from input text and images, including text-to-video and image-to-video.​
Notes​
This interface is in invitation-only testing. Contact your account manager to use it.​
Request syntax​
​
POST /?job_type=VideoGeneration&media_jobs HTTP/1.1​
Host: {BucketName}.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 08:05:36 +0000​
Content-Type: application/json​
Content-Length: <length>​
Authorization: authorization string​
​
{​
"GenerationConfig": {​
"Model": {​
"Name": "doubao-seedance-1.0-pro"​
},​
"Prompt": {​
"Text": "A woman in a green sequined dress stands against a pink backdrop, surrounded by colorful confetti.",​
"Frames": [​
"first-frame.png",​
"last-frame.png"​
]​
},​
"Video": {​
"Format": "mp4",​
"Resolution": "720p",​
"Duration": 5,​
"Ratio": "16:9",​
"Fps": 24,​
"Watermark": true,​
"CameraFixed": true​
}​
},​
"Output": {​
"Region": "cn-beijing",​
"Bucket": "testbkt",​
"Object": "output.mp4"​
}​
}​
​
Request parameters and headers ​
For common request headers, see Common Parameters.​
​
Field name​
Location​
Type​
Required​
Example value​
Description​
job_type​
Query​
String​
Yes​
VideoGeneration​
Task type; in video generation scenarios, the value is only VideoGeneration.​
media_jobs​
Query​
String​
Yes​
-​
Special identifier representing media task requests.​
​
Request body elements​
​
Field name​
Type​
Required​
Example value​
Description​
Model​
Container​
Yes​
-​
Doubao model information.​
Name​
String​
Yes​
doubao-seedance-1-0-pro​
Model name, currently only supports doubao-seedance-1-0-pro.​
Parent node: Model​
Version​
String​
No​
250528​
​
Model version, Name and Version are used to generate the model ID, for example​
doubao-seedance-1-0-pro-250528.​
tip​
When Version is empty, the system-recommended version is used by default.​
​
Parent node: Model​
Prompt​
Container​
Yes​
-​
Video generation prompt information.​
Text​
String​
Yes​
A woman wearing a green sequin dress stands in front of a pink background, surrounded by colorful confetti​
Text prompts for the text-to-video feature supporting both Chinese and English, limited to 500 bytes in length.​
Parent node: Prompt​
Frames​
​
[]String​
No​
[ "first-frame.png", "last-frame.png"]​
The image-to-video feature allows specifying images (up to two) using the following methods:​
  • Based on the "first frame" method (specify one image)​
  • Based on the "first and last frame" method (specify two images)​
tip​
The uploaded images must meet the following criteria:​
  • Image formats: jpeg, png, webp, bmp, tiff, gif​
  • Aspect ratio (width/height): (0.4, 2.5)​
  • Dimension (px): (300, 6000)​
  • Size: less than 30MB​
​
Parent node: Prompt​
Video​
Container​
Yes​
-​
Output video information.​
Format​
String​
No​
mp4​
Output video container format, currently fixed to mp4.​
Parent node: Video​
Resolution​
​
No​
480p​
Output video resolutions, available values are as follows:​
  • 480p​
  • 720p (default)​
  • 1080p​
tip​
The output video pixel dimensions vary with different Resolution and Ratio parameter combinations. For details, please refer to Width and height pixel values of output videos with different resolutions and aspect ratios.​
Parent node: Video​
Ratio​
​
No​
4:3​
Output video aspect ratio. The available values are as follows:​
  • 16:9 (default)​
  • 4:3​
  • 1:1​
  • 3:4​
  • 9:16​
  • 21:9​
tip​
The output video’s pixel dimensions vary according to different Resolution and Ratio parameter combinations. For details, please refer to Width and height pixel values of output videos with different resolutions and aspect ratios.​
Parent node: Video​
Duration​
Integer​
No​
5​
Output video duration (seconds), valid range [3, 12].​
Parent node: Video​
Fps​
Integer​
No​
24​
Video frame rate, currently fixed at 24.​
Parent node: Video​
Watermark​
Boolean​
No​
true​
Whether the generated video includes a watermark.​
Parent node: Video​
CameraFixed​
Boolean​
No​
true​
Whether the camera fixed.​
Parent node: Video​
​
Width and height pixel values of output videos with different resolutions and aspect ratios​
​
Video resolution​
Video aspect ratio​
​
​
​
​
​
​
16:9​
4:3​
1:1​
3:4​
9:16​
21:9​
480p​
864×480​
736×544​
640×640​
544×736​
480×864​
960×416​
720p​
1248×704​
1120×832​
960×960​
832×1120​
704×1248​
1504×640​
1080p​
1920×1088​
1664×1248​
1440×1440​
1248×1664​
1088×1920​
2176×928​
​
Response headers​
The response contains common headers. For more information, see Common Parameters.​
Response body elements​
​
Field name​
Type​
Example value​
Description​
Code​
String​
OK​
Status code.​
Message​
String​
Success​
Request status information.​
JobId​
String​
1852a9645b553232cdf10001fd35952a4b08​
Video generation task ID.​
​
Sample request​
​
POST /?job_type=VideoGeneration&media_jobs HTTP/1.1​
Host: {BucketName}.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 08:05:36 +0000​
Content-Type: application/json​
Content-Length: <length>​
Authorization: authorization string​
​
{​
"GenerationConfig": {​
"Model": {​
"Name": "doubao-seedance-1.0-pro"​
},​
"Prompt": {​
"Text": "A woman in a green sequined dress stands against a pink backdrop, surrounded by colorful confetti.",​
"Frames": [​
"first-frame.png",​
"last-frame.png"​
]​
},​
"Video": {​
"Format": "mp4",​
"Resolution": "720p",​
"Duration": 5,​
"Ratio": "16:9",​
"Fps": 24,​
"Watermark": true,​
"CameraFixed": true​
}​
},​
"Output": {​
"Region": "cn-beijing",​
"Bucket": "testbkt",​
"Object": "output.mp4"​
}​
}​
​
Sample response​
​
HTTP/1.1 204 OK​
Date: Fri, 30 Jul 2021 13:53:55 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
​
{​
"Code": "OK",​
"Message": "Success",​
"JobId": "1852a9645b553232cdf10001fd35952a4b08"​
}​
​
​
Last updated: 2026.02.10 15:12:57