API ReferenceVideo APIsSeedance

Seedance 2.5 API

ReachAPI 透過公開模型 ID seedance-2-5 和統一非同步影片任務介面提供 ByteDance Seedance 2.5。

  • 建立任務:POST /v1/vids/create
  • 查詢任務:GET /v1/tasks/{task_id}
  • 執行方式:非同步;輪詢任務介面或提供 callback_url
  • 模型 ID:seedance-2-5

認證

Authorization: Bearer YOUR_REACH_API_KEY
Content-Type: application/json

能力與價格

時長解析度比例輸入模式
430 的整數,或使用 -1 自動選擇480p720p21:916:94:31:13:49:16adaptive文字、圖片、影片、音訊及純音訊

input.content 必填且必須是非空陣列。promptimage_urlvideo_urls 等舊欄位不會被自動轉換。

影片輸入價格
input.content 不含 video_url$10.70 / 100 萬輸出 token
input.content 包含 video_url$6.40 / 100 萬輸出 token

計費依據是回傳的輸出 token,而非影片時長。ReachAPI 將 BytePlus usage.completion_tokens 映射為 usage.output_tokens,成功任務按該值結算。

建立任務

{
  "model": "seedance-2-5",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "A cinematic train journey through a mountain valley at sunrise"
      }
    ],
    "duration_seconds": 12,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "generate_audio": true,
    "watermark": false
  }
}

頂層參數

欄位類型必填說明
modelstring必須為 seedance-2-5
callback_urlstring接收任務終態的 HTTPS URL;最長 2048 字元;拒絕內網目標
inputobject影片生成參數

input 參數

欄位類型必填說明
contentobject 陣列非空的明確多模態輸入
resolutionstring480p720p
duration_secondsinteger430,或傳 -1 自動選擇時長
aspect_ratiostring條件必填支援的比例之一;首尾幀生成必須為 adaptive
generate_audioboolean請求生成音訊
watermarkboolean向模型傳遞浮水印選項
return_last_frameboolean請求模型回傳最後一幀圖片
output_formatstringmp4mov
priorityinteger09 的排程優先級
safety_identifierstring最長 64 字元的 ASCII 終端使用者安全識別碼

Seedance 2.5 不支援 seededit_modeextend_mode。編輯和續寫應透過參考內容加文字提示詞表達。

input.content

類型Role上限說明
text1提示詞或編輯指令
image_urlfirst_frame1首幀;未指定 role 的圖片也按首幀處理
image_urllast_frame1尾幀;必須同時提供首幀
image_urlreference_image圖片合計 30主體、場景或風格參考
video_urlreference_video10動作、編輯或續寫參考
audio_urlreference_audio10音訊參考;支援純音訊輸入

URL 分別放在 image_url.urlvideo_url.urlaudio_url.url。用戶端素材必須是可公開存取的 https:// URL;HTTP、Base64、data: URL、裸 Base64 以及用戶端提交的 asset:// 均會被拒絕。

首尾幀不能與 reference_imagereference_videoreference_audio 混用。尾幀必須搭配首幀,所有首尾幀請求都必須明確設定 aspect_ratio=adaptive

請求範例

純音訊輸入並輸出 MOV

{
  "model": "seedance-2-5",
  "input": {
    "content": [
      {
        "type": "audio_url",
        "role": "reference_audio",
        "audio_url": { "url": "https://cdn.example.com/music.mp3" }
      }
    ],
    "duration_seconds": 20,
    "resolution": "720p",
    "aspect_ratio": "adaptive",
    "generate_audio": true,
    "output_format": "mov",
    "priority": 5
  }
}

參考影片編輯或續寫

{
  "model": "seedance-2-5",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "Continue this scene into a rainy night and preserve the camera movement"
      },
      {
        "type": "video_url",
        "role": "reference_video",
        "video_url": { "url": "https://cdn.example.com/source.mp4" }
      }
    ],
    "duration_seconds": 10,
    "resolution": "480p",
    "aspect_ratio": "16:9"
  }
}

不要加入 edit_modeextend_mode;操作由內容和提示詞共同定義。

回應、輪詢與回呼

提交回應:

{
  "code": 200,
  "msg": "",
  "status": "queued",
  "task_id": "task_xxx",
  "data": []
}

輪詢 GET /v1/tasks/task_xxx,直到 statussuccessfailed

{
  "code": 200,
  "msg": "",
  "status": "success",
  "task_id": "task_xxx",
  "data": [{ "url": "https://cdn.example.com/generated/video.mov" }],
  "usage": {
    "input_tokens": 0,
    "output_tokens": 102960,
    "total_tokens": 102960
  },
  "cost": { "spend": 1.101672 }
}

成功影片結果包含 data[].url。提供 callback_url 後,ReachAPI 會透過 POST 傳送相同結構的任務終態回應。

真人素材處理

BytePlus 可能要求真人或隱私肖像參考素材先存入素材庫。首次提交回傳該類錯誤時,ReachAPI 會將原始 HTTPS 素材上傳至目前 provider 的 Asset Library,在內部改寫後重試一次。用戶端仍只提交原始 HTTPS URL,不得提交 asset://

約束與錯誤

  • input.contentresolution 必填
  • 時長必須為 4-30-1;不支援 1080p
  • 最多 1 個文字、30 張圖片、10 個影片和 10 個音訊
  • video_url 必須使用 reference_videoaudio_url 必須使用 reference_audio
  • 未知欄位、不支援的舊欄位和無效素材 URL 回傳 400
  • 401 表示 API Key 無效,402 表示餘額不足,422 表示安全拒絕,429 表示限流

On this page