Skip to Content
Video ModelsSeedance 2

Seedance 2

Overview

Seedance 2 is ByteDance’s high-quality video generation model that supports both text-to-video and image-to-video generation on Pixwith API.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwithapi.online/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “A cat walking in the garden”)
reference_urlsobjectConditionalReference media for Seedance 2. Required when using reference media. Omit for pure text-to-video mode.
reference_urls.reference_imagesarrayConditionalReference image URLs. Required when reference_urls is provided. Supports up to 9 images.
reference_urls.reference_audiosarrayNoReference audio URLs. Supports up to 3 audios. Each audio must be no longer than 15 seconds.
model_idstringYes2-47
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.aspect_ratiostringYesAspect ratio of the output. Valid values: '16:9', '4:3', '1:1', '3:4', '9:16', '21:9'. Default: '16:9'.
options.resolutionstringYesResolution of the output. Valid values: '480p', '720p', '1080p', '4K'. Default: '480p'.
options.durationintYesDuration in seconds. Valid values: 5, 10, 15. Default: 5.
options.enable_web_searchbooleanNoWhether to enable web search for generation. Default: false.
options.generate_audiobooleanNoWhether to generate audio with the video. Default: true.

Example Request - Text-to-Video

{ "prompt": "A cat walking in the garden", "model_id": "2-47", "options": { "prompt_optimization": true, "aspect_ratio": "16:9", "resolution": "720p", "duration": 10, "enable_web_search": false, "generate_audio": false } }

Example Request - With Reference URLs

{ "prompt": "Use the reference media to create a smooth cinematic video", "reference_urls": { "reference_images": [ "https://cdn.pixwithapi.online/images/example_1.jpeg", "https://cdn.pixwithapi.online/images/example_2.jpeg" ], "reference_audios": [ "https://cdn.pixwithapi.online/audios/example.mp3" ], "reference_videos": [ "https://cdn.pixwithapi.online/videos/example.mp4" ] }, "model_id": "2-47", "options": { "prompt_optimization": true, "aspect_ratio": "16:9", "resolution": "480p", "duration": 15, "enable_web_search": false, "generate_audio": true } }

Response Parameters

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 150 } }
Last updated on