Seedance 2.5 文生视频


Seedance 2.5 Text-to-Video 是一款基于参考文字进行多模态视频生成的工具,并支持视频编辑与扩展功能。

bytedance/seedance-2-5/text-to-video

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-5/text-to-video \
  -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": "720p",
  "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 视频时长,单位为秒。接受 430 的整数,或使用 -1 让模型自动选择时长
watermark boolean 是否添加“AI Generated”水印
tools object[] 要使用的工具列表

content[]

字段 类型 必填 描述
type string 内容类型:textimage_urlvideo_urlaudio_url
text string 条件必填 type=text 时必填。支持中文、英文、日文、印尼文、西班牙文和葡萄牙文

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
}