Seedance 2.0
ByteDance video generation. Text-to-video and image-to-video, 4 to 15 seconds.
/api/v1/jobs/createTaskSeedance 2.0 is ByteDance's video generation model. It supports text-to-video and image-to-video with reference images, produces 4 to 15 seconds of 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 | Yes | Up to 5000 characters |
input.resolution | string | No | Currently 720p, defaults to 720p |
input.duration | number | No | 4 to 15 seconds, defaults to 5. Decimals are rounded |
input.ratio | string | No | adaptive, 16:9, 9:16, 1:1, 4:3, 3:4, or 21:9. Defaults to 16:9 |
input.generateAudio | boolean | No | Defaults to true |
input.imageUrls | string[] | No | Up to 9 publicly reachable reference images. Omit for text-to-video |
callBackUrl | string | No | Omit it and poll the query endpoint instead |
Reference videos (input.videoUrls) are not supported yet. Requests that include them are rejected.
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.
Pricing
| Resolution | Rate |
|---|---|
| 720p | 33 credits per second |
A 5-second video costs 165 credits ($0.825). Audio generation and the number of reference images do not change the price. Failed tasks are refunded in full automatically. See Pricing for details.