Seedance 2.5
Doubao Seedance 2.5 asynchronous video generation. Supports text, image, video, and audio references; first/last frames; video editing and extension; native audio; optional content moderation; 480p/720p/1080p output; and automatic or 4-30 second duration.
價格
$0.216/秒
端點
/videos
交付模式
非同步任務生命週期
可用狀態
目前可用
API 文件
設定並複製請求
選擇這個模型支援的選項,下面的程式碼會即時更新。
https://www.aisplice.store/v1/videosBearer API key非同步任務選項這裡只顯示目前模型已公開支援的選項。
# Requires curl and jq
API_KEY="${API_KEY:-YOUR_API_KEY}"
# 1. Submit once
SUBMITTED=$(curl --fail-with-body -sS https://www.aisplice.store/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: model-docs-$(date +%s)-$$" \\
-d '{
"model": "Seedance 2.5",
"prompt": "A cinematic scene with careful composition",
"nsfw_check": false,
"duration": 5,
"resolution": "720p",
"metadata": {
"generate_audio": true,
"watermark": false,
"output_format": "mp4",
"return_last_frame": false
},
"size": "1:1"
}')
TASK_ID=$(printf '%s' "$SUBMITTED" | jq -r '.task_id // .id // empty')
if [ -z "$TASK_ID" ]; then
printf '%s\n' "$SUBMITTED" >&2
exit 1
fi
echo "task_id=$TASK_ID"
# 2. Poll until terminal
while true; do
STATUS_JSON=$(curl --fail-with-body -sS \
"https://www.aisplice.store/v1/videos/$TASK_ID" \
-H "Authorization: Bearer $API_KEY")
STATUS=$(printf '%s' "$STATUS_JSON" | jq -r '.status // empty' | tr '[:upper:]' '[:lower:]')
echo "status=$STATUS"
case "$STATUS" in
completed|succeeded|success) break ;;
failed|failure|cancelled|canceled)
printf '%s\n' "$STATUS_JSON" | jq .
exit 1
;;
esac
sleep 5
done
# 3. Fetch the final result
curl --fail-with-body -sS \
"https://www.aisplice.store/v1/videos/$TASK_ID/content" \
-H "Authorization: Bearer $API_KEY" | jq .- 1提交任務
- 2輪詢狀態
- 3取得結果內容
正式環境建議使用公開媒體網址。 先上傳本機檔案,再把 public_url 放入模型請求;避免傳送大體積 Base64 請求主體。
檢視上傳指南參數說明
model本次請求使用的精確模型識別碼。
doubao-seedance-2.5prompt描述期望結果的指令。
durationOutput seconds; -1 lets Seedance choose automatically.
-1456789101112131415161718192021222324252627282930resolution請求的輸出解析度。
480p720p1080psizeFirst/last-frame and edit modes require adaptive.
adaptive21:916:94:31:13:49:16imagesUp to 30 image references. Use image_tail with exactly one first-frame image for first/last-frame mode.
videosUp to 10 reference videos, each 2-30 seconds and no more than 30 seconds total.
回應流程
檢視任務狀態、終態和結果回應範例。
回應流程
檢視任務狀態、終態和結果回應範例。
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video",
"model": "Seedance 2.5",
"status": "queued"
}等待中
queued · submitted · in_progress · processing
成功
completed · succeeded · success
失敗
failed · failure · cancelled · canceled
錯誤與正式環境設定
檢視重試規則、冪等要求和最基本的正式環境檢查清單。
錯誤與正式環境設定
檢視重試規則、冪等要求和最基本的正式環境檢查清單。
400 / 422修正請求欄位或不支援的選項,不要原樣重試。
401檢查 API 金鑰是否存在、有效,並已以 Bearer Token 傳送。
402帳戶餘額不足。
409Idempotency-Key 正在處理中,或已被其他請求主體使用。
429按照 Retry-After 退避後再重試。
5xx使用指數退避重試,並保留原始 Idempotency-Key。
- 面向公眾的行動裝置和瀏覽器應用程式應把 API 金鑰存放在伺服器端。
- 為每個會計費的非同步操作設定唯一 Idempotency-Key。
- 持久儲存 task_id,以便重啟後恢復輪詢。
- 為每個 HTTP 請求設定逾時,並在客服工單中提供請求 ID。
- 讀取即時模型後設資料,不要把價格和支援選項寫死在程式碼裡。
價格與檔位
較官方價省 20%按請求計價
$0.216/秒
$0.27
檔位定價
基準價 $0.216/秒
檔位定價——最終價格取決於請求的參數選項,未列出的檔位按基準價計費。 按生成內容的秒數計費。
二選一:未附參考素材時使用文生影片價格;附加圖片、影片或音訊參考素材時使用參考素材影片價格。兩組解析度價格不會疊加。
- 16:9×1$0.216/秒
- 1:1×1$0.216/秒
- 21:9×1$0.216/秒
- 3:4×1$0.216/秒
- 4:3×1$0.216/秒
- 9:16×1$0.216/秒
- adaptive×1$0.216/秒
- 480p×0.444814814815$0.09608/秒
- 720p×1$0.216/秒
- 1080p×1.781851851852$0.38488/秒
- 480p×0.266666666667$0.0576/秒
- 720p×0.6$0.1296/秒
- 1080p×1.064444444444$0.22992/秒
- 4×4$0.864
- 5×5$1.08
- 6×6$1.296
- 7×7$1.512
- 8×8$1.728
- 9×9$1.944
- 10×10$2.16
- 11×11$2.376
- 12×12$2.592
- 13×13$2.808
- 14×14$3.024
- 15×15$3.24
- 16×16$3.456
- 17×17$3.672
- 18×18$3.888
- 19×19$4.104
- 20×20$4.32
- 21×21$4.536
- 22×22$4.752
- 23×23$4.968
- 24×24$5.184
- 25×25$5.40
- 26×26$5.616
- 27×27$5.832
- 28×28$6.048
- 29×29$6.264
- 30×30$6.48
頁面顯示的價格即實際計費價格,呼叫失敗會自動退款。
相關模型