Seedance 2.0
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.0",
"input": {
"prompt": "A quiet mountain lake at sunrise",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"official_fallback": false
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance-2.0',
input: {
prompt: 'A quiet mountain lake at sunrise',
resolution: '720p',
duration: 5,
aspect_ratio: '16:9',
official_fallback: false
}
})
};
fetch('https://apistable.ai/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.ai/api/v1/tasks/create_task"
payload = {
"model": "seedance-2.0",
"input": {
"prompt": "A quiet mountain lake at sunrise",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"official_fallback": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}ByteDance
Seedance 2.0
使用提示词、首尾帧或多模态参考素材生成视频。
POST
/
api
/
v1
/
tasks
/
create_task
Seedance 2.0
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.0",
"input": {
"prompt": "A quiet mountain lake at sunrise",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"official_fallback": false
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance-2.0',
input: {
prompt: 'A quiet mountain lake at sunrise',
resolution: '720p',
duration: 5,
aspect_ratio: '16:9',
official_fallback: false
}
})
};
fetch('https://apistable.ai/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.ai/api/v1/tasks/create_task"
payload = {
"model": "seedance-2.0",
"input": {
"prompt": "A quiet mountain lake at sunrise",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"official_fallback": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}参数与输入模式
| 请求场景 | input 必填字段 |
|---|---|
| 文生视频 | prompt |
| 首帧或首尾帧 | first_frame_url。last_frame_url 可选。 |
| 参考素材生成 | reference_image_urls 或 reference_video_urls 至少一组非空。音频可选。 |
使用场景
将所选示例提交到创建任务接口。请把示例中的素材地址替换为你自己的公网 HTTPS 文件直链。 在提示词里用 @图片1、@视频1、@音频1 指定每种素材的用途。编号从 1 开始,分别对应各自数组中的顺序。需要严格指定首帧时,使用 first_frame_url。{
"model": "seedance-2.0",
"input": {
"prompt": "Morning mist drifts across a mountain lake as the camera moves forward.",
"duration": 5,
"aspect_ratio": "16:9"
}
}
{
"model": "seedance-2.0",
"input": {
"prompt": "Slowly pull back to reveal the valley.",
"first_frame_url": "https://cdn.example.com/start.jpg"
}
}
{
"model": "seedance-2.0",
"input": {
"prompt": "Move the camera slowly toward the cabin.",
"first_frame_url": "https://cdn.example.com/start.jpg",
"last_frame_url": "https://cdn.example.com/end.jpg",
"aspect_ratio": "adaptive",
"duration": 5
}
}
{
"model": "seedance-2.0",
"input": {
"reference_image_urls": [
"https://cdn.example.com/cabin.jpg"
],
"reference_video_urls": [
"https://cdn.example.com/camera-motion.mp4"
],
"duration": 5,
"prompt": "以 @图片1 中雾里的木屋门廊作为开场画面,沿用 @视频1 的第一人称运镜穿过走廊,推开门时逐渐拉高 @音频1 的背景音乐。",
"reference_audio_urls": [
"https://cdn.example.com/beat.mp3"
],
"generate_audio": true
}
}
{
"model": "seedance-2.0",
"input": {
"prompt": "咖啡店门口,店员拿起椅背上的围巾,朝正要出门的客人喊:「等一下,你的围巾忘拿了!」镜头对准店员的脸,清楚听到这句普通话,口型与台词同步。",
"generate_audio": true
}
}
{
"model": "seedance-2.0",
"input": {
"prompt": "Continue from this frame and move the camera through the doorway.",
"first_frame_url": "https://cdn.example.com/previous-last-frame.jpg",
"return_last_frame": true
}
}
衔接两段视频时,先为上一段传 return_last_frame=true,再把它返回的 result.items[].last_frame_url 用作下一段的 first_frame_url。
授权
登录 APIstable 后,在 API Key 管理 创建并复制密钥。
每次调用都要在 HTTP 请求头传入:
Authorization: Bearer YOUR_API_KEY
将 YOUR_API_KEY 替换为你创建的 API Key。
请求体
application/json
回调
POST{$request.body#/callback_url}Webhook
请求体
application/json
任务成功或失败后,APIstable 向创建任务时传入的 callback_url 发送 JSON POST。验签后返回 HTTP 2xx 确认接收。
用 data.status 判断生成结果。部分成功也返回 succeeded,结果只包含成功项。全部失败时为 failed,data.result 为 null,data.message 提供失败原因。
签名和去重使用 X-APIstable-Signature、X-APIstable-Timestamp 和 X-APIstable-Event-Id。详见 Webhook 安全与验签。
Webhook 请求体示例
{
"code": 200,
"msg": "success",
"data": {
"task_id": "c6adbc82-8b9a-4d6f-8b60-1114c8c4aafb",
"model": "seedance-2.0",
"status": "succeeded",
"created_at": "2026-11-13T08:30:00.000Z",
"completed_at": "2026-11-13T08:31:20.000Z",
"duration": 80000,
"charged_credits": 100,
"message": "",
"input": "{\"prompt\":\"A quiet mountain lake at sunrise\"}",
"result": {
"urls": [
"https://cdn.example.com/generated/video.mp4"
],
"items": [
{
"id": "e7aacd19-819a-4747-bbbf-46fb6f2995a5",
"urls": [
"https://cdn.example.com/generated/video.mp4"
],
"last_frame_url": null,
"draft": false,
"draft_expires_at": null
}
]
}
}
}
响应
2XX
已接收 Webhook。