Seedance 2.0
ByteDance video generation. Text-to-video, image-to-video, and multimodal references, 4 to 15 seconds.
/api/v1/jobs/createTaskSeedance 2.0 is ByteDance's video generation model. It supports text-to-video, first/last-frame image-to-video, and multimodal references, produces 4 to 15 seconds of 480p or 720p video, and can generate a matching audio track.
Set model to seedance-2.0. The request is asynchronous: store the returned taskId, then query the task or wait for the callback.
Request example
curl -X POST https://api.xbaiapi.com/api/v1/jobs/createTask \
-H "Authorization: Bearer xb-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0",
"input": {
"prompt": "a cat stretching on a sunlit windowsill",
"resolution": "720p",
"duration": 5,
"ratio": "16:9",
"generateAudio": true,
"imageUrls": []
},
"callBackUrl": "https://your-server.com/webhook"
}'Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | Fixed value seedance-2.0 |
input.prompt | string | Conditional | Up to 20480 characters; optional for first/last-frame image-to-video |
input.resolution | string | No | 480p or 720p, defaults to 720p |
input.duration | number | No | Integer seconds from 4 to 15, defaults to 5. Automatic duration -1 is currently unavailable |
input.ratio | string | No | adaptive, 16:9, 9:16, 1:1, 4:3, 3:4, or 21:9. Defaults to adaptive |
input.generateAudio | boolean | No | Defaults to true |
input.firstFrameUrl | string | No | First frame; providing it selects image-to-video and is required in that mode |
input.lastFrameUrl | string | No | Optional last frame; requires a first frame |
input.imageUrls | string[] | No | Up to 9 multimodal reference images, up to 30 MB each |
input.videoUrls | string[] | No | Up to 3 reference videos, 2 to 15 seconds and up to 50 MB each; total duration at most 15 seconds |
input.audioUrls | string[] | No | Up to 3 reference audio clips, 2 to 15 seconds and up to 50 MB each; total duration at most 15 seconds; requires a reference image or video |
input.webSearch | boolean | No | Text-to-video only; defaults to false |
input.realPersonMode | boolean | No | Image-to-video and multimodal only; defaults to true |
input.conversionSlots | string[] | No | Asset conversion slots; defaults to ["all"]; image-to-video accepts firstFrameUrl and lastFrameUrl; multimodal accepts image1 through image9 and video1 through video3 |
input.returnLastFrame | boolean | No | Request a last frame; defaults to false. The public task result still returns only the video |
input.seed | number | No | Integer from -1 to 2147483647; defaults to -1 |
callBackUrl | string | No | Omit it and poll the query endpoint instead |
Without media, the request uses text-to-video. firstFrameUrl selects first/last-frame image-to-video. Any reference media list selects multimodal generation. First/last frames cannot be combined with reference lists. Media can be a publicly reachable HTTP(S) URL or a Base64 media data URI. File sizes and durations are checked by the generation service.
Your account is charged by output duration. See pricing for CNY Token reference prices.
Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "xb_a1b2c3d4e5f6...",
"creditsCharged": 165
}
}When the task succeeds, read the video URL from resultJson.resultUrls in the query response.