跳转到主要内容
POST
/
v1
/
video
/
create
curl --request POST \
  --url https://api.senseaudio.cn/v1/video/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "model": "doubao-seedance-2-0-260128",
    "content": [],
    "duration": 10,
    "resolution": "720p",
    "ratio": "16:9",
    "timeout": 88200,
    "watermark": true,
    "provider_specific": {
      "generate_audio": true,
      "camera_fixed": true
    }
  }'
{
  "task_id": "task_1234567890"
}

Documentation Index

Fetch the complete documentation index at: https://docs.senseaudio.cn/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url https://api.senseaudio.cn/v1/video/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "model": "doubao-seedance-2-0-260128",
    "content": [],
    "duration": 10,
    "resolution": "720p",
    "ratio": "16:9",
    "timeout": 88200,
    "watermark": true,
    "provider_specific": {
      "generate_audio": true,
      "camera_fixed": true
    }
  }'

说明

创建视频生成任务,支持 Seedance 系列模型的文本生成视频、首尾帧图生视频、参考素材生成视频等模式。
视频生成为异步任务,创建成功后返回 task_id,请通过 查询视频生成状态 轮询进度与最终结果。

接口概览

项目
接口地址https://api.senseaudio.cn/v1/video/create
请求方式POST
Content-Typeapplication/json
鉴权方式Bearer Token

请求头

参数名必填说明示例
Authorization鉴权 Token,格式 Bearer API_KEYBearer sk-123456...
Content-Type固定为 application/jsonapplication/json

请求参数

顶层参数

参数名类型必填描述
modelstring模型名称
contentarray视频内容描述(文本、图片、音频或视频)
durationint视频时长(秒)
resolutionstring分辨率,如 480p720p1080p
ratiostring宽高比,如 16:99:16
timeoutint最大超时时间(秒),min:3600,max:172800
watermarkbool是否添加水印,默认添加
provider_specificobject厂商特定参数(JSON 对象)

content 元素

参数名类型必填描述
typestring内容类型:textimageaudiovideo
textstringtypetext 时,填写文本内容(提示词)
urlstringtypeimage 时,填写图片 URL(支持 http/https 及 data URL)
rolestringtypeimage 时,指定图片作用,取值见下表
audio_urlstringtypeaudio 时,填写音频 URL
video_urlstringtypevideo 时,填写视频 URL

模型说明

不同模型支持的参数、content 组合与 provider_specific 字段略有差异。请按所选模型参考对应说明与示例。
支持参数
  • ratio16:94:31:13:49:16
  • resolution480p720p
  • duration:4 ~ 15 秒之间的整数
  • provider_specific{"generate_audio": true}
content 组合(两种模式不可混用)
  • 首尾帧模式:text(可选,最多 1 条)+ image(仅 first_frame / last_frame,首帧必传,尾帧可选)
  • 参考素材模式:text(可选,最多 1 条)+ reference 图片(≤ 9 张)+ audio(≤ 3 条)+ video(≤ 3 条)
不支持同一请求中混用首尾帧与参考素材;不支持 camera_fixed;仅传 audio 不合法,必须至少搭配 imagevideo
代码示例
curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "doubao-seedance-2-0-260128",
  "content": [
    {"type": "text", "text": "黄昏海边,海浪轻轻拍打礁石,镜头缓慢推进"}
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 10,
  "watermark": true,
  "provider_specific": {"generate_audio": true}
}'

字段细则

  • doubao-seedance-2-0-260128支持 first_frame / last_framereference,两种模式不可混用
  • 该字段传入 JSON 对象,仅 doubao-seedance-2-0-260128支持
  • doubao-seedance-2-0-260128{"generate_audio": true},不支持 camera_fixed
  • 传入不支持的字段会直接忽略

素材格式要求

  • 格式:jpeg、png、webp、bmp、tiff、gif;
  • 宽高比(宽 / 高):(0.4, 2.5)
  • 宽高尺寸(px):(300, 6000)
  • 大小:单张 ≤ 30 MB,请求体 ≤ 64 MB;大文件请勿使用 Base64 编码
  • 格式:wav、mp3 - 时长:单条 [2, 15] s,最多 3 条,总时长 ≤ 15 s - 大小:单条 ≤ 15 MB,请求体 ≤ 64 MB;大文件请勿使用 Base64 编码
  • 格式:mp4、mov
  • 分辨率:480p、720p
  • 时长:单条 [2, 15] s,最多 3 条,总时长 ≤ 15 s
  • 宽高比(宽 / 高):[0.4, 2.5]
  • 宽高尺寸(px):[300, 6000]
  • 总像素数:[640×640=409600, 834×1112=927408]
  • 大小:单条 ≤ 50 MB
  • 帧率 (FPS):[24, 60]

响应结构

参数名类型描述
task_idstring任务 ID,用于查询视频生成状态
响应示例
{
  "task_id": "task_1234567890"
}

通用代码示例

curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "doubao-seedance-2-0-260128",
  "content": [
    {"type": "text", "text": "根据参考图生成一段自然运镜的商品短片"},
    {"type": "image", "url": "https://example.com/ref1.jpg", "role": "reference"}
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 10,
  "watermark": false,
  "provider_specific": {"generate_audio": true}
}'

注意事项

  • 内容描述text 元素建议清晰描述场景、动作、风格等信息,有助于提升稳定性 - 素材组合doubao-seedance-2-0-260128 的首尾帧模式与参考素材模式不可混用 - 音频限制:仅传 audio 不合法,必须至少搭配 imagevideo - 处理时间:视频生成耗时较长,建议使用轮询方式 查询任务状态

授权

Authorization
string
header
必填

格式:Bearer <API_KEY>

请求体

application/json
model
enum<string>
必填

模型名称

可用选项:
doubao-seedance-2-0-260128
示例:

"doubao-seedance-2-0-260128"

content
object[]
必填

视频内容描述(文本、图片、音频或视频)

示例:
[]
duration
integer
必填

视频时长(秒)。doubao-seedance-2-0-260128 取值 4-15

示例:

10

resolution
enum<string>
必填

分辨率。doubao-seedance-2-0-260128可选 480p

可用选项:
480p,
720p,
1080p
示例:

"720p"

ratio
enum<string>
必填

宽高比

可用选项:
16:9,
9:16,
4:3,
3:4,
1:1
示例:

"16:9"

timeout
integer

最大超时时间(秒),最小 3600,最大 172800

必填范围: 3600 <= x <= 172800
watermark
boolean
默认值:true

是否添加水印,默认 true

provider_specific
object

厂商特定参数

响应

200 - application/json

成功

task_id
string

任务 ID,用于查询视频生成状态

示例:

"task_1234567890"