seedance2.0-fast
seedance2.0-fast
ВидеоByteDanceSeedance 2.0-fastseedance2.0-fast

字节跳动最新一代视频模型

Аутентификация

Base URL
https://api.dreamtoai.com
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
Имя модели (model)
seedance2.0-fast

Протокол интеграции

Почему этот протокол

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

URL эндпоинта
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/json

JSON запроса и ответа

Запрос
{
  "model": "seedance2.0-fast",
  "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"
  }
}
Ответ
{
  "id": "job_example",
  "object": "job",
  "status": "processing",
  "model": "seedance2.0-fast",
  "created": 1710000000,
  "request_id": "req_example"
}

Поля запроса и ответа

Поля запроса
ПолеТипОбязательно
promptstringY
first_frame_urlimageN
last_frame_urlimageN
reference_image_urlsarrayN
reference_video_urlsarrayN
resolutionenumN
durationnumberN
aspect_ratioenumN
seedintegerN
callback_urlstringN
channelstringN
Поля ответа
ПолеТипОбязательно
output.task_idstringN
output.statusstringN
output.videos[]videoN

Примеры кода

cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/jobs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "seedance2.0-fast",
  "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://api.dreamtoai.com/v1/files/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "kind=video" \
  -F "purpose=reference" \
  -F "[email protected]"

# cURL для запроса статуса
# Замените job_example на task_id из ответа на отправку.
curl -X GET "https://api.dreamtoai.com/v1/jobs/job_example" \
  -H "Authorization: Bearer YOUR_API_KEY"