Seedance 2.5, Seedance 2.5 CN, Seedance 2.0, Seedance 2.0 CN, Seedance 2.0 Fast, Seedance 2.0 Fast CN, Seedance 2.0 Mini, Seedance 2.0 Mini CN を実行します。動画リクエストごとにタスクが作成され、ポーリングまたは webhook 経由で結果を受け取ります。
ワークフローを選択するには mode を設定します。デフォルトは text_to_video です。モードを選択すると以下の例が更新されます。
https://api.mlmux.com/v1/videos/generationscurl https://api.mlmux.com/v1/videos/generations \
-H "Authorization: Bearer $MLMUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "model/seedance-2.5-max",
"prompt": "A cinematic tracking shot along a coastal road at sunrise, warm backlight, gentle camera drift",
"mode": "text_to_video",
"ratio": "16:9",
"resolution": "720p",
"duration": 8,
"generate_audio": true,
"route_mode": "official-cheap"
}'| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
model | string | はい | 下表に記載されているモデルID。 |
prompt | string | はい | シーン、被写体、動き、カメラワーク、ライティング、サウンドの指示。 |
mode | string | いいえ | text_to_video(デフォルト)、image_to_video、first_last_frame、またはmulti_ref。 |
ratio | string | いいえ | モデルで指定可能な場合、16:9、9:16、4:3、3:4、1:1、21:9、またはadaptive。デフォルトはadaptive。 |
resolution | string | いいえ | モデルで指定可能な解像度(480p、720p、1080p、または4K)。デフォルトは720p。 |
duration | integer | いいえ | クリップの長さ(秒単位、モデルの対応範囲内)。デフォルトは5。モデルに自動選択させる場合は-1を指定します。 |
generate_audio | boolean | いいえ | クリップと同期した音声を生成します。 |
route_mode | string | いいえ | officialまたはofficial-cheap。APIキーのroute modeが優先され、未設定の場合はofficial-cheapがデフォルトになります。 |
image_url | string | 条件付き | image_to_videoで必須:開始フレーム。 |
first_frame_urllast_frame_url | string | 条件付き | first_last_frameで必須。代わりに順序付きの2つのimage_urlsを送信することもできます。 |
image_urls | string[] | 条件付き | multi_ref用の参照画像。 |
video_urlsaudio_urls | string[] | 条件付き | multi_ref用の参照動画および音声。 |
multi_refには少なくとも1つの参照が必要です。Seedance 2.5は最大30枚の画像、10本の動画、10個の音声ファイル(合計50個)に対応しています。その他のモデルは最大9枚の画像、3本の動画、3個の音声ファイル(合計12個)に対応しています。公開されているhttps URLを使用するか、あらかじめPOST /v1/uploadsでファイルをアップロードしてください。
| モデル | モデルID | 解像度 | アスペクト比 | 再生時間 |
|---|---|---|---|---|
| Seedance 2.5 | model/seedance-2.5-max | 480p · 720p · 1080p | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜30秒 |
| Seedance 2.5 CN | model/seedance-2.5-cn-max | 480p · 720p · 1080p | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜30秒 |
| Seedance 2.0 | model/seedance-2.0-max | 480p · 720p · 1080p · 4K | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜15秒 |
| Seedance 2.0 CN | model/seedance-2.0-cn-max | 480p · 720p · 1080p · 4K | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜15秒 |
| Seedance 2.0 Fast | model/seedance-2.0-fast-max | 480p · 720p | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜15秒 |
| Seedance 2.0 Fast CN | model/seedance-2.0-fast-cn-max | 480p · 720p | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜15秒 |
| Seedance 2.0 Mini | model/seedance-2.0-mini-max | 480p · 720p | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜15秒 |
| Seedance 2.0 Mini CN | model/seedance-2.0-mini-cn-max | 480p · 720p | adaptive · 16:9 · 21:9 · 4:3 · 1:1 · 3:4 · 9:16 | 4〜15秒 |
これらのIDは末尾が-maxとなっているため、ratio、resolution、durationは任意であり、上記のデフォルト値にフォールバックします。
動画の作成リクエストは常にHTTP 202とタスクを返します。返されたidを保存し、poll_urlをポーリングしてください。statusがsucceededになると、レスポンスにvideo、usage、actual_charge_creditsが含まれます。
https://api.mlmux.com/v1/videos/generations/{task_id}{
"id": "task_01a9...",
"object": "video.generation.task",
"status": "queued",
"created": 1767225600,
"model": "model/seedance-2.5-max",
"api_method": "videos.generations.create",
"poll_url": "/v1/videos/generations/task_01a9...",
"progress": 0,
"message": "queued",
"estimated_charge_credits": 1.84
}{
"id": "task_01a9...",
"object": "video.generation.task",
"status": "succeeded",
"progress": 100,
"message": "completed",
"video": "https://.../generated/01a9....mp4",
"last_frame_image": "https://.../generated/01a9....jpg",
"usage": {
"output_tokens": 172800,
"video_seconds": 8,
"video_resolution": "720p"
},
"estimated_charge_credits": 1.84,
"actual_charge_credits": 1.79
}タスクが失敗した場合、statusはfailedとなり、messageにその理由が記載されます。出力URLはMLMuxによってホストされます。保存したいファイルはダウンロードしてください。
ポーリングの代わりに、request.succeededおよびrequest.failedをサブスクライブできます。ペイロードと署名の検証については、Webhooksをご覧ください。