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

# 视频 API 概览

> 选择视频模型系列，区分通用异步接口与 Kling 原生流程。

先选择视频模型系列，查看对应请求结构与示例。多数系列使用通用异步接口；Kling 使用独立原生端点和任务查询，不能混用下方的响应结构。

## 视频分类

| 系列 | 参数文档 | 请求结构 |
| - | - | - |
| Seedance | [Seedance](/zh-hans/api-reference/endpoint/seedance) | `model`、`prompt`、`asset` 位于顶层，所有厂商生成字段置于 `metadata`。 |
| Doubao | [Doubao](/zh-hans/api-reference/endpoint/doubao) | `doubao-seedance-*` 路由；顶层 `model`/`prompt`/`asset`，厂商字段放入 `metadata`。 |
| Dreamina | [Dreamina](/zh-hans/api-reference/endpoint/dreamina) | `dreamina-seedance-*` 路由；顶层 `model`/`prompt`/`asset`，厂商字段放入 `metadata`。 |
| Google Veo | [Veo](/zh-hans/api-reference/endpoint/veo) | 顶层 `model`/`prompt`；生成项使用扁平 `metadata.durationSeconds`、`metadata.aspectRatio` 等。 |
| MiniMax H3 | [MiniMax H3](/zh-hans/api-reference/endpoint/minimax-h3) | 顶层 `model`/`prompt`；H3 字段位于 `metadata.content`、`metadata.resolution`、`metadata.duration`、`metadata.ratio`。 |
| 通义万相 | [通义万相](/zh-hans/api-reference/endpoint/wan) | 顶层 model；原生 input 与 parameters 嵌套在 metadata 中。 |
| Kling | [Kling 原生接口](/zh-hans/api-reference/endpoint/kling) | 使用 /kling/...；型号位于路径，原生 settings/options/contents，不使用 metadata。 |
| OpenAI Sora 2 | [Sora 2](/zh-hans/model-api/openai/sora-2) | 参见已有独立模型页与下载接口。 |
| Gemini Omni | [Gemini Omni](/zh-hans/model-api/google/gemini-omni-1.1-flash) | 参见已有独立模型页，不套用 Veo 生成字段。 |

## 接口与认证

| 操作 | 方法与 URL |
| - | - |
| 创建任务 | `POST https://api.mixroute.ai/v1/video/generations` |
| 查询任务 | `GET https://api.mixroute.ai/v1/video/generations/{task_id}` |
| Sora 下载 | `GET https://api.mixroute.ai/v1/video/generations/download?id={task_id}` |

以上通用端点和下方流程不适用于 Kling。Kling 提交后保存 `data.id`，使用 [查询 Kling 任务](/zh-hans/api-reference/endpoint/kling-tasks) 读取 `succeeded` 状态及 `outputs[].url`。

```http theme={null}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

使用账户 [模型广场](https://console.mixroute.ai/models) 或 [模型列表](/zh-hans/api-reference/endpoint/list-models) 中的完整 `model` ID。厂商发布模型不代表当前 MixRoute 账户已开通。

## 调用流程

1. 选择分类文档，按该模型的结构构造请求。
2. 提交后保存 MixRoute `task_id`（部分路由同时返回 `id`）。
3. 使用 [查询视频任务](/zh-hans/api-reference/endpoint/query-video-task) 轮询至成功或终止失败。提交成功不等于视频已完成。
4. 读取当前路由的结果 URL；需要独立下载的 Sora 路由使用 [下载视频](/zh-hans/api-reference/endpoint/download-video)。

## 提交响应

以下为网关响应结构示意：

```json theme={null}
{
  "task_id": "TASK_ID",
  "id": "TASK_ID",
  "object": "video",
  "model": "dreamina-seedance-2-0-260128",
  "status": "queued"
}
```

<Note>
  保存提交返回的任务 ID，不要替换成上游 operation name 或 file ID。提交超时不等于没有创建任务；再次提交前先检查控制台，避免重复计费任务。
</Note>


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