curl --request POST \
--url https://api.aiid.edu.kg/api/v3/contents/generations/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-1-0-lite-i2v-250428",
"mode": "reference_material",
"prompt": "测试文字",
"content": [
{
"type": "text",
"text": "测试文字"
},
{
"type": "image_url",
"image_url": {
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/image/9979f1a754b3571d5e8bdcc397eedf53.png"
},
"role": "reference_image",
"name": "1"
},
{
"type": "video_url",
"video_url": {
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/video/1979f1a754b3571d5e8bdcc397eedf53.mp4"
},
"role": "reference_video",
"name": "2"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/video/3979f1a754b3571d5e8bdcc397eedf53.mp3"
},
"role": "reference_audio",
"name": "3"
}
],
"duration": 5,
"size": "1280x720"
}
'{
"id": "task_xxx",
"status": "queued",
"created_at": "<string>",
"items": "<string>"
}创建视频(Seedance)
该系列支持OpenAI视频生成格式(详见链接 视频生成Sora兼容格式)。
用于创建视频生成任务,并通过任务 ID 查询状态与结果。
创建任务核心字段:
model:必填,模型名称。prompt:必填,视频生成主描述。content:可选,火山方舟 content 数组,混排文本、图片、视频、音频素材。function_mode:可选,常用于全能参考等高级模式。
兼容入参:
以下字段主要用于历史客户端和旧协议适配。新接入请尽量采用本页“请求示例”中的标准格式:文本与参考素材使用 content 数组,生成配置使用顶层 duration、ratio、resolution、fps 等字段。
mode:t2v / i2v / i2v_first_last / reference_images / reference_materialimage_url / image_urls / input_referenceend_image_url / last_image_urlvideo_urls / audio_urlsseconds / durationaspect_ratio / ratio / sizequality / resolutionfpsgenerate_audio / watermark
调用细节:
- 当
mode=reference_material或function_mode=omni_reference时,建议通过content传递文本与参考素材。 content文本项写法为{ "type": "text", "text": "测试文字" }。content图片、视频、音频素材项分别使用image_url、video_url、audio_url对象写法,例如{ "type": "image_url", "image_url": { "url": "https://example.com/ref.png" }, "role": "reference_image", "name": "1" }。role可标识素材用途,name可供提示词中按名称引用。ratio、duration、resolution、fps会影响最终生成配置。
Gemini Omni 调用:
gemini-omni也可通过本 Seedance 任务接口调用。mode=t2v用于文生视频,mode=r2v用于参考图/参考素材生成,mode=edit用于视频编辑。- 文本可放在
prompt或content的text项;图片可放在image_url / image_urls / reference_images / input_reference / content;视频可放在video_urls / content。 - 时长字段可用
duration或seconds,会自动匹配到 4 / 6 / 8 / 10 秒档。
MiniMax / Hailuo 调用:
minimax-h3可通过本任务接口调用,支持文生视频、图片参考和音频参考;文本可放在prompt或content文本项,素材可放在content、image_urls、audio_urls等字段。hailuo-2.3可通过本任务接口调用,需要首帧图片,建议在content中传role=first_frame的image_url项。minimax-h3常用duration=5~15、resolution=1440p;hailuo-2.3常用duration=6或10、resolution=768p。
查询结果关注字段:
items[].statusitems[].content.video_url或items[].video_urlitems[].erroritems[].progress
Error fields: error.code, error.message.
{
"error": {
"code": "invalid_request_error",
"message": "requires at least one image in `images`"
}
}
curl --request POST \
--url https://api.aiid.edu.kg/api/v3/contents/generations/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-1-0-lite-i2v-250428",
"mode": "reference_material",
"prompt": "测试文字",
"content": [
{
"type": "text",
"text": "测试文字"
},
{
"type": "image_url",
"image_url": {
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/image/9979f1a754b3571d5e8bdcc397eedf53.png"
},
"role": "reference_image",
"name": "1"
},
{
"type": "video_url",
"video_url": {
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/video/1979f1a754b3571d5e8bdcc397eedf53.mp4"
},
"role": "reference_video",
"name": "2"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/video/3979f1a754b3571d5e8bdcc397eedf53.mp3"
},
"role": "reference_audio",
"name": "3"
}
],
"duration": 5,
"size": "1280x720"
}
'{
"id": "task_xxx",
"status": "queued",
"created_at": "<string>",
"items": "<string>"
}授权
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
请求体
必填。模型名称。可传 Seedance 对外模型、gemini-omni、minimax-h3 或 hailuo-2.3。
doubao-seedance-1-0-lite-i2v-250428, doubao-seedance-1-0-lite-t2v-250428, doubao-seedance-1-0-pro-250528, doubao-seedance-1-0-pro-fast-251015, doubao-seedance-1-5-pro-251215, doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, minimax-h3, hailuo-2.3, gemini-omni "doubao-seedance-2-0-260128"
必填。视频生成主描述,不能为空。
"参考素材生成一段剧情短视频"
可选。火山方舟 content 数组,按顺序混排文本与素材项。文本项使用 { "type": "text", "text": "..." };图片、视频、音频项分别使用 image_url、video_url、audio_url 对象并在其中放 url,可配合 role(如 reference_image、reference_video、reference_audio)和 name 供文本引用。
Hide child attributes
Hide child attributes
内容项类型。
text, image_url, video_url, audio_url 文本内容,仅 type=text 时使用。
图片 URL,推荐对象写法:{"url":"https://..."}。
视频 URL,推荐对象写法:{"url":"https://..."}。
音频 URL,推荐对象写法:{"url":"https://..."}。
素材用途标识,常见值如 reference_image、reference_video、reference_audio。
素材名称,可供文本提示词引用或区分多个素材。
可选。高级功能模式,如 omni_reference 用于全能参考。
可选。兼容模式字段,如 t2v、i2v、i2v_first_last、reference_images、reference_material;gemini-omni 支持 t2v、r2v、edit。
可选。单张参考图 URL。
可选。多张参考图 URL 列表。
可选。兼容参考输入字段。
可选。末帧参考图 URL。
可选。末帧参考图 URL 别名。
可选。参考视频 URL 列表。
可选。参考音频 URL 列表。
可选。视频时长,秒;与 duration 兼容。
可选。视频时长,秒;与 seconds 兼容。
可选。画幅比例,如 16:9。
可选。画幅比例别名,如 16:9。
可选。分辨率或尺寸兼容字段。
可选。生成质量配置。
可选。输出分辨率。
可选。帧率。
可选。是否生成音频。
可选。是否添加水印。
