WAND-Vega-Video RTC
实时快速生成视频。 WAND-Vega-Video RTC 面向低时延场景:同步接口通常 5~20 秒直接返回成片,也可以走异步接口提交后轮询。
| 项目 | 值 |
|---|---|
| 域名 | https://platform.wand-aigc.com |
| 模型 | wand-vega-video-1.0-rtc |
| 鉴权 | 请求头 X-Api-Key: <your_api_key> |
| 生成方式 | 文生视频、首尾帧生视频、参考图生视频 |
一、接口一览
| 方法 | 路径 | 用途 |
|---|---|---|
| POST | /v1/wand/vega-videos/generation/async | 提交任务,立即返回 task_id(不等待生成) |
| POST | /v1/wand/vega-videos/generation/sync | 提交任务并等到生成完成,直接返回结果(通常 5~20 秒) |
| GET | /v1/wand/vega-videos/tasks/{task_id} | 查询任务状态与结果 |
async 与 sync 的请求体完全相同,区别只在返回时机:
- async:提交后立刻拿到
task_id,任务在后台生成。用task_id轮询查询接口,status从running变为succeeded或failed。 - sync:提交后直接等到生成完成,返回最终结果,不需要再查一次(通常 5~20 秒,建议客户端超时 2 分钟以上)。
WARNING
async 提交成功只代表任务已受理;生成失败不会在提交响应里体现,请以查询结果的 status 为准。
二、请求参数
顶层字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定 wand-vega-video-1.0-rtc |
content | array | 是 | 输入内容,至少一项,且至少一项是内容非空的 text |
resolution | string | 是 | 480P / 768P / 1080P |
duration | int | 是 | 生成时长(秒),4 ~ 15 |
ratio | string | 否 | 画幅比例,默认 adaptive,建议显式指定 |
enable_ir | bool | 否 | 提示词优化,默认 false |
ratio 取值
21:9、16:9、4:3、1:1、3:4、9:16、adaptive
adaptive 在部分场景语义不确定:纯文生视频不支持;首尾帧场景下按 16:9 处理。
content[] 元素
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | text / image_url |
text | string | type = text 时的提示词,不能为空 |
image_url.url | string | type = image_url 时的图片地址,需可公网访问 |
role | string | 图片角色,见下表 |
role
| role | 场景 | 说明 |
|---|---|---|
first_frame | 图生视频 | 首帧图 |
last_frame | 图生视频 | 尾帧图,必须搭配 first_frame |
reference_image | 图生视频 | 参考图 |
提示词优化(enable_ir)
- 默认
false:直接用content中的text生成; - 设为
true:先结合文本与素材把提示词改写为更适合视频生成的结构化描述,再进入生成流程。
三、场景示例
场景 1:文生视频
curl -sS -X POST 'https://platform.wand-aigc.com/v1/wand/vega-videos/generation/async' \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: <your_api_key>' \
-d '{
"model": "wand-vega-video-1.0-rtc",
"content": [
{"type": "text", "text": "一只狗在草地上奔跑"}
],
"resolution": "1080P",
"duration": 5,
"ratio": "16:9"
}'返回:
{"task_id": "251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d"}场景 2:首尾帧(图生视频)
text + 首帧图;需要尾帧就再追加一项 role: last_frame。
curl -sS -X POST 'https://platform.wand-aigc.com/v1/wand/vega-videos/generation/async' \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: <your_api_key>' \
-d '{
"model": "wand-vega-video-1.0-rtc",
"content": [
{"type": "text", "text": "镜头缓缓推进,小狗转头看向镜头"},
{"type": "image_url", "image_url": {"url": "https://example.com/dog.jpg"}, "role": "first_frame"}
],
"resolution": "480P",
"duration": 5,
"ratio": "16:9"
}'场景 3:一次拿到结果(sync)
curl -sS -X POST 'https://platform.wand-aigc.com/v1/wand/vega-videos/generation/sync' \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: <your_api_key>' \
-d '{
"model": "wand-vega-video-1.0-rtc",
"content": [{"type": "text", "text": "一只狗在草地上奔跑"}],
"resolution": "480P",
"duration": 6,
"ratio": "1:1"
}'成功时返回体与「四、响应参数」中的查询结果一致;失败时返回错误信封(见「五、错误码」)。
场景 4:轮询任务(async 之后)
curl -sS 'https://platform.wand-aigc.com/v1/wand/vega-videos/tasks/251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d' \
-H 'X-Api-Key: <your_api_key>'status 为 running 时按 2~5 秒间隔重试,变为 succeeded / failed 后停止。
附:启用提示词优化
{
"model": "wand-vega-video-1.0-rtc",
"content": [{"type": "text", "text": "cat in garden"}],
"enable_ir": true,
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}四、响应参数
提交成功(async)
{"task_id": "251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d"}拿到 task_id 后轮询查询接口,status 会从 running 变为 succeeded 或 failed(通常 20 秒内)。
查询结果(GET)
sync 成功时返回的结构与这里完全一致。sync 失败时直接返回错误信封(见「五、错误码」),Message 里是失败原因,不会返回 status=failed 的 task。
生成中:
{
"task": {
"id": "251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d",
"model": "wand-vega-video-1.0-rtc",
"status": "running",
"created_at": 1793168600,
"resolution": "480P",
"duration": 6,
"ratio": "1:1",
"content": {"url": ""}
}
}成功:
{
"task": {
"id": "251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d",
"model": "wand-vega-video-1.0-rtc",
"status": "succeeded",
"created_at": 1793168600,
"resolution": "480P",
"duration": 6,
"ratio": "1:1",
"content": {
"url": "https://.../251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d.mp4?q-sign-time=..."
}
}
}失败:
{
"task": {
"id": "251250701-AigcVideo-41793bd8ad67d1eef3bc1ff3247dac5d",
"model": "wand-vega-video-1.0-rtc",
"status": "failed",
"created_at": 1793168600,
"resolution": "480P",
"duration": 6,
"ratio": "1:1",
"content": {"url": ""},
"error": "generate failed"
}
}| 字段 | 类型 | 说明 |
|---|---|---|
task.id | string | 任务 ID,与提交时拿到的 task_id 一致 |
task.model | string | 固定 wand-vega-video-1.0-rtc |
task.status | string | running(生成中)/ succeeded(成功)/ failed(失败) |
task.created_at | int | 创建时间(Unix 秒) |
task.resolution | string | 分辨率档位,与提交时一致 |
task.duration | int | 提交时长(秒) |
task.ratio | string | 画幅比例 |
task.content.url | string | 成片下载地址,仅成功时有值,默认有效期 1 小时 |
task.error | string | 失败原因,仅失败时有值,成功时该字段不出现 |
响应中未列出的字段可忽略。
响应头
X-Request-Id:请求 ID,排查问题时提供。
五、错误码
错误信封结构:
{"Response":{"Error":{"Code":"...","Message":"..."},"RequestId":"..."}}| HTTP | Code | 含义 | 处理 |
|---|---|---|---|
| 401 | AuthFailure.MissingAuthorization | 缺少 X-Api-Key | 补齐请求头 |
| 401 | AuthFailure.InvalidAuthorization | key 无效 | 检查 key |
| 400 | InvalidParameter | 参数不合法 | 按 Message 修正字段 |
| 400 | InvalidParameter.UnsupportedFeature | 用了暂不支持的能力(参考图 / 参考视频 / 参考音频、素材转存、callback_url 等) | 按 Message 去掉该字段,或改用文生 / 首尾帧 |
| 403 | UnauthorizedOperation.AppidNotAllowed | 账号未开通 | 联系开通 |
| 429 | LimitExceeded | 请求过于频繁,或同时生成的任务数已达上限 | 稍后重试 |
| 404 | ResourceNotFound.TaskId | 任务不存在或不属于本账号 | 核对 task_id |
| 502 | FailedOperation.VendorError | 生成失败 | 稍后重试 |
| 503 | ResourceUnavailable.NoAvailableAccount | 服务资源暂时不足 | 稍后重试 |
| 500 | InternalError | 服务内部错误 | 重试,仍失败请提供 X-Request-Id |
六、注意事项
async 提交只代表任务已受理,生成结果请轮询查询接口;sync 会等到出片完成,通常 5~20 秒,各场景耗时如下表,排队时可能更久,建议客户端超时设置 2 分钟以上
分辨率 / 时长 仅文本 文本 + 首帧 文本 + 参考图 768P / 5s 约 5.2 秒 约 7.2 秒 约 7.5 秒 768P / 10s 约 8.7 秒 约 11.8 秒 约 10.6 秒 768P / 15s 约 13.8 秒 约 16.9 秒 约 15.3 秒 服务对同时生成的任务数有限制,超出会返回 429,建议稍后重试
建议轮询间隔 2~5 秒,
status变为succeeded/failed后停止任务
failed后不会自动重试,需要重新提交;失败原因见查询结果的task.error(async)或错误信封的Message(sync)产物地址默认有效期 1 小时,过期重新调用查询接口即可拿到新地址,不会重新生成视频
按提交的
duration计费,与实际出片时长无关;失败不计费任务记录保留 7 天,过期后查询返回 404,请及时转存产物
首帧 / 尾帧图片地址需可公网访问
首帧设置后,视频
ratio跟随首帧参考图 / 参考视频 / 参考音频、素材转存、
callback_url等能力暂不支持,传入会返回InvalidParameter.UnsupportedFeature
七、计费说明
计费价格
| 分辨率 | 刊例价(元/秒/日) |
|---|---|
| 480P | 0.3 |
| 768P | 0.5 |
| 1080P | 0.6 |
计费规则
- 计费项:WAND-Vega-Video RTC 视频生成时长
- 计费规则:按实际生成视频时长计费,统计计费周期内的生成视频时长累计值乘以对应分辨率单价
- 计算公式:费用 = 生成视频时长(秒)× 对应分辨率单价
计费示例
若在 2026 年 10 月 20 日使用 768P 档位生成视频,单条时长 5 秒,共生成 10 条,则 2026 年 10 月 21 日需支付的账单如下:
5(秒/条)× 10(条)× 0.5(元/秒)= 25 元
相关文档
| 文档 | 说明 |
|---|---|
| WAND-Vega-Video(Tokenhub) | 通过 Tokenhub 调用 Vega-Video 1.0 / 1.5 Pro / Lite,支持参考图、参考视频、参考音频 |