跳到內容
開放式卡斯塔利控制台

影片

seedance-2.0 API

透過 Modelflare 非同步視訊路由使用準確的 seedance-2.0 模型 ID。

使用準確的型號 ID seedance-2.0。模型欄位必須與此頁面完全相符。

範例輸出seedance-2.0POST /v1/videos5.1s

參數: duration=5resolution=1080pratio=16:9

提示詞: One continuous take, no cuts. An empty indoor swimming pool at night, tiled walls and underwater lights. A swimmer in a chrome-finish suit stands on the edge and lifts both arms; the water answers by leaving the pool, rising as a single rotating column of turquoise that twists up past the roof beams and holds there, the emptied tiles glowing underneath. The camera starts low at the pool edge, cranes up alongside the column and tilts to look down into the drained basin. One hard cyan key from the underwater lights, warm sodium spill from the high windows. Real weight and inertia, spray and refraction, no text.

產生此樣本的請求
{
"model": "seedance-2.0",
"prompt": "One continuous take, no cuts. An empty indoor swimming pool at night, tiled walls and underwater lights. A swimmer in a chrome-finish suit stands on the edge and lifts both arms; the water answers by leaving the pool, rising as a single rotating column of turquoise that twists up past the roof beams and holds there, the emptied tiles glowing underneath. The camera starts low at the pool edge, cranes up alongside the column and tilts to look down into the drained basin. One hard cyan key from the underwater lights, warm sodium spill from the high windows. Real weight and inertia, spray and refraction, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

將 Modelflare API 金鑰與 https://modelflare.dev/v1 結合使用。網關入口點是POST /v1/videos。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0",
"content": [{"type": "text", "text": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot"}],
"resolution": "720p",
"duration": 5,
"generate_audio": false
}'

儲存任務ID。輪詢 GET /v1/videos/{task_id} 並使用 GET /v1/videos/{task_id}/content 下載。結果 URL 可能會過期,因此請立即傳輸檔案。

終端機視窗bash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Seedance 將 content[] 用於文字、框架和參考媒體;單獨的Seedance資產管理合約是獨立記錄的。

Seedance 使用一個非同步多模態包絡。將文字和媒體放入content[];媒體角色選擇第一幀/最後一幀或參考工作流程。

場 必填 註釋
model 是 seedance-2.0
content[] 是 text、image_url、video_url 和 audio_url;使用role來識別媒體目的
resolution 否 480p / 720p / 1080p / 4k(預設 720p)
ratio 否 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / adaptive
duration 否 4–15 秒
generate_audio 否 產生同步對話、效果與背景音頻
tools 否 僅在官方模型頁面支援的情況下使用web_search
watermark 否 是否添加浮水印

此型號支援 480p、720p、1080p 和 4k 輸出,持續時間為 4-15 秒。多模式參考最多允許九張影像、三個視訊和三個音訊剪輯;音訊不能單獨使用。在content[]中以role值標記媒體;第一幀、編輯、擴充和網路搜尋工作流程都有自己的限制。虛擬人像圖片必須先上傳至素材庫;Modelflare 不提供真人認證。

Seedance 2.0 系列支援文字到影片、第一幀/第一幀和最後一幀、多模式引用、編輯、擴展和文字到影片的網路搜尋。將媒體排序為文字、圖像、視頻,然後是音頻。

終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0",
"content": [
{"type": "text", "text": "@image1 performs the movement from @video1, paced to @audio1"},
{"type": "image_url", "image_url": {"url": "https://example.com/character.jpg"}, "role": "reference_image"},
{"type": "video_url", "video_url": {"url": "https://example.com/motion.mp4"}, "role": "reference_video"},
{"type": "audio_url", "audio_url": {"url": "https://example.com/music.mp3"}, "role": "reference_audio"}
],
"generate_audio": true, "ratio": "16:9", "duration": 11
}'
終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0", "content": [{"type": "text", "text": "Macro shot of cherry blossoms in spring"}],
"generate_audio": true, "ratio": "16:9", "duration": 11,
"tools": [{"type": "web_search"}]
}'

無效模型參數傳回帶有請求 ID 的 4xx。非同步任務建立成功後也可能進入失敗;使用輪詢回應中的 error_code 和 error_message 作為最終任務原因。不要使用不同的 JSON 形狀重試相同的請求。

此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。

此模型使用基於令牌的計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。

型號 ID 差異
seedance-2.0 本頁記錄的模型。
媒體合約 · v1

合約 ID: media.seedance-2-0.v1適配器: video.seedance.20.v1@v1指紋: dbd2efb454c0ce50d0600810a6ca4d7e5918dc2ebbaea6fdb8b1d9bf6b480a6f

官方來源: ByteDance / Volcengine

合約參數

意圖字段控制項選項
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:9 / adaptive
resolutionselect480p / 720p / 1080p / 4k
durationselect4 / 5 / 8 / 10 / 15
audioswitch—

支援的功能

  • allowed_values · ratio · 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive
  • allowed_values · resolution · 480p, 720p, 1080p, 4k
  • allowed_values · duration · 4, 5, 8, 10, 15
  • max_assets · reference_asset_ids · 15
  • prompt_optional_with_reference · prompt

結構化請求範例

text

意圖

{
  "audio": false,
  "duration": 4,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "480p"
}

提供者請求

{
  "content": [
    {
      "text": "A red paper kite over a quiet harbour at dusk.",
      "type": "text"
    }
  ],
  "duration": 4,
  "generate_audio": false,
  "model": "seedance-2.0",
  "ratio": "16:9",
  "resolution": "480p",
  "seconds": "4"
}

reference

意圖

{
  "audio": false,
  "duration": 4,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "480p"
}

提供者請求

{
  "content": [
    {
      "text": "A red paper kite over a quiet harbour at dusk.",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://example.com/reference.png"
      },
      "role": "reference_image",
      "type": "image_url"
    }
  ],
  "duration": 4,
  "generate_audio": false,
  "model": "seedance-2.0",
  "ratio": "16:9",
  "resolution": "480p",
  "seconds": "4"
}