Seedance 2.0 Mini


Seedance 2.0 Mini 提供快速视频生成功能。它可根据文本提示词生成 4 至 15 秒的视频,并支持多种宽高比、音频生成和增强型网页搜索功能。参考图片宽度限制300px-6000px。

bytedance/seedance-2-0-mini

1. 认证

API 使用 API Key 进行认证。

获取你的 API Key

https://icreat.ai/hub/keys 获取你的 API key。

2. 调用 API

提交请求

使用 cURL 提交 HTTP 请求以启动任务:

curl --fail-with-body --connect-timeout 10 --max-time 60 \
  -X POST https://api.icreat.ai/v1/task/submit/bytedance/seedance-2-0-mini \
  -H "Authorization: Bearer ${ICREAT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "content": [
    {
      "type": "text",
      "text": "A golden retriever running on a beach at sunset in slow motion"
    }
  ],
  "ratio": "16:9",
  "resolution": "1080p",
  "duration": 5
}'

服务器将返回类似如下的响应体:

{ "task_id" : "task-xxx"}

使用 task_id 轮询状态并获取结果。

3. 轮询状态

curl --connect-timeout 10 --max-time 60 \
  -X POST "https://api.icreat.ai/v1/task/query-status" \
  -H "Authorization: Bearer ${ICREAT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "task_id": "task-xxx"
}'

服务器将返回任务状态。当状态为 SUCCEEDED 时,你可以获取结果。

4. 获取结果

curl --connect-timeout 10 --max-time 60 \
  -X POST "https://api.icreat.ai/v1/task/get-result" \
  -H "Authorization: Bearer ${ICREAT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "task_id": "task-xxx"
}'

服务器将返回此任务的输出。

5. Schema

顶层

API 使用多模态输入结构。content 是必填数组,支持文本、图像、视频和音频引用的任意组合。

字段 类型 必填 描述
content object[] 多模态内容数组。请参见下方 schema
generate_audio boolean 是否生成音频
ratio string 输出宽高比。支持的值:16:94:31:13:49:1621:9adaptive。设置为 adaptive 时,模型会根据输入自动选择最合适的宽高比
resolution string 输出分辨率。支持的值:480p720p
duration integer 视频时长,单位为秒。接受 415 的整数,或使用 -1 让模型自动选择时长
watermark boolean 是否添加“AI Generated”水印
tools object[] 要使用的工具列表

content[]

字段 类型 必填 描述
type string 内容类型:textimage_urlvideo_urlaudio_url
text string 条件必填 type=text 时必填。支持中文、英文、日文、印尼文、西班牙文和葡萄牙文
image_url object 条件必填 type=image_url 时必填。格式:{"url":"https://..."}
video_url object 条件必填 type=video_url 时必填。格式:{"url":"https://..."}
audio_url object 条件必填 type=audio_url 时必填。格式:{"url":"https://..."}
role string 媒体必填 媒体角色:reference_imagereference_videoreference_audiofirst_framelast_frame
need_review boolean 是否将参考内容提交官方审核。当参考内容包含人脸或受版权保护的 IP 时,请将其设置为 true

中文提示词不得超过 2000 个字符,英文提示词不得超过 2000 个单词。过长的提示词可能会稀释信息,导致模型忽略某些细节。

need_review 指南

  • 如果参考内容包含人脸或受版权保护的 IP,请将 need_review 设置为 true;否则生成很可能失败。
  • 如果需要审核的内容在提交时将 need_review 设置为 false,任务很可能失败。
  • 如果不需要审核的内容在提交时将 need_review 设置为 true,生成可能需要更长时间。

参考图像

  • 支持的格式:jpegpngwebpbmptiffgifheicheif
  • 宽高比(宽/高):0.4-2.5
  • 宽度和高度:300-6000 px
  • 每张图像最大大小:小于 30 MB
  • 最大请求体大小:64 MB

支持以下模式:

  1. 首帧模式 提供一个 image_url 项,并将其 role 设置为 first_frame

  2. 首尾帧模式 提供两个 image_url 项,并分别将它们的角色设置为 first_framelast_frame

  3. 参考图像模式 提供 1-9 个 image_url 项,并将每张图像的 role 设置为 reference_image

参考视频

  • 支持的格式:mp4mov
  • 支持的分辨率:480p720p1080p4k
  • 每个视频时长:2-15
  • 参考视频最大数量:3
  • 所有参考视频的总时长最大值:15
  • 宽高比(宽/高):0.4-2.5
  • 宽度和高度:300-6000 px
  • 总像素数:409600-8295044
  • 每个视频最大大小:200 MB
  • 帧率:24-60 FPS
容器格式 扩展名 MIME 类型 支持的编解码器
MP4 .mp4 video/mp4 视频:H.264/AVC、H.265/HEVC;音频:AAC、MP3
QuickTime .mov video/quicktime 视频:H.264/AVC、H.265/HEVC;音频:AAC、MP3

参考音频

  • 支持的格式:wavmp3
  • 每个音频文件时长:2-15
  • 参考音频文件最大数量:3
  • 所有参考音频文件的总时长最大值:15
  • 每个音频文件最大大小:15 MB
  • 最大请求体大小:64 MB
  • 不建议对大文件使用 Base64 编码

tools[]

字段 类型 必填 描述
type string 工具类型。目前仅支持 web_search

6. 输入示例

6.1 文本转视频

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    }
  ],
  "generate_audio": true,
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}

6.2 不带水印

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    }
  ],
  "generate_audio": true,
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p",
  "watermark": false
}

6.3 启用 web_search

{
  "content": [
    {
      "type": "text",
      "text": "A kitten plays the piano under the Eiffel Tower"
    }
  ],
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p",
  "tools": [
    {
      "type": "web_search"
    }
  ]
}

6.4 图像转视频 - 首帧

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/reference.jpg"
      },
      "role": "first_frame"
    }
  ],
  "generate_audio": true,
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}

6.5 图像转视频 - 首帧和尾帧

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "first_frame"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/last.jpg"
      },
      "role": "last_frame"
    }
  ],
  "generate_audio": true,
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}

6.6 参考图像

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "reference_image"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/last.jpg"
      },
      "role": "reference_image"
    }
  ],
  "generate_audio": true,
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}

6.7 参考图像 - need_review

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "reference_image",
      "need_review": true
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/last.jpg"
      },
      "role": "reference_image"
    }
  ],
  "generate_audio": true,
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}

6.8 参考内容转音频

{
  "content": [
    {
      "type": "text",
      "text": "A cat is playing a ball"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "reference_image"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/audio.mp3"
      },
      "role": "reference_audio"
    }
  ],
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}

6.9 视频编辑

{
  "content": [
    {
      "type": "text",
      "text": "Replace the cat in this video to the dog in the picture."
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/video.mp4"
      },
      "role": "reference_video"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/dog.jpg"
      },
      "role": "reference_image"
    }
  ],
  "ratio": "3:4",
  "duration": 5,
  "resolution": "480p"
}