{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}创建视频
OpenAI Sora 兼容格式的视频生成接口。支持文生视频与图/视频参考生成模式。
POST /v1/videos:创建视频任务GET /v1/videos/{video_id}:查询任务状态GET /v1/videos/{video_id}/content:获取视频二进制内容
当前对外不提供:
GET /v1/videosPOST /v1/videos/{video_id}/remix
标准鉴权头:
Content-Type: application/json
POST /v1/videos创建任务,获取id- 轮询
GET /v1/videos/{id}直到completed或failed - 完成后优先使用返回中的
video_url - 如需统一下载,调用
GET /v1/videos/{id}/content
核心参数:
model: string:必填,对外模型名prompt: string:推荐,视频生成描述seconds: number|string:可选,目标时长duration: number|string:可选,时长别名size: string:可选,输出尺寸mode: string:可选,常见值t2vi2vi2v_first_lastreference_material
常用兼容参数:
aspect_ratioratioqualityresolutionfpsimageimage_urlimage_urlsimagesreference_imagesinput_referenceend_image_urllast_image_urlvideo_urlsaudio_urlsfunction_modecontentcallback_urlexternal_task_id
Kling 常用扩展参数:
model_namenegative_promptcfg_scalesoundcamera_controlimage_listvideo_idtask_idwatermark_info
4.1 Veo 系列
说明:stable、official 等表示不同分组,不是对外 model 后缀;调用时请保持 model 为基础模型名,由账户或令牌分组决定实际走哪个分组。
Veo 3.x 主模型
veo3veo3-fastveo3-fast-framesveo3-framesveo3-proveo3-pro-framesveo3.1veo3.1-fastveo3.1-proveo3.1-componentsveo3.1-4kveo3.1-pro-4k
建议:
- 纯文生视频优先使用
veo3*/veo3.1*主模型 - 图生或参考生视频场景,建议显式传
mode + image_url/reference_images
4.2 Sora 系列
基础模型:
sora-2sora-2-pro
建议:
sora-2*适合通用调用- 如需使用
stable/official等分组,请保持model为基础模型名,不要在模型名后追加后缀。
请求示例:
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
4.3 HappyHorse 系列
对外模型:
happyhorse-1.0
建议:
happyhorse-1.0通过mode区分t2v、i2v、r2v、video_edit。- Sora 兼容格式中参考图建议使用
content数组传递媒体项。 - 文本项使用
type=text,媒体项使用type=image_url并可配合role、name标识素材用途。
请求示例:
{
"size": "720x1280",
"model": "happyhorse-1.0",
"mode": "r2v",
"prompt": "this is an example",
"duration": 15,
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
}
],
"parameters": {
"resolution": "720P",
"ratio": "9:16",
"duration": 15,
"seed": 1
}
}
4.4 Seedance 系列
对外模型:
doubao-seedance-1-0-lite-t2v-250428doubao-seedance-1-0-lite-i2v-250428doubao-seedance-1-0-pro-250528doubao-seedance-1-0-pro-fast-251015doubao-seedance-1-5-pro-251215doubao-seedance-2-0-260128doubao-seedance-2-0-fast-260128
建议:
- 文生视频优先
*-t2v-*或pro / fast - 图生视频优先
*-i2v-* - 复杂参考素材场景优先使用
content
请求示例:
{
"size": "1280x720",
"model": "doubao-seedance-2-0-fast-260128",
"prompt": "this is an example",
"duration": 15,
"fps": "24",
"seed": "20231024",
"mode": "reference_material",
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.mp3"
},
"role": "reference_audio",
"name": "audio1"
}
]
}
4.5 Grok 视频系列
对外模型:
grok-imagine-1.0-videogrok-imagine-video-1.5-previewgrok-video-3
常用参数:
promptratio/aspect_ratioresolution/sizeseconds/durationimage/image_url/input_referencereference_images
示例:
{
"model": "grok-imagine-1.0-video",
"prompt": "雨夜霓虹街道上的电影感推镜,光影丰富,运动自然",
"reference_images": [
"https://example.com/ref-1.jpg"
],
"seconds": 10,
"aspect_ratio": "16:9",
"resolution": "720P"
}
4.6 Kling 视频主模型
对外主模型:
kling-video
必填:
modelmodel_name
支持的 model_name:
kling-v1kling-v1-5kling-v1-6kling-v2-masterkling-v2-1kling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3
常见 mode:
t2vi2vmulti_i2vextend
最小入参:
- 文生视频:
model + model_name + prompt + mode=t2v - 图生视频:
model + model_name + prompt + mode=i2v + image - 多图参考:
model + model_name + prompt + mode=multi_i2v + image_list - 视频延长:
model + model_name + mode=extend + video_id
示例:
{
"model": "kling-video",
"model_name": "kling-v2-6",
"mode": "t2v",
"prompt": "海边日落镜头,电影感,风吹长发",
"duration": 5,
"aspect_ratio": "16:9"
}
4.7 MiniMax / Hailuo 视频系列
对外模型:
minimax-h3hailuo-2.3
建议:
minimax-h3支持文生视频、图片参考和音频参考,推荐通过content混排文本与素材;也可使用image_urls、audio_urls等兼容字段。hailuo-2.3需要首帧图片,推荐在content中传role=first_frame的image_url项,或使用image_urls传首帧图片。minimax-h3常用duration=5~15、resolution=1440p;hailuo-2.3常用duration=6或10、resolution=768p。
minimax-h3 示例:
{
"model": "minimax-h3",
"prompt": "A cinematic product video with smooth camera motion",
"content": [
{
"type": "text",
"text": "Use the product image as reference and match the rhythm of the audio."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/product.jpg"
},
"role": "reference_image",
"name": "product"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/music.mp3"
},
"role": "reference_audio",
"name": "music"
}
],
"duration": 8,
"resolution": "1440p",
"aspect_ratio": "16:9",
"generate_audio": true
}
hailuo-2.3 示例:
{
"model": "hailuo-2.3",
"prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
"content": [
{
"type": "text",
"text": "The camera slowly pushes in, natural motion and cinematic lighting."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpg"
},
"role": "first_frame",
"name": "first"
}
],
"duration": 10,
"resolution": "768p",
"aspect_ratio": "16:9"
}
-
mode=t2v -
最小入参:
model + prompt -
mode=i2v -
最小入参:
model + prompt + image_url -
mode=i2v_first_last -
最小入参:
model + prompt + image_url + end_image_url -
mode=reference_images -
最小入参:
model + prompt + reference_images -
mode=reference_material -
最小入参:
model + prompt + (image_urls/video_urls/audio_urls 至少一种)
Gemini Omni 调用说明
gemini-omni是 new-api 对外公开的视频模型名,可直接走POST /v1/videos。mode=t2v:文生视频,最小入参为model + prompt。mode=r2v:参考图/参考素材生成,图片可放在image、image_url、images、image_urls、reference_images、input_reference或content中。mode=edit:视频编辑,视频可放在video、video_url、videos或content中,也可同时传参考图。- 时长字段可用
seconds或duration,会自动匹配到 4 / 6 / 8 / 10 秒档。
{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}授权
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
请求体
必填,对外模型名。 gemini-omni 可通过 /v1/videos 调用。
sora-2, sora-2-pro, gemini-omni, happyhorse-1.0, happyhorse-1.0-i2v, happyhorse-1.0-t2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, 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, veo3, veo3-fast, veo3-fast-frames, veo3-frames, veo3-pro, veo3-pro-frames, veo3.1, veo3.1-4k, veo3.1-components, veo3.1-fast, veo3.1-pro, veo3.1-pro-4k, kling-video, grok-imagine-1.0-video, grok-imagine-video-1.5-preview, grok-video-3, minimax-h3, hailuo-2.3, viduq3-turbo "sora-2"
统一提示词入口。大多数模型必填。
单图入口,部分兼容模式会映射到 images。
统一时长入口,部分模型也接受 seconds。
Video width
512
Video height
512
Video frame rate
30
Random seed
20231234
Number of videos to generate
1
Response format
"url"
User identifier
"user-1234"
动态扩展字段容器。大量模型特有字段从这里反序列化。
可选,视频生成模式。 gemini-omni 支持 t2v、r2v、edit。
统一多图入口。Vidu、Seedance、Veo 等会使用。
统一尺寸入口,会映射为 resolution/aspect_ratio 等。
Sora 兼容入口,运行时会回退到 duration。
Sora/Veo 兼容参考图入口,可为 multipart 文件或兼容对象。
响应
成功创建视频任务
Should use VideoStatus constants: VideoStatusQueued, VideoStatusInProgress, VideoStatusCompleted, VideoStatusFailed
queued, in_progress, completed, failed, video_url, url, completed_at 兼容旧接口 待废弃
