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能力與價格
| 時長 | 解析度 | 比例 | 輸入模式 |
|---|---|---|---|
4 至 30 的整數,或使用 -1 自動選擇 | 480p、720p | 21:9、16:9、4:3、1:1、3:4、9:16、adaptive | 文字、圖片、影片、音訊及純音訊 |
input.content 必填且必須是非空陣列。prompt、image_url、video_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
}
}頂層參數
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
model | string | 是 | 必須為 seedance-2-5 |
callback_url | string | 否 | 接收任務終態的 HTTPS URL;最長 2048 字元;拒絕內網目標 |
input | object | 是 | 影片生成參數 |
input 參數
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
content | object 陣列 | 是 | 非空的明確多模態輸入 |
resolution | string | 是 | 480p 或 720p |
duration_seconds | integer | 否 | 4 至 30,或傳 -1 自動選擇時長 |
aspect_ratio | string | 條件必填 | 支援的比例之一;首尾幀生成必須為 adaptive |
generate_audio | boolean | 否 | 請求生成音訊 |
watermark | boolean | 否 | 向模型傳遞浮水印選項 |
return_last_frame | boolean | 否 | 請求模型回傳最後一幀圖片 |
output_format | string | 否 | mp4 或 mov |
priority | integer | 否 | 0 至 9 的排程優先級 |
safety_identifier | string | 否 | 最長 64 字元的 ASCII 終端使用者安全識別碼 |
Seedance 2.5 不支援 seed、edit_mode 或 extend_mode。編輯和續寫應透過參考內容加文字提示詞表達。
input.content
| 類型 | Role | 上限 | 說明 |
|---|---|---|---|
text | 無 | 1 | 提示詞或編輯指令 |
image_url | first_frame | 1 | 首幀;未指定 role 的圖片也按首幀處理 |
image_url | last_frame | 1 | 尾幀;必須同時提供首幀 |
image_url | reference_image | 圖片合計 30 | 主體、場景或風格參考 |
video_url | reference_video | 10 | 動作、編輯或續寫參考 |
audio_url | reference_audio | 10 | 音訊參考;支援純音訊輸入 |
URL 分別放在 image_url.url、video_url.url 或 audio_url.url。用戶端素材必須是可公開存取的 https:// URL;HTTP、Base64、data: URL、裸 Base64 以及用戶端提交的 asset:// 均會被拒絕。
首尾幀不能與 reference_image、reference_video 或 reference_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_mode 或 extend_mode;操作由內容和提示詞共同定義。
回應、輪詢與回呼
提交回應:
{
"code": 200,
"msg": "",
"status": "queued",
"task_id": "task_xxx",
"data": []
}輪詢 GET /v1/tasks/task_xxx,直到 status 為 success 或 failed。
{
"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.content與resolution必填- 時長必須為
4-30或-1;不支援1080p - 最多 1 個文字、30 張圖片、10 個影片和 10 個音訊
video_url必須使用reference_video;audio_url必須使用reference_audio- 未知欄位、不支援的舊欄位和無效素材 URL 回傳
400 401表示 API Key 無效,402表示餘額不足,422表示安全拒絕,429表示限流