POST /v1/wand/vega-videos/tasks,成功返回 id 与 status=queued。id 调用 GET /v1/wand/vega-videos/tasks/{id},直至 status 为 succeeded 或 failed,成功后从 content.video_url 获取视频地址。模型名称 | model 参数值 | 支持能力 | 视频时长(秒) | 清晰度档位 |
WAND-Vega-Video-1.0-Lite | wand-vega-video-1.0-lite | 文生 / 首尾帧生 / 参考生 | 4 ~ 15 | 768P、1080P、2K、4K |
content 数组中元素的 type 与 role 组合区分。POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks参数名 | 必选 | 类型 | 描述 |
model | 是 | string | 模型名称。取值: wand-vega-video-1.0-lite |
content | 是 | array[object] | 多模态输入数组。必须包含至少 1 个 type=text 元素(生成需要文本提示词)。详细见下方 content 数组元素参数。 |
resolution | 否 | string | 视频分辨率。 Lite 取值:768P、1080P、2K、4K |
ratio | 否 | string | 画面宽高比。 取值:21:9、16:9、4:3、1:1、3:4、9:16、adaptive(默认)。 其中 adaptive 表示由模型或输入素材自动决定。 |
duration | 否 | integer | 视频时长(秒)。 取值:4 ~ 15 的整数,默认 5。 |
options | 否 | object | 高级 / 扩展参数集合。整体可缺省;未传或空对象等价于全部字段缺省,各字段单独也可缺省。 |
参数名 | 必选 | 类型 | 描述 |
options.return_last_frame | 否 | boolean | 是否返回生成视频的尾帧图片。取值:true / false,默认 false。传 true 时,若模型确实产出了尾帧,查询接口会在 content.last_frame_url 返回其临时下载地址;未产出则该字段缺省。 |
content 是一个按 type 区分的联合类型数组,各元素字段互斥:参数名 | 必选 | 类型 | 描述 |
type | 是 | string | 元素类型。取值:text、image_url、video_url、audio_url。 |
text | 条件必选 | string | 文本提示词。type=text 时必填且不可为空串。存在多个 text 元素时按数组顺序拼接为完整提示词。 |
image_url | 条件必选 | object | 图片素材。type=image_url 时必填,结构 {"url": "..."},其中 url 不可为空串。 |
video_url | 条件必选 | object | 视频素材。type=video_url 时必填,结构 {"url": "..."},其中 url 不可为空串。 |
audio_url | 条件必选 | object | 音频素材。type=audio_url 时必填,结构 {"url": "..."},其中 url 不可为空串。 |
role | 条件必选 | string | 素材用途,type 为 image_url / video_url / audio_url 时必填(type=text 不使用该字段)。 取值:first_frame、last_frame、reference_image、reference_video、reference_audio。 type=image_url:首帧取 first_frame,尾帧取 last_frame,参考图片取 reference_image; type=video_url:固定 reference_video; type=audio_url:固定 reference_audio。 |
type 与 role 的组合:type | role | 实际用途 |
image_url | first_frame | 首帧图片 |
image_url | last_frame | 尾帧图片 |
image_url | reference_image | 参考图片 |
video_url | reference_video(固定) | 参考视频 |
audio_url | reference_audio(固定) | 参考音频 |
text | 不使用 | - |
content 数组只包含一个 type=text 元素,resolution、ratio、duration 均可显式指定。curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-d '{"model": "wand-vega-video-1.0-lite","content": [{"type": "text","text": "一只橙色小猫在窗台上看向镜头,阳光从侧面洒入,镜头缓缓推进"}],"resolution": "768P","ratio": "16:9","duration": 6}'
content 中传入 type=image_url 且 role 为 first_frame / last_frame 的元素。curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-d '{"model": "wand-vega-video-1.0-lite","content": [{"type": "text","text": "镜头从首帧自然过渡到尾帧,保持光影连续"},{"type": "image_url","image_url": { "url": "https://example.com/start.jpg" },"role": "first_frame"},{"type": "image_url","image_url": { "url": "https://example.com/end.jpg" },"role": "last_frame"}],"resolution": "1080P","duration": 8}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-d '{"model": "wand-vega-video-1.0-lite","content": [{"type": "text","text": "参考图中的角色在参考视频的场景里自然运动,背景音乐与画面节奏一致"},{"type": "image_url","image_url": { "url": "https://example.com/character.jpg" },"role": "reference_image"},{"type": "video_url","video_url": { "url": "https://example.com/scene.mp4" },"role": "reference_video"},{"type": "audio_url","audio_url": { "url": "https://example.com/bgm.mp3" },"role": "reference_audio"}],"resolution": "768P","ratio": "16:9","duration": 10}'
参数名 | 类型 | 说明 |
id | string | 任务 ID,用于轮询查询任务状态。 |
model | string | 回显提交时的 model 取值。 |
status | string | 任务状态。提交成功恒为 queued。 |
HTTP/1.1 201 CreatedContent-Type: application/json{"id": "1300000000-video-68b7c1d4a1f2e3d4c5b6a79808192a3b4c5d6e7f8-0000","model": "wand-vega-video-1.0-lite","status": "queued"}
GET https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks/{id}参数名 | 必选 | 类型 | 描述 |
id | 是 | string | 任务 ID(路径参数),即提交任务时返回的 id。 |
curl -X GET 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks/<Fid>' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY'
参数名 | 类型 | 说明 |
id | string | 任务 ID。 |
model | string | 回显提交时的 model 取值,不是实际出片模型。 |
status | string | 任务状态。取值:queued(排队中)、running(生成中)、succeeded(生成成功)、failed(生成失败)。 |
content | object | 任务生成结果内容,仅在 status=succeeded 时返回。 |
content.video_url | string | 生成视频的下载地址。临时地址,有效期 12 小时,请及时下载转存。 |
content.last_frame_url | string | 生成视频的尾帧图片地址。仅在 options.return_last_frame=true 时返回。 |
error | object | 任务失败信息,仅在 status=failed 时返回。 |
error.code | string | 任务级错误码。取值:InternalError、TaskTimeout 等。 |
error.message | string | 失败原因描述,便于定位问题。 |
{"id": "1300000000-video-68b7c1d4a1f2e3d4c5b6a79808192a3b4c5d6e7f8-0000","model": "wand-vega-video-1.0-lite","status": "succeeded","content": {"video_url": "https://aigc-video.example.com/xxx/result.mp4"}}
HTTP 状态码 | error.code | 含义 | 处理建议 |
401 | 由网关定义 | 鉴权失败:Authorization 头缺失或 API Key 无效/已过期。该错误在网关层返回,错误码以网关为准。 | 检查 Authorization: Bearer <API Key> 是否正确、是否在有效期内。 |
400 | invalid_request_error | 请求参数非法(缺失必选项、类型错误、枚举越界、JSON 解析失败等)。 | 对照本文档各参数的取值范围检查后重试。 |
404 | not_found | 资源不存在(任务 ID 不存在、路径错误等)。 | 确认路径与任务 ID 是否正确。 |
500 | internal_error | 服务内部错误或处理超时。 | 重试;持续失败请联系技术支持。 |
503 | service_unavailable | 服务过载,暂不可用。 | 退避重试。 |
文档反馈