跳转到主要内容
POST

授权

Authorization
string
header
必填

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

请求体

application/json
model
enum<string>
必填

必填,对外模型名。 gemini-omni 可通过 /v1/videos 调用。

可用选项:
sora-2,
sora-2-pro,
gemini-omni,
happyhorse-1.1,
happyhorse-1.1-1080p,
wan-3.0-prime,
wan-3.0-prime-1080p,
sd-2-5-4k,
sd-2-5-flash,
sd-2-5-flash-480p,
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,
sd-2-5,
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-4.0,
kling-4.0-1080p,
grok-imagine-1.0-video,
grok-imagine-video-1.5-preview,
grok-video-3,
minimax-h3,
hailuo-2.3,
viduq3-turbo,
viduq2,
vidu2.0,
vidu-q4,
vidu-q4-540p,
magi-2-1080p
示例:

"sora-2"

prompt
string

视频描述。Kling 4.0 的标准 OpenAI/Sora 请求直接使用 prompt;使用标准 Seedance 格式时可在 content 的 text 项中提供文本,无需 contents/settings/options。其他模型按各自格式要求提供文本。

image
file

单图入口,部分兼容模式会映射到 images。

duration
integer

统一时长入口,部分模型也接受 seconds。

width
integer

Video width

示例:

512

height
integer

Video height

示例:

512

fps
integer

Video frame rate

示例:

30

seed
integer

Random seed

示例:

20231234

n
integer

Number of videos to generate

示例:

1

response_format
string

Response format

示例:

"url"

user
string

User identifier

示例:

"user-1234"

metadata
object

动态扩展字段容器。大量模型特有字段从这里反序列化。

tool
string
mode
string

可选,视频生成模式。 gemini-omni 支持 t2v、r2v、edit。

Kling 4.0 可直接使用 Seedance 格式 content/duration/resolution/ratio/mode,或 OpenAI 视频格式 prompt/seconds/size/input_reference;两者都无需额外的 contents/settings/options。mode 可选 t2v(纯文本)、i2v(单张首帧)、i2v_first_last(首尾两帧)、reference_images(普通参考图)、reference_material(全能素材参考,音频须使用支持该能力的路由)。省略 mode 且没有显式工具时,有参考素材默认 reference_material,无任何参考素材默认 t2v。参考模式使用普通参考图角色,不把明确的首尾帧静默改成参考图;首尾帧请显式选择 i2v 或 i2v_first_last,并省略画幅参数。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL:/v1/videos 使用 audio_urls,Seedance 使用 content 的 audio_url 项;需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。

示例:

"reference_material"

images
string[]

统一多图入口。Vidu、Seedance、Veo 等会使用。

content
object[]

Seedance 格式也可调用 Kling 4.0;文本使用 text,图片/视频/音频使用 image_url/video_url/audio_url 对象。图片 role 为 first_frame、last_frame 或 reference_image,视频为 reference_video,音频为 reference_audio。参考音频须使用支持该能力的全能参考路由,不能由输出音轨推定所有路由均可输入音频。用 mode 区分生成场景。

contents
object[]

Kling 4.0 旧信封兼容字段;标准 OpenAI/Sora、Seedance 请求无需提供。

Minimum array length: 1
settings
object

旧信封兼容设置;标准格式直接使用 seconds/size 或 duration/resolution/ratio。

options
object

旧信封兼容字段;标准格式无需提供。

size
string

统一尺寸入口,会映射为 resolution/aspect_ratio 等。

seconds
string

Sora 兼容入口,运行时会回退到 duration。

input_reference
string

Sora/Veo 兼容参考图入口,可为 multipart 文件或兼容对象。

parameters
object
audio_urls
string<uri>[]

标准 OpenAI/Sora、Seedance 的参考音频 URL 列表;仅用于支持音频参考的全能参考路由,与生成输出音轨开关不同。

resolution
string

输出分辨率,常见值 540p、720p、1080p。

响应

成功创建视频任务

id
string
必填
object
string
必填
model
string
必填
status
enum<string>
必填

Should use VideoStatus constants: VideoStatusQueued, VideoStatusInProgress, VideoStatusCompleted, VideoStatusFailed

可用选项:
queued,
in_progress,
completed,
failed,
video_url,
url,
completed_at
progress
integer
必填
created_at
integer
必填
task_id
string

兼容旧接口 待废弃

completed_at
integer
expires_at
integer
seconds
string
size
string
remixed_from_video_id
string
error
object
metadata
object
output
object
request_id
string