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

# 影片 API 概覽

> 選擇影片模型系列，區分通用非同步介面與 Kling 原生流程。

<link rel="alternate" hrefLang="en" href="https://mixroute.ai/docs/api-reference/endpoint/submit-video-task" />

<link rel="alternate" hrefLang="zh-Hans" href="https://mixroute.ai/docs/zh-hans/api-reference/endpoint/submit-video-task" />

<link rel="alternate" hrefLang="zh-Hant" href="https://mixroute.ai/docs/zh-hant/api-reference/endpoint/submit-video-task" />

<link rel="alternate" hrefLang="ja" href="https://mixroute.ai/docs/ja/api-reference/endpoint/submit-video-task" />

<link rel="alternate" hrefLang="x-default" href="https://mixroute.ai/docs/api-reference/endpoint/submit-video-task" />

先選擇影片模型系列，檢視對應請求結構與示例。多數系列使用通用非同步介面；Kling 使用獨立原生端點和任務查詢，不能混用下方的響應結構。

## 影片分類

| 系列 | 參數文件 | 請求結構 |
| - | - | - |
| Seedance | [Seedance](/docs/zh-hant/api-reference/endpoint/seedance) | `model`、`prompt`、`asset` 位於頂層，所有廠商生成欄位置於 `metadata`。 |
| Doubao | [Doubao](/docs/zh-hant/api-reference/endpoint/doubao) | `doubao-seedance-*` 路由；頂層 `model`/`prompt`/`asset`，廠商欄位放入 `metadata`。 |
| Dreamina | [Dreamina](/docs/zh-hant/api-reference/endpoint/dreamina) | `dreamina-seedance-*` 路由；頂層 `model`/`prompt`/`asset`，廠商欄位放入 `metadata`。 |
| Google Veo | [Veo](/docs/zh-hant/api-reference/endpoint/veo) | 頂層 `model`/`prompt`；生成項使用扁平 `metadata.durationSeconds`、`metadata.aspectRatio` 等。 |
| MiniMax H3 | [MiniMax H3](/docs/zh-hant/api-reference/endpoint/minimax-h3) | 頂層 `model`/`prompt`；H3 欄位位於 `metadata.content`、`metadata.resolution`、`metadata.duration`、`metadata.ratio`。 |
| 通義萬相 | [通義萬相](/docs/zh-hant/api-reference/endpoint/wan) | 頂層 model；原生 input 與 parameters 巢狀在 metadata 中。 |
| Kling | [Kling 原生介面](/docs/zh-hant/api-reference/endpoint/kling) | 使用 /kling/...；型號位於路徑，原生 settings/options/contents，不使用 metadata。 |
| OpenAI Sora 2 | [Sora 2](/docs/zh-hant/model-api/openai/sora-2) | 參見已有獨立模型頁與下載介面。 |
| Gemini Omni | [Gemini Omni](/docs/zh-hant/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 任務](/docs/zh-hant/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) 或 [模型列表](/docs/zh-hant/api-reference/endpoint/list-models) 中的完整 `model` ID。廠商釋出模型不代表當前 MixRoute 帳戶已開通。

## 呼叫流程

1. 選擇分類文件，按該模型的結構構造請求。
2. 提交後儲存 MixRoute `task_id`（部分路由同時返回 `id`）。
3. 使用 [查詢影片任務](/docs/zh-hant/api-reference/endpoint/query-video-task) 輪詢至成功或終止失敗。提交成功不等於影片已完成。
4. 讀取當前路由的結果 URL；需要獨立下載的 Sora 路由使用 [下載影片](/docs/zh-hant/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.