创建视频生成任务,支持文本生成视频、图生视频等多种模式。
| 参数名 | 必填 | 说明 | 示例 |
|---|---|---|---|
| Authorization | 是 | 鉴权 Token。格式:Bearer API_KEY | Bearer sk-123456… |
| Content-Type | 是 | 内容类型。固定为 application/json | application/json |
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| model | string | 是 | 模型名称 |
| content | array | 是 | 视频内容描述(文本或图片) |
| duration | int | 是 | 视频时长(秒) |
| resolution | string | 是 | 分辨率,如 "720p", "1080p" |
| ratio | string | 是 | 宽高比,如 "16:9", "9:16" |
| timeout | int | 否 | 最大超时时间(秒) |
| provider_specific | object | 否 | 厂商特定参数(JSON 对象) |
content 数组用于描述视频内容,支持文本、图片两种类型。每个元素包含以下字段:
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| type | string | 是 | 内容类型: "text"、"image" |
| text | string | 否 | 当 type 为 "text" 时,填写文本内容(提示词) |
| url | string | 否 | 当 type 为 "image" 时,填写图片 URL(支持 http/https 链接及 data URL) |
| role | string | 否 | 当 type 为 "image" 时,指定图片作用;SenseAudio-Video-1.0 使用 reference,Seedance-Pro-1.5 使用 first_frame、last_frame |
| 模型名 | 支持参数说明 | 不支持参数说明 |
|---|---|---|
| SenseAudio-Video-1.0 | 1. ratio需为合法宽高比格式,如 16:9、9:16 2. resolution可选:720p 3. duration仅支持:10、15 秒 4. content支持:text(必填)、image(可选,最多 1 张,role固定为reference) | 不支持 first_frame / last_frame,不支持 provider_specific |
| Seedance-Pro-1.5 | 1. ratio可选:9:16, 16:9, 1:1, 4:3, 3:4 2. resolution可选:720p, 1080p 3. duration可选:2至12秒之间的整数 4. content支持:text(必填)、image(可选,role可为first_frame或last_frame,last_frame需与first_frame同时传入) 5. provider_specific可选:generate_audio(bool,生成音频)、camera_fixed(bool,镜头固定) |
SenseAudio-Video-1.0 — 文本生成视频
curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "SenseAudio-Video-1.0",
"content": [
{"type": "text", "text": "黄昏下的海边,海浪轻轻拍打礁石,镜头缓慢推进"}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 10
}'SenseAudio-Video-1.0 — 参考图生视频
curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "SenseAudio-Video-1.0",
"content": [
{"type": "text", "text": "一个人在咖啡馆窗边阅读,画面自然运镜"},
{"type": "image", "url": "https://example.com/reference.jpg", "role": "reference"}
],
"resolution": "720p",
"ratio": "9:16",
"duration": 15
}'Seedance-Pro-1.5 — 文本生成视频
curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Seedance-Pro-1.5",
"content": [
{"type": "text", "text": "一只可爱的小猫在花园里玩耍"}
],
"resolution": "1080p",
"ratio": "16:9",
"duration": 8,
"provider_specific": {"generate_audio": true, "camera_fixed": false}
}'Seedance-Pro-1.5-首帧图生视频
curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Seedance-Pro-1.5",
"content": [
{"type": "text", "text": "一只可爱的小猫在花园里玩耍"},
{"type": "image", "url": "https://example.com/first.jpg", "role": "first_frame"}
],
"resolution": "1080p",
"ratio": "16:9",
"duration": 8,
"provider_specific": {"generate_audio": false, "camera_fixed": true}
}'Seedance-Pro-1.5 — 首尾帧图生视频
curl -X POST "https://api.senseaudio.cn/v1/video/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Seedance-Pro-1.5",
"content": [
{"type": "text", "text": "一只可爱的小猫在花园里玩耍"},
{"type": "image", "url": "https://example.com/first.jpg", "role": "first_frame"},
{"type": "image", "url": "https://example.com/last.jpg", "role": "last_frame"}
],
"resolution": "1080p",
"ratio": "16:9",
"duration": 8,
"provider_specific": {"generate_audio": false, "camera_fixed": true}
}'SenseAudio-Video-1.0 的 image role 固定为 referenceSeedance-Pro-1.5,当使用首帧图生视频时,只上传一张图片,role为 first_frameSeedance-Pro-1.5,当使用首尾帧图生视频时,需要上传两张图片,首帧图片的role为first_frame,尾帧图片的role为last_frameSeedance-Pro-1.5 支持Seedance-Pro-1.5 示例:{"generate_audio": true, "camera_fixed": false},不支持的字段会被过滤| 参数名 | 类型 | 描述 |
|---|---|---|
| task_id | string | 任务 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": "SenseAudio-Video-1.0",
"content": [
{
"type": "text",
"text": "一只可爱的小猫在花园里玩耍"
}
],
"resolution": "720p",
"ratio": "16:9",
"duration": 10
}'创建任务后,使用返回的 task_id 使用任务查询文档查询任务进度。