Skip to content

Seedance2.0超分模型文档

官方折扣版请使用完整模型编码创建视频任务. 创建成功后返回 id, 请使用查询任务接口获取最终视频.

所有请求都需要在请求头中包含 Bearer token:

bash
Authorization: Bearer {{key}}

支持的模型

  • doubao-seedance-2.0-cf-720p
  • doubao-seedance-2.0-cf-1080p

Seedance2.0 超分版视频创建任务

可选字段. 完整模型编码已包含分辨率. 如传入该字段, 必须与模型编码中的分辨率一致.

参数类型说明
ratiostring输出比例,默认 16:9。可选值:16:99:161:14:33:421:9adaptive
durationinteger视频时长,单位秒,默认 5,范围 4-15
generate_audioboolean是否生成音频,默认 true
return_last_frameboolean是否返回尾帧图片,默认 false。设置为 true 且任务生成尾帧时,可在查询接口读取last_frame_url
toolsarray高级工具配置,默认不传。不同模型或场景支持的工具能力可能不同,请按实际开通能力传入。
seedinteger随机种子,默认 -1,表示由模型服务随机生成。传入固定值可提升生成结果的可复现性;模型生成仍存在概率性,不保证完全一致。
contentarray多模态内容数组。必须包含一个 type=text 的提示词。
content[].typestring内容类型:textimage_urlvideo_urlaudio_url
content[].rolestring素材角色:first_framelast_framereference_imagereference_videoreference_audio
content[].image_url.urlstring图片地址。支持公网 URL。如提前上传素材到素材库,也可传素材id,格式: assetId://{assetId}
content[].video_url.urlstring视频地址。支持公网 URL。如提前上传素材到素材库,也可传素材id,格式: assetId://{assetId}
content[].audio_url.urlstring音频地址。支持公网 URL。如提前上传素材到素材库,也可传素材id,格式: assetId://{assetId}

响应参数

参数类型说明
idstring视频生成任务 ID,用于查询任务状态和结果。
objectstring对象类型,固定为 video
createdinteger任务创建时间戳。
modelstring本次请求使用的模型名称。
statusstring任务状态,创建成功后通常为 queuedprocessing

状态说明

状态值说明
queued已创建,等待执行

请求报文示例

json
{
  "model": "doubao-seedance-2.0-cf-720p",
  "ratio": "16:9",
  "duration": 5,
  "return_last_frame": true,
  "generate_audio": false,
  "content": [
    {
      "type": "text",
      "text": "一只可爱的小猫在草地上玩耍,镜头缓慢推进,画面明亮自然"
    }
  ]
}
json
{
  "model": "doubao-seedance-2.0-cf-720p",
  "ratio": "16:9",
  "duration": 5,
  "return_last_frame": true,
  "content": [
    {
      "type": "text",
      "text": "图中女孩对着镜头说茄子,360 度环绕运镜"
    },
    {
      "type": "image_url",
      "role": "first_frame",
      "image_url": {
        "url": "https://example.com/first.jpeg"
      }
    },
    {
      "type": "image_url",
      "role": "last_frame",
      "image_url": {
        "url": "https://example.com/last.jpeg"
      }
    }
  ]
}
bash
curl --request POST \
  --url https://apiok.cc/v1/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-2.0-cf-720p",
    "ratio": "16:9",
    "duration": 5,
    "content": [
      {
        "type": "text",
        "text": "一只可爱的小猫在草地上玩耍,镜头缓慢推进,画面明亮自然"
      }
    ]
  }'
bash
curl --request POST \
  --url https://apiok.cc/v1/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-2.0-cf-720p",
    "ratio": "16:9",
    "duration": 5,
    "content": [
      {
        "type": "text",
        "text": "图中女孩对着镜头说茄子,360 度环绕运镜"
      },
      {
        "type": "image_url",
        "role": "first_frame",
        "image_url": {"url": "https://example.com/first.jpeg"}
      },
      {
        "type": "image_url",
        "role": "last_frame",
        "image_url": {"url": "https://example.com/last.jpeg"}
      }
    ]
  }'
json
{
    "id": "task_id",
    "task_id": "task_id",
    "object": "video",
    "status": "queued",
    "model": "doubao-seedance-2.0-cf-720p"
}

Seedance2.0 超分版查询任务

通过创建接口返回的 id 查询任务状态。

bash
Authorization: Bearer {{key}}

查询参数

参数类型说明
idstring创建任务返回的任务 ID。

响应参数

参数类型说明
idstring任务 ID。
task_idstring任务 ID。
objectstring对象类型,固定为 video
createdinteger任务创建时间戳。
modelstring本次任务使用的模型名称。
statusstring任务状态:queuedin_progresscompletedfailed
errorboject失败原因,任务失败时返回。
error.messagestring失败原因,任务失败时返回。
metadataobject视频信息。
metadata.urlstring视频下载地址

状态说明

状态值说明
queued已创建,等待执行
in_progress执行中
completed任务成功完成
failed任务执行失败
bash
curl --request GET \
  --url https://apiok.cc/v1/videos/:task_id \
  --header 'Authorization: Bearer {{key}}'
json
{
    "id": "task_id",
    "task_id": "task_id",
    "object": "video",
    "model": "doubao-seedance-2.0-cf-720p",
    "status": "completed",
    "progress": "100%",
    "created_at": 1784391301,
    "completed_at": 1784391572,
    "metadata": {
        "url": "https://apiok.cc/v1/videos/task_id/content"
    },
    "result_url": "https://apiok.cc/v1/videos/task_id/content"
}

视频下载

bash
curl --request GET \
  --url https://apiok.cc/v1/videos/:task_id/content \
  --header 'Authorization: Bearer {{key}}'

⚠️ 注意

如果想要加快视频生成的时间,可以提前调用以下素材创建接口,素材创建成功后(查询素材创建结果的Status为Active),在视频创建的时候url传入"assetId://{assetId}"

创建素材接口

  • assetType类型:Image(图片)、Video(视频)、Audio(音频)

  • 请求示例

bash
curl --location 'https://apiok.cc/v1/asset/create' \
--header 'Authorization: Bearer api密钥' \
--header 'Content-Type: application/json' \
--data '{
    "model": "doubao-seedance-2.0-cf-720p",
    "assetType": "Image",
    "url": "https://amzn-sub2api.s3.ap-southeast-1.amazonaws.com/newapi/uploads/1785745458553719000.png"
}'
  • 响应
json
{
    "code": "success",
    "message": "",
    "data": {
        "assetId": "asset-20260803172041-kt6gr"
    }
}
  • 成功code: "success"
  • 失败code: "failed", message: 失败原因

查询素材创建结果

  • 请求示例
bash
curl --location 'http://localhost:3301/v1/asset/result' \
--header 'Authorization: Bearer api密钥' \
--header 'Content-Type: application/json' \
--data '{
    "model": "doubao-seedance-2.0-cf-720p",
    "assetId": "asset-20260803172041-kt6gr"
}'
  • 响应示例
json
{
    "code": "success",
    "message": "",
    "data": {
        "assetType": "Image",
        "assetId": "asset-20260803172041-kt6gr",
        "Name": "",
        "status": "ACTIVE",
        "error": "失败的时候返回失败原因"
    }
}
  • 请求成功code: "success",失败"failed"

  • status包含以下状态,仅Active的时候素材才是可用的,其它状态素材均不可用

  • NONE:素材记录已创建,但尚未开始上传或处理。请稍后再次查询,当前不可提交任务。

  • UPLOADING:素材正在上传。请等待状态更新,当前不可提交任务。

  • PROCESSING:素材正在处理中。请稍后再次查询,当前不可提交任务。

  • ACTIVE:素材已处理完成且可用。只有此状态可以提交视频生成任务。

  • FAILED:素材处理失败。请查看 errorMessage,处理问题后重新提交素材。

  • EXPIRED:素材已过期,当前不可用。请继续查询并等待重新处理为 ACTIVE,必要时重新提交素材。

  • DELETED:素材已被删除或已失效,当前不可用。请重新提交素材并等待状态变为 ACTIVE。