> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omniall.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vidu 视频 API

> vidu-q4-720p / vidu-q4-1080p 异步视频对接说明。

# Vidu 视频 API

通过 Omniall AI 调用 **Vidu Q4** 异步视频生成。

| 说明 | 方法 | 路径 |
| - | - | - |
| 创建 | `POST` | `/v1/video/generations` |
| 查询 | `GET` | `/v1/video/generations/{task_id}` |

**API 主机：** `https://api.omniall.ai` · 鉴权 `Authorization: Bearer sk-...`。

## 模型与规格

| 模型 | 分辨率 | 时长 | 计费 |
| - | - | - | - |
| `vidu-q4-720p` | 720P | 4–16 秒任选（同价） | 按次 |
| `vidu-q4-1080p` | 1080P | 4–16 秒任选（同价） | 按次 |

二者为不同模型，请按清晰度选择。模型 ID 与模型广场一致。

## 场景

| 场景 | 用法 |
| - | - |
| 文生视频 | `prompt` + `seconds`（可选 `size` / `resolution`） |
| 单图 / 多图参考 | `reference_image` 或 `reference_images` / `images`（合计最多 10 张） |
| 参考音频 | `reference_audios`（最多 3 段；建议同时带至少 1 张参考图） |

不支持参考视频（请勿传 `reference_videos`）。

## 常用字段

| 字段 | 必填 | 说明 |
| - | - | - |
| `model` | 是 | `vidu-q4-720p` 或 `vidu-q4-1080p` |
| `prompt` | 是 | 视频描述 |
| `seconds` | 否 | 时长 4–16 整数秒；也可用 `duration`；不传则用模型默认 |
| `resolution` | 否 | 与模型档位一致：`720P` / `1080P`（也可省略，由 model 决定） |
| `size` | 否 | 仅 `16:9` / `9:16`；也可用 `ratio` / `aspect_ratio`；默认 `16:9` |
| `count` | 否 | 只能为 1 |
| `reference_image` | 否 | 单张参考图 URL |
| `reference_images` | 否 | 多张参考图 URL 数组（别名 `images`） |
| `reference_audios` | 否 | 参考音频 URL 数组 |

生成通常需数分钟，建议每 10–15 秒轮询查询接口。

## 示例

```bash theme={null}
# 文生视频（vidu-q4-720p · 5 秒）
curl -X POST "https://api.omniall.ai/v1/video/generations" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vidu-q4-720p",
    "prompt": "一只橘猫在阳光洒落的窗台伸懒腰，镜头缓慢推进",
    "seconds": 5,
    "size": "16:9"
  }'
```

```bash theme={null}
# 参考图 + 参考音频（vidu-q4-1080p · 8 秒竖屏）
curl -X POST "https://api.omniall.ai/v1/video/generations" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vidu-q4-1080p",
    "prompt": "参考图中的人物随音乐节奏轻轻点头微笑",
    "seconds": 8,
    "size": "9:16",
    "reference_images": [
      "https://example.com/person.jpg"
    ],
    "reference_audios": [
      "https://example.com/bgm.mp3"
    ]
  }'
```

创建成功后用返回的 `id` / `task_id` 查询：

```bash theme={null}
curl "https://api.omniall.ai/v1/video/generations/$TASK_ID" \
  -H "Authorization: Bearer $API_KEY"
```

完整字段与 Playground 见 **API Reference → 视频 → Vidu**。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.