Video Generation
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Model name, fixed value: doubao-seedance-2-0-260128 doubao-seedance-2-0-fast-260128 doubao-seedance-1-5-pro-251215
"doubao-seedance-2-0-260128" | "doubao-seedance-2-0-fast-260128" | "doubao-seedance-1-5-pro-251215"Information input to the model for video generation, supporting text, images, audio, videos, and sample task IDs. The following combinations are supported: Text; Text (optional) + Image; Text (optional) + Video; Text (optional) + Image + Audio; Text (optional) + Image + Video; Text (optional) + Video + Audio; Text (optional) + Image + Video + Audio. Video: The video here refers to a successfully generated sample video, based on which the model can generate a high-quality final video.
Input content type: text/image_url/video_url/audio_url/draft_task
Text prompt input to the model, describing the desired video to be generated. Prompt language support: All models support Chinese and English prompts; seedance 2.0 and seedance 2.0 fast additionally support Japanese, Indonesian, Spanish, and Portuguese. Prompt length recommendation: Chinese prompts should not exceed 500 characters, and English prompts should not exceed 1,000 words. Excessive length can lead to scattered information, causing the model to ignore details and focus only on key points, which may result in missing elements in the generated video.
The position or purpose of the image. Image-to-Video - First Frame. Supported models: All image-to-video models. Value for the role field: Requires 1 image_url object, and the role field can be omitted or set to: first_frame. Image-to-Video - First and Last Frames. Supported models: Seedance 2.0 series, Seedance 1.5 Pro. Value for the role field: Requires 2 image_url objects, and the role field is mandatory. The role field for the first frame image is: first_frame. The role field for the last frame image is: last_frame. Image-to-Video - Reference Image. Supported models: Seedance 2.0 series (1-9 images). Value for the role field: Mandatory, and the role field for each reference image must be: reference_image.
Image information, which can be an image URL, Base64-encoded image, or asset ID. Requirements for passing a single image: Format: jpeg, png, webp, bmp, tiff, gif. Additionally, Seedance 1.5 pro and Seedance 2.0 series models newly support heic and heif. Aspect ratio (width/height): (0.4, 2.5). Dimensions (px): (300, 6000). Size: A single image must be less than 30 MB. The request body size must not exceed 64 MB. Do not use Base64 encoding for large files. Number of images: Image-to-video - first frame: 1 image. Image-to-video - first and last frames: 2 images. Seedance 2.0 series multimodal reference video generation: 1 to 9 images.
Enter the public URL of the video or the virtual human video ID. Requirements for a single input video. Video format: mp4, mov; supported encoding formats are listed in the table below. Resolution: 480p, 720p, 1080p. Duration: The duration of a single video is [2, 15] s, with a maximum of 3 reference videos allowed, and the total duration of all videos must not exceed 15s. Dimensions: Aspect ratio (width/height): [0.4, 2.5]; width and height (px): [300, 6000]; total pixels: [640×640=409600, 2206×946=2086876], meaning the product of width and height must fall within the range of [409600, 2086876]. Size: A single video must not exceed 50 MB. Frame rate (FPS): [24, 60].
Enter the public URL or Base64 encoding for the audio. Requirements for single audio input: Format: WAV, MP3. Duration: The duration of a single audio clip is [2, 15] seconds. Up to 3 reference audio clips can be provided, and the total duration of all audio clips must not exceed 15 seconds. Size: A single audio file must not exceed 15 MB, and the request body size must not exceed 64 MB. Do not use Base64 encoding for large files.
Generate the final video based on the sample task ID. This feature is only supported by Seedance 1.5 pro.
Draft task ID. The platform will automatically reuse the user inputs from the Draft video (model, content.text, content.image_url, generate_audio, seed, ratio, duration, camera_fixed) to generate the final video. Other parameters can be specified; if not specified, the default values of this model will be used.
Enter the callback notification URL for the results of this generation task. When the status of the video generation task changes, Ark will push a POST request to this URL. The content structure of the callback request is consistent with the response body of the task query API. The status returned in the callback includes the following states: queued: Queued. running: Task running. succeeded: Task succeeded. (If the delivery fails, meaning no success acknowledgment is received within 5 seconds, the callback will be retried three times.) failed: Task failed. (If the delivery fails, meaning no success acknowledgment is received within 5 seconds, the callback will be retried three times.) expired: Task timed out, meaning the task has been in the running or queued state beyond the expiration time. The expiration time can be set via the execution_expires_after field.
true: Returns the last frame image of the generated video. When set to true, you can obtain the last frame image of the video through the Query Video Generation Task API. The last frame image is in PNG format, with the same width and height in pixels as the generated video, and is watermark-free. Using this parameter enables the generation of multiple consecutive videos: by using the last frame of the previously generated video as the first frame of the next video task, you can quickly generate multiple consecutive videos. For call examples, see the tutorial. false: Does not return the last frame image of the generated video.
Task timeout threshold. Specifies the expiration time (in seconds) after task submission, calculated from the created at timestamp. The default value is 172800 seconds, or 48 hours. Valid range: [3600, 259200]. Regardless of the service_tier used, it is recommended to set an appropriate timeout based on the business scenario. Once this time is exceeded, the task will be automatically terminated and marked as expired.
Controls whether the generated video includes audio synchronized with the visuals (supported only by the Seedance 2.0 series and Seedance 1.5 Pro). Note: All generated videos with audio are in mono, regardless of the number of channels in the input audio. true: The video output by the model includes synchronized audio. Based on the text prompt and visual content, the model automatically generates matching voices, sound effects, and background music. It is recommended to enclose dialogue in double quotes to optimize audio generation. For example: The man stops the woman and says, "Remember, you must never point at the moon with your finger." false: The video output by the model is silent.
Controls whether to enable draft mode. (Only supported by Seedance 1.5 pro) true: Enables draft mode to generate a preview video for quick verification of whether the scene structure, camera movement, subject motion, and prompt intent meet expectations. It consumes fewer tokens than normal videos, resulting in lower usage costs. false: Disables draft mode to generate a normal video. When draft mode is enabled, a Draft video is generated at 480p resolution (using other resolutions will cause an error), and the last frame return and offline inference features are not supported.
Configure the tools to be called by the model. Only supported by the Seedance 2.0 series.
Specify the tool type
The unique identifier of the end user, used to assist the platform in detecting users in your application who may violate the Volcengine Ark usage policies. This identifier must be an English string, fixed and unique for each individual user, with a length not exceeding 64 characters. It is recommended to pass a string generated by hashing the username, user ID, or email address to avoid leaking user privacy information.
Supported only by the Seedance 2.0 series. Sets the execution priority of the current request, determining its position in the queue. Value range: 0-9, where a higher value indicates a higher priority. By default, requests are executed in FIFO (First In, First Out) order. After setting a higher priority, the request will jump ahead of all lower-priority requests under the same Endpoint. Note: Requests with the same priority are still sorted in FIFO order. Priority only affects the queuing order and does not interrupt currently executing tasks (status=running). Priority only takes effect within the same Endpoint and does not affect other Endpoints. Priority configuration is not supported in offline inference mode (service_tier=flex).
Video resolution, enum values: 480p, 720p, 1080p (not supported by Seedance 2.0 fast). Default for Seedance 1.5 pro and Seedance 1.0 lite: 720p. Default for Seedance 1.0 pro & pro-fast: 1080p.
The aspect ratio of the generated video. See the table below for the pixel dimensions corresponding to different aspect ratios. 16:9 4:3 1:1 3:4 9:16 21:9 adaptive: Automatically selects the most suitable aspect ratio based on the input. Text-to-video: Default is 16:9 (Seedance 1.5 Pro defaults to adaptive). Image-to-video: Default is adaptive (the default for reference image-to-video scenarios is 16:9).
Duration of the generated video, in seconds. Specify either duration or frames; frames takes precedence over duration. If you wish to generate a video with a duration in whole seconds, it is recommended to specify duration. Seedance 1.5 pro: [4,12] or set to -1. Seedance 2.0 series: [4,15] or set to -1.
Integer seed used to control the randomness of generated content. Value range: an integer between -1 and 2^32-1.
Whether to fix the camera (not supported in reference image scenarios; currently unsupported in the Seedance 2.0 series). Enum values: true: Fix the camera. The platform will append a fixed camera instruction to the user prompt, but the actual effect is not guaranteed. false: Do not fix the camera.
Whether the generated video contains a watermark. Enum values: false: No watermark. true: Contains watermark.
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Number of Images
Video Duration in Seconds
Input Token Count
Total Token Count
Output Token Count
Validity Period
Task ID
Task Status
Status Information
Request ID
curl -X POST "https://api.ygw.ai/api/v1/video/generation" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seedance-2-0-260128", "content": [ { "type": "string" } ], "resolution": "string", "ratio": "string", "watermark": true }'{
"code": 0,
"data": {
"urls": [
"string"
],
"usage": {
"images": 0,
"seconds": 0,
"input_tokens": 0,
"total_tokens": 0,
"output_tokens": 0
},
"expired": "string",
"task_id": "string",
"task_status": "string"
},
"message": "string",
"request_id": "string"
}