POST
Create video task
通过火山方舟 doubao-seedance 模型生成视频。提交任务后异步处理,需轮询查询状态获取结果。 doubao-seedance-2-0-260128 支持文生视频和图生视频,duration 支持 5/10 秒。
请求参数(提交任务)
modelstringRequired模型名称,如 doubao-seedance-2-0-260128。
contentarrayRequired视频内容数组,至少包含一个 text 类型的元素。
parametersobjectOptional生成参数对象,包含 duration 等可选配置。
content 数组元素
content[].typestringRequired固定值 "text"。
content[].textstringRequired视频描述 prompt 文本。
parameters 字段
parameters.durationintegerOptional视频时长(秒),支持 5 或 10。
parameters.resolutionstringOptional输出分辨率,如 1080p。
认证
AuthorizationstringRequired在请求头中传入 Bearer Token。
POST
| 1 | curl ${HY_API_BASE}/contents/generations/tasks \ |
| 2 | -H "Authorization: Bearer $HY_API_KEY" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "model": "doubao-seedance-2-0-260128", |
| 6 | "content": [ |
| 7 | {"type": "text", "text": "一只柴犬在草地上奔跑,电影质感"} |
| 8 | ], |
| 9 | "parameters": { |
| 10 | "duration": 5 |
| 11 | } |
| 12 | }' |
POST
Authorization
获取 API Key →🔑
REQUEST
| 1 | const response = await fetch("https://apiclaw.cc/contents/generations/tasks", { |
| 2 | method: "POST", |
| 3 | headers: { |
| 4 | "Authorization": "Bearer YOUR_API_KEY", |
| 5 | "Content-Type": "application/json", |
| 6 | }, |
| 7 | }); |
| 8 | const data = await response.json(); |
| 9 | console.log(data); |
RESPONSE
◎
点击 Send request 查看响应
Response
| 1 | { |
| 2 | "id": "cgt-20260611112037-gx5l7" |
| 3 | } |
参考文档 · 火山方舟 Seedance 官方 API 文档 ↗

