Seedance 2.0
Seedance 2.0
文件快速開始
API 總覽文生影片圖生影片
API 參考

API 總覽

了解 Seedance 2.0 Open API 的認證方式、提交流程、狀態查詢與 Webhook 回調。

Seedance 2.0 Open API 支援你從自己的產品中非同步提交影片生成任務,並在處理完成後取得結果。

Base URL

https://www.seedance2.ink

Authentication

所有 Open API 請求都使用在 Seedance 控制台建立的 Bearer Token。

Authorization: Bearer sd2_live_your_api_key
{
  "success": false,
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key"
  }
}

接入流程

  1. 在 Seedance 控制台建立 API Key。
  2. 使用 POST /api/open/v1/video/generations 提交生成任務。
  3. 保存回傳的 requestId。
  4. 輪詢 GET /api/open/v1/video/generations/{requestId} 直到任務完成。
  5. 如有需要,可用 Webhook 接收完成通知。

核心介面

MethodEndpointDescription
GET/api/open/v1/models取得可用模型、時長、比例、解析度與計費資訊。
POST/api/open/v1/video/generations建立新的影片生成任務。
GET/api/open/v1/video/generations/{requestId}查詢任務狀態,並在完成後取得輸出影片地址。
POST/api/open/v1/video/generations/{requestId}/cancel取消仍在排隊或處理中的任務。

Available Models

ModelBest forSupported durationsResolutions
seedance-2.0Highest quality, multimodal generation4-15 seconds480p, 720p, 1080p
seedance-2.0-fastFaster turnaround4-15 seconds480p, 720p, 1080p
seedance-1.5-proLower-cost fallback workloads5 or 10 seconds480p, 720p, 1080p

Supported aspect ratios:

  • 16:9
  • 9:16
  • 1:1

狀態值

StatusDescription
queued請求已接受,正在排隊。
processing任務正在生成中。
succeeded任務已成功完成,output.url 可用。
failed任務失敗,請查看 error 欄位。
cancelled任務在完成前已取消。

Models Endpoint Example

curl https://www.seedance2.ink/api/open/v1/models
{
  "success": true,
  "data": [
    {
      "id": "seedance-2.0",
      "type": "video_generation",
      "mode": "image_to_video",
      "durations": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
      "aspectRatios": ["16:9", "9:16", "1:1"],
      "resolutions": ["480p", "720p", "1080p"],
      "usdPerSecond": {
        "480p": 0.05,
        "720p": 0.1,
        "1080p": 0.2
      }
    }
  ]
}

Webhook

你可以在單次請求中傳入 webhookUrl,也可以在 API Key 層級設定預設回調地址。

  • 若兩者同時存在,單次請求中的 webhookUrl 優先。
  • 如果 API Key 設定了 Webhook Secret,回調請求會附帶 x-seedance-signature。
  • Webhook 僅在任務進入終態時送出。
x-seedance-signature: <hex_sha256_hmac>
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "succeeded",
  "output": {
    "type": "video",
    "url": "https://pub-your-bucket.r2.dev/open-api-results/req_1234567890.mp4"
  },
  "error": null
}

錯誤碼

HTTP statusError codeDescription
400invalid_request請求體不符合介面要求。
401unauthorizedAPI Key 缺失或無效。
402insufficient_credits帳戶點數不足,無法建立任務。
404not_found目前 API Key 下找不到對應任務。
429rate_limited超出每分鐘限制或月度配額。
500internal_error伺服器發生未預期錯誤。

下一步

  • 閱讀 文生影片
  • 閱讀 圖生影片

快速開始

最快速上手 Seedance 2.0 的方式。

文生影片

使用 Seedance 2.0 Open API 透過文字提示詞生成影片。

目錄

Base URLAuthentication接入流程核心介面Available Models狀態值Models Endpoint ExampleWebhook錯誤碼下一步