seedance-2.0/text-to-video

seedance-2.0/text-to-video
视频ByteDanceSeedance 2.0文生视频
字节跳动最新一代视频模型

鉴权与连接

Base URL
https://backend:8000
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
模型名 (model)
seedance-2.0/text-to-video

接入协议

为什么选这个协议

适合需要提交任务并轮询状态的图像、视频、音频生成工作流。

接口地址
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/json

请求 / 响应 JSON

// REQUEST
{
  "model": "seedance-2.0/text-to-video",
  "input": {
    "prompt": "电影感街头运镜,一辆跑车穿过雨夜霓虹街道",
    "first_frame_url": "https://example.com/first.png",
    "last_frame_url": "https://example.com/last.png",
    "reference_image_urls": [
      "https://example.com/ref.png"
    ],
    "reference_video_urls": [
      "https://example.com/ref.mp4"
    ],
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "seed": 12345,
    "callback_url": "https://example.com/webhook",
    "channel": "byte2.0"
  }
}
// RESPONSE
{
  "id": "job_example",
  "object": "job",
  "status": "processing",
  "model": "seedance-2.0/text-to-video",
  "created": 1710000000,
  "request_id": "req_example"
}

请求字段 / 响应字段

// INPUT SCHEMA
字段类型必填
promptstringY
first_frame_urlimageN
last_frame_urlimageN
reference_image_urlsarrayN
reference_video_urlsarrayN
resolutionenumN
durationnumberN
aspect_ratioenumN
seedintegerN
callback_urlstringN
channelstringN
// RESPONSE SCHEMA
字段类型必填
output.task_idstringN
output.statusstringN
output.videos[]videoN

代码示例

cURLrequest.sh
curl -X POST "https://backend:8000/v1/jobs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "seedance-2.0/text-to-video",
  "input": {
    "prompt": "电影感街头运镜,一辆跑车穿过雨夜霓虹街道",
    "first_frame_url": "https://example.com/first.png",
    "last_frame_url": "https://example.com/last.png",
    "reference_image_urls": [
      "https://example.com/ref.png"
    ],
    "reference_video_urls": [
      "https://example.com/ref.mp4"
    ],
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "seed": 12345,
    "callback_url": "https://example.com/webhook",
    "channel": "byte2.0"
  }
}'

# 上传参考文件 cURL
curl -X POST "https://backend:8000/v1/files/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "kind=video" \
  -F "purpose=reference" \
  -F "file=@demo.mp4"

# 查询任务状态 cURL
# 将 job_example 替换为提交任务返回的 task_id
curl -X GET "https://backend:8000/v1/jobs/job_example" \
  -H "Authorization: Bearer YOUR_API_KEY"