视频
异步视频生成,支持可选旁白和多场景串联。
与其他类别不同,视频生成是异步的:调用会立即返回一个
job_id(HTTP 202),而不是最终结果。请通过 GET /v1/jobs/{job_id} 跟踪状态。发起一次生成
http
POST /v1/video/generatejson
{
"prompt": "Un drone survole une plage au coucher du soleil.",
"image_url": null,
"duration_seconds": 5,
"narration_text": null,
"scenes": null,
"model": null,
"routing_strategy": "auto"
}json
{ "job_id": "8b2a3be3-...", "status": "queued" }跟踪状态
http
GET /v1/jobs/{job_id}json
{
"id": "8b2a3be3-...",
"category": "video",
"type": "text_to_video",
"status": "completed",
"provider": "vidu",
"model": "viduq1",
"result_url": "https://cdn.uploadscenter.com/file_...",
"error": null,
"created_at": "2026-08-31T17:14:04Z",
"updated_at": "2026-08-31T17:24:41Z"
}status 的取值为 queued、processing、completed 或 failed。请按固定间隔轮询(例如每 5 秒一次),直到进入两种最终状态之一。官方 SDK 提供了 .wait() 快捷方法,会自动为您完成这一轮询过程。
旁白(配音)
提供 narration_text 可在生成的视频上叠加一段合成的配音旁白。这是一段口播文本,与仅用于向视频生成器描述画面的 prompt 视觉提示词不同——没有任何视频供应商能原生生成音频,旁白是单独合成的(使用 ElevenLabs 的声音),然后再进行合并。
json
{
"prompt": "Documentaire sous-marin, poissons tropicaux, recif corallien.",
"narration_text": "Sous la surface, un monde silencieux et colore s'anime au rythme des courants.",
"duration_seconds": 5
}场景(长于单个片段的视频)
无论请求的时长是多少,单次供应商调用生成的片段通常只有几秒钟。要生成更长的视频(在配合较长旁白时尤为有用),请提供 scenes——为每个约 duration_seconds 时长的片段提供一段视觉描述,并按顺序串联。每个场景都是一次独立的供应商调用,会单独计费。
json
{
"prompt": "Presentation d'un chaton qui joue avec une balle.",
"scenes": [
"Un chaton tigre tapote une balle rouge dans un salon ensoleille, camera basse.",
"Le chaton poursuit la balle sous le canape puis la ramene fierement, gros plan."
],
"duration_seconds": 5,
"narration_text": "Voici Moka, un chaton joueur qui pourchasse sa balle rouge avec entrain."
}当提供了 scenes 时,生成过程会忽略 prompt(该字段仍为必填——请使用简短摘要作为其值)。
起始图像
image_url 可将文本转视频的生成转变为图像转视频的生成(第一个片段会为所提供的图像添加动效)。
供应商
Vidu、OpenAI(Sora)。