Skip to main content

通用说明

  • 认证方式:Authorization: Bearer <api_key>
  • 响应封装:{ code, trace_id, message, data }

POST /v1/video/seedance-2

Content-Type

  • application/json

请求参数(JSON)

字段类型必填默认值说明
modelstringseedance_2_0支持:seedance_2_0 / seedance_2_0_fast
promptstring-提示词
function_modestringomni_reference支持:first_last_frames / omni_reference
ratiostring16:9支持:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16
durationint5秒,范围 4~15
image_urlsstring[][]图像 URL 列表
audio_urlsstring[][]音频 URL 列表
video_urlsstring[][]视频 URL 列表

约束校验

  • prompt 必填
  • model / ratio / functionMode 必须在支持列表
  • duration 必须在 4~15 秒
  • function_mode=first_last_frames 时图片最多 2 张
  • functionMode=omni_reference 时不允许仅音频,必须包含图片或视频
  • video_urls ≤ 3、image_urls ≤ 9、audio_urls ≤ 3

成功响应(data)

{
  "task_id": "record_id",
  "status": "running",
  "created_at": "2024-01-01T12:00:00Z",
  "credits_cost": 12.0
}

cURL 示例(JSON)

curl -X POST "https://<host>/v1/video/seedance-2" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance_2_0",
    "prompt": "A futuristic city at sunset",
    "functionMode": "omni_reference",
    "ratio": "16:9",
    "duration": 5,
    "image_urls": [],
    "audio_urls": [],
    "video_urls": []
  }'