POST
/v1/media/v1/contents/generations/tasksSeedance 2.0 影片生成
Seedance 2.0 是 ATP 对外开放的影片生成模型。它支持文生影片、图生影片、首帧与尾帧控制、参考图、可选生成音讯,以及非同步任务轮询。
模型 ID
model 栏位请使用 seedance-2-0。其他 Seedance 变体可能存在于内部价格数据,但尚未公开显示在模型目录。
支持的生成模式#
媒体 roles#
参数#
范例#
文生影片#
Shell
curl "$ATP_BASE_URL/v1/media/v1/contents/generations/tasks" \
-H "Authorization: Bearer $ATP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"content": [
{
"type": "text",
"text": "A cinematic tracking shot of Taipei at night, neon reflections, smooth camera motion"
}
],
"resolution": "480p",
"ratio": "16:9",
"duration": 4,
"generate_audio": false
}'建立任务后会回传 cgt_... 形式的 task id。
图生影片#
JSON
{
"model": "seedance-2-0",
"content": [
{
"type": "text",
"text": "Animate this product shot with a slow premium studio push-in."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/product.jpg"
},
"role": "first_frame"
}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 4,
"generate_audio": false,
"return_last_frame": true
}首帧与尾帧#
JSON
{
"model": "seedance-2-0",
"content": [
{
"type": "text",
"text": "Create a smooth transition from morning to night with consistent camera framing."
},
{
"type": "image_url",
"image_url": {
"url": "asset://tya_first_frame"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "asset://tya_last_frame"
},
"role": "last_frame"
}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 6,
"return_last_frame": true
}取得结果#
Shell
curl "$ATP_BASE_URL/v1/media/v1/contents/generations/tasks/cgt_xxx" \
-H "Authorization: Bearer $ATP_API_KEY"持续轮询直到任务状态变成 succeeded、failed 或 canceled。成功时会回传影片 URL 与用量 metadata。
计费#
影片按 video tokens 计费:
Text
video_tokens = width × height × seconds × 24 ÷ 1024
cost = video_tokens × resolution_rate任务失败不计费。最便宜的端到端 smoke test 可用 480p、duration: 4、generate_audio: false。
$0.07
$0.0538
这页有帮助吗?