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

# 建立影片

> OpenAI Sora 相容格式的影片生成介面。支援文生影片與圖/影片參考生成模式。

- `POST /v1/videos`：建立影片任務
- `GET /v1/videos/{video_id}`：查詢任務狀態
- `GET /v1/videos/{video_id}/content`：取得影片二進位內容

目前不對外提供：
- `GET /v1/videos`
- `POST /v1/videos/{video_id}/remix`

標準鑑權標頭：
- `Content-Type: application/json`

1. `POST /v1/videos` 建立任務，取得 `id`
2. 輪詢 `GET /v1/videos/{id}`，直到 `completed` 或 `failed`
3. 完成後優先使用回傳中的 `video_url`
4. 如需統一下載，呼叫 `GET /v1/videos/{id}/content`

核心參數：
- `model: string`：必填，對外模型名稱
- `prompt: string`：建議，影片生成描述
- `seconds: number|string`：可選，目標時長
- `duration: number|string`：可選，時長別名
- `size: string`：可選，輸出尺寸
- `mode: string`：可選，常見值 `t2v` `i2v` `i2v_first_last` `reference_material`

常用相容參數：
- `aspect_ratio`
- `ratio`
- `quality`
- `resolution`
- `fps`
- `image`
- `image_url`
- `image_urls`
- `images`
- `reference_images`
- `input_reference`
- `end_image_url`
- `last_image_url`
- `video_urls`
- `audio_urls`
- `function_mode`
- `content`
- `callback_url`
- `external_task_id`

Kling 常用擴充參數：
- `model_name`
- `negative_prompt`
- `cfg_scale`
- `sound`
- `camera_control`
- `image_list`
- `video_id`
- `task_id`
- `watermark_info`

### 4.1 Veo 系列

說明：`stable`、`official` 等表示不同分組，並非對外的 `model` 後綴；呼叫時請保持 `model` 為基礎模型名稱，由帳戶或權杖分組決定實際使用哪個分組。

#### Veo 3.x 主模型

- `veo3`
- `veo3-fast`
- `veo3-fast-frames`
- `veo3-frames`
- `veo3-pro`
- `veo3-pro-frames`
- `veo3.1`
- `veo3.1-fast`
- `veo3.1-pro`
- `veo3.1-components`
- `veo3.1-4k`
- `veo3.1-pro-4k`

建議：
- 純文字生成影片優先使用 `veo3*` / `veo3.1*` 主模型
- 圖生影片或參考生成影片的場景，建議明確傳入 `mode + image_url/reference_images`

### 4.2 Sora 系列

基礎模型：
- `sora-2`
- `sora-2-pro`

建議：
- `sora-2*` 適合通用調用
- 如需使用 `stable` / `official` 等分組，請保持 `model` 為基礎模型名稱，不要在模型名稱後追加後綴。

請求範例：

```json
{
  "size": "1280x720",
  "images": [
    "https://example.png"
  ],
  "model": "sora-2",
  "prompt": "this is an example",
  "duration": 12,
  "fps": "24",
  "seed": "20231024",
  "mode": "i2v"
}
```

### 4.3 HappyHorse 系列

對外模型：
- `happyhorse-1.0`

建議：
- `happyhorse-1.0` 透過 `mode` 區分 `t2v`、`i2v`、`r2v`、`video_edit`。
- Sora 相容格式中參考圖建議使用 `content` 陣列傳遞媒體項。
- 文字項使用 `type=text`，媒體項使用 `type=image_url`，並可搭配 `role`、`name` 標示素材用途。

請求範例：

```json
{
  "size": "720x1280",
  "model": "happyhorse-1.0",
  "mode": "r2v",
  "prompt": "this is an example",
  "duration": 15,
  "content": [
    {
      "type": "text",
      "text": "this is an example"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.png"
      },
      "role": "reference_image",
      "name": "image1"
    }
  ],
  "parameters": {
    "resolution": "720P",
    "ratio": "9:16",
    "duration": 15,
    "seed": 1
  }
}
```

### 4.4 Seedance 系列

對外模型：
- `doubao-seedance-1-0-lite-t2v-250428`
- `doubao-seedance-1-0-lite-i2v-250428`
- `doubao-seedance-1-0-pro-250528`
- `doubao-seedance-1-0-pro-fast-251015`
- `doubao-seedance-1-5-pro-251215`
- `doubao-seedance-2-0-260128`
- `doubao-seedance-2-0-fast-260128`

建議：
- 文生影片優先 `*-t2v-*` 或 `pro / fast`
- 圖生影片優先 `*-i2v-*`
- 複雜參考素材場景優先使用 `content`

請求範例：

```json
{
  "size": "1280x720",
  "model": "doubao-seedance-2-0-fast-260128",
  "prompt": "this is an example",
  "duration": 15,
  "fps": "24",
  "seed": "20231024",
  "mode": "reference_material",
  "content": [
    {
      "type": "text",
      "text": "this is an example"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.png"
      },
      "role": "reference_image",
      "name": "image1"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.mp3"
      },
      "role": "reference_audio",
      "name": "audio1"
    }
  ]
}
```

### 4.5 Grok 影片系列

對外模型：
- `grok-imagine-1.0-video`
- `grok-imagine-video-1.5-preview`
- `grok-video-3`

常用參數：
- `prompt`
- `ratio` / `aspect_ratio`
- `resolution` / `size`
- `seconds` / `duration`
- `image` / `image_url` / `input_reference`
- `reference_images`

範例：

```json
{
  "model": "grok-imagine-1.0-video",
  "prompt": "雨夜霓虹街道上的电影感推镜，光影丰富，运动自然",
  "reference_images": [
    "https://example.com/ref-1.jpg"
  ],
  "seconds": 10,
  "aspect_ratio": "16:9",
  "resolution": "720P"
}
```

### 4.6 Kling 影片主模型

對外主模型：
- `kling-video`

必填：
- `model`
- `model_name`

支援的 `model_name`：
- `kling-v1`
- `kling-v1-5`
- `kling-v1-6`
- `kling-v2-master`
- `kling-v2-1`
- `kling-v2-1-master`
- `kling-v2-5-turbo`
- `kling-v2-6`
- `kling-v3`

常見 `mode`：
- `t2v`
- `i2v`
- `multi_i2v`
- `extend`

最小輸入參數：
- 文生影片：`model + model_name + prompt + mode=t2v`
- 圖生影片：`model + model_name + prompt + mode=i2v + image`
- 多圖參考：`model + model_name + prompt + mode=multi_i2v + image_list`
- 影片延長：`model + model_name + mode=extend + video_id`

範例：

```json
{
  "model": "kling-video",
  "model_name": "kling-v2-6",
  "mode": "t2v",
  "prompt": "海边日落镜头，电影感，风吹长发",
  "duration": 5,
  "aspect_ratio": "16:9"
}
```

### 4.7 MiniMax / Hailuo 視訊系列

對外模型：
- `minimax-h3`
- `hailuo-2.3`

建議：
- `minimax-h3` 支援文生影片、圖片參考和音訊參考，建議透過 `content` 混排文字與素材；也可使用 `image_urls`、`audio_urls` 等相容欄位。
- `hailuo-2.3` 需要首幀圖片，建議在 `content` 中傳入 `role=first_frame` 的 `image_url` 項，或使用 `image_urls` 傳首幀圖片。
- `minimax-h3` 常用 `duration=5~15`、`resolution=1440p`；`hailuo-2.3` 常用 `duration=6` 或 `10`、`resolution=768p`。

`minimax-h3` 範例：

```json
{
  "model": "minimax-h3",
  "prompt": "A cinematic product video with smooth camera motion",
  "content": [
    {
      "type": "text",
      "text": "Use the product image as reference and match the rhythm of the audio."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/product.jpg"
      },
      "role": "reference_image",
      "name": "product"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/music.mp3"
      },
      "role": "reference_audio",
      "name": "music"
    }
  ],
  "duration": 8,
  "resolution": "1440p",
  "aspect_ratio": "16:9",
  "generate_audio": true
}
```

`hailuo-2.3` 範例：

```json
{
  "model": "hailuo-2.3",
  "prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
  "content": [
    {
      "type": "text",
      "text": "The camera slowly pushes in, natural motion and cinematic lighting."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first-frame.jpg"
      },
      "role": "first_frame",
      "name": "first"
    }
  ],
  "duration": 10,
  "resolution": "768p",
  "aspect_ratio": "16:9"
}
```

- `mode=t2v`
- 最小輸入參數：`model + prompt`

- `mode=i2v`
- 最小輸入參數：`model + prompt + image_url`

- `mode=i2v_first_last`
- 最小輸入參數：`model + prompt + image_url + end_image_url`

- `mode=reference_images`
- 最小輸入參數：`model + prompt + reference_images`

- `mode=reference_material`
- 最小輸入參數：`model + prompt + (image_urls/video_urls/audio_urls 至少一种)`

### Gemini Omni 呼叫說明

- `gemini-omni` 是 new-api 對外公開的影片模型名稱，可直接走 `POST /v1/videos`。
- `mode=t2v`：文生影片，最小入參為 `model + prompt`。
- `mode=r2v`：參考圖/參考素材生成，圖片可放在 `image`、`image_url`、`images`、`image_urls`、`reference_images`、`input_reference` 或 `content` 中。
- `mode=edit`：影片編輯，影片可放在 `video`、`video_url`、`videos` 或 `content` 中，也可同時傳參考圖。
- 時長欄位可用 `seconds` 或 `duration`，會自動匹配到 4 / 6 / 8 / 10 秒檔。



## OpenAPI

````yaml api-reference/zh-tw/openapi.json POST /v1/videos
openapi: 3.0.0
info:
  title: 出海營 API 參考文件
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI格式（Chat）
  - name: OpenAI格式（Responses）
  - name: 圖片生成 Gemini 格式
  - name: 圖片生成OpenAI DALL-E 格式
  - name: 獲取模型列表
  - name: 影片生成HappyHorse與 Wan
  - name: 影片生成Kling格式
  - name: 影片生成 Omni 與 Veo 格式
  - name: 影片生成 Seedance 格式
  - name: 影片生成Sora相容格式
  - name: 影片生成 Vidu 格式
  - name: 音樂生成任務格式
paths:
  /v1/videos:
    post:
      tags:
        - 影片生成Sora相容格式
      summary: 建立影片
      description: >-
        OpenAI Sora 相容格式的影片生成介面。支援文生影片與圖/影片參考生成模式。


        - `POST /v1/videos`：建立影片任務

        - `GET /v1/videos/{video_id}`：查詢任務狀態

        - `GET /v1/videos/{video_id}/content`：取得影片二進位內容


        目前不對外提供：

        - `GET /v1/videos`

        - `POST /v1/videos/{video_id}/remix`


        標準鑑權標頭：

        - `Content-Type: application/json`


        1. `POST /v1/videos` 建立任務，取得 `id`

        2. 輪詢 `GET /v1/videos/{id}`，直到 `completed` 或 `failed`

        3. 完成後優先使用回傳中的 `video_url`

        4. 如需統一下載，呼叫 `GET /v1/videos/{id}/content`


        核心參數：

        - `model: string`：必填，對外模型名稱

        - `prompt: string`：建議，影片生成描述

        - `seconds: number|string`：可選，目標時長

        - `duration: number|string`：可選，時長別名

        - `size: string`：可選，輸出尺寸

        - `mode: string`：可選，常見值 `t2v` `i2v` `i2v_first_last`
        `reference_material`


        常用相容參數：

        - `aspect_ratio`

        - `ratio`

        - `quality`

        - `resolution`

        - `fps`

        - `image`

        - `image_url`

        - `image_urls`

        - `images`

        - `reference_images`

        - `input_reference`

        - `end_image_url`

        - `last_image_url`

        - `video_urls`

        - `audio_urls`

        - `function_mode`

        - `content`

        - `callback_url`

        - `external_task_id`


        Kling 常用擴充參數：

        - `model_name`

        - `negative_prompt`

        - `cfg_scale`

        - `sound`

        - `camera_control`

        - `image_list`

        - `video_id`

        - `task_id`

        - `watermark_info`


        ### 4.1 Veo 系列


        說明：`stable`、`official` 等表示不同分組，並非對外的 `model` 後綴；呼叫時請保持 `model`
        為基礎模型名稱，由帳戶或權杖分組決定實際使用哪個分組。


        #### Veo 3.x 主模型


        - `veo3`

        - `veo3-fast`

        - `veo3-fast-frames`

        - `veo3-frames`

        - `veo3-pro`

        - `veo3-pro-frames`

        - `veo3.1`

        - `veo3.1-fast`

        - `veo3.1-pro`

        - `veo3.1-components`

        - `veo3.1-4k`

        - `veo3.1-pro-4k`


        建議：

        - 純文字生成影片優先使用 `veo3*` / `veo3.1*` 主模型

        - 圖生影片或參考生成影片的場景，建議明確傳入 `mode + image_url/reference_images`


        ### 4.2 Sora 系列


        基礎模型：

        - `sora-2`

        - `sora-2-pro`


        建議：

        - `sora-2*` 適合通用調用

        - 如需使用 `stable` / `official` 等分組，請保持 `model` 為基礎模型名稱，不要在模型名稱後追加後綴。


        請求範例：


        ```json

        {
          "size": "1280x720",
          "images": [
            "https://example.png"
          ],
          "model": "sora-2",
          "prompt": "this is an example",
          "duration": 12,
          "fps": "24",
          "seed": "20231024",
          "mode": "i2v"
        }

        ```


        ### 4.3 HappyHorse 系列


        對外模型：

        - `happyhorse-1.0`


        建議：

        - `happyhorse-1.0` 透過 `mode` 區分 `t2v`、`i2v`、`r2v`、`video_edit`。

        - Sora 相容格式中參考圖建議使用 `content` 陣列傳遞媒體項。

        - 文字項使用 `type=text`，媒體項使用 `type=image_url`，並可搭配 `role`、`name` 標示素材用途。


        請求範例：


        ```json

        {
          "size": "720x1280",
          "model": "happyhorse-1.0",
          "mode": "r2v",
          "prompt": "this is an example",
          "duration": 15,
          "content": [
            {
              "type": "text",
              "text": "this is an example"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.png"
              },
              "role": "reference_image",
              "name": "image1"
            }
          ],
          "parameters": {
            "resolution": "720P",
            "ratio": "9:16",
            "duration": 15,
            "seed": 1
          }
        }

        ```


        ### 4.4 Seedance 系列


        對外模型：

        - `doubao-seedance-1-0-lite-t2v-250428`

        - `doubao-seedance-1-0-lite-i2v-250428`

        - `doubao-seedance-1-0-pro-250528`

        - `doubao-seedance-1-0-pro-fast-251015`

        - `doubao-seedance-1-5-pro-251215`

        - `doubao-seedance-2-0-260128`

        - `doubao-seedance-2-0-fast-260128`


        建議：

        - 文生影片優先 `*-t2v-*` 或 `pro / fast`

        - 圖生影片優先 `*-i2v-*`

        - 複雜參考素材場景優先使用 `content`


        請求範例：


        ```json

        {
          "size": "1280x720",
          "model": "doubao-seedance-2-0-fast-260128",
          "prompt": "this is an example",
          "duration": 15,
          "fps": "24",
          "seed": "20231024",
          "mode": "reference_material",
          "content": [
            {
              "type": "text",
              "text": "this is an example"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.png"
              },
              "role": "reference_image",
              "name": "image1"
            },
            {
              "type": "audio_url",
              "audio_url": {
                "url": "https://example.mp3"
              },
              "role": "reference_audio",
              "name": "audio1"
            }
          ]
        }

        ```


        ### 4.5 Grok 影片系列


        對外模型：

        - `grok-imagine-1.0-video`

        - `grok-imagine-video-1.5-preview`

        - `grok-video-3`


        常用參數：

        - `prompt`

        - `ratio` / `aspect_ratio`

        - `resolution` / `size`

        - `seconds` / `duration`

        - `image` / `image_url` / `input_reference`

        - `reference_images`


        範例：


        ```json

        {
          "model": "grok-imagine-1.0-video",
          "prompt": "雨夜霓虹街道上的电影感推镜，光影丰富，运动自然",
          "reference_images": [
            "https://example.com/ref-1.jpg"
          ],
          "seconds": 10,
          "aspect_ratio": "16:9",
          "resolution": "720P"
        }

        ```


        ### 4.6 Kling 影片主模型


        對外主模型：

        - `kling-video`


        必填：

        - `model`

        - `model_name`


        支援的 `model_name`：

        - `kling-v1`

        - `kling-v1-5`

        - `kling-v1-6`

        - `kling-v2-master`

        - `kling-v2-1`

        - `kling-v2-1-master`

        - `kling-v2-5-turbo`

        - `kling-v2-6`

        - `kling-v3`


        常見 `mode`：

        - `t2v`

        - `i2v`

        - `multi_i2v`

        - `extend`


        最小輸入參數：

        - 文生影片：`model + model_name + prompt + mode=t2v`

        - 圖生影片：`model + model_name + prompt + mode=i2v + image`

        - 多圖參考：`model + model_name + prompt + mode=multi_i2v + image_list`

        - 影片延長：`model + model_name + mode=extend + video_id`


        範例：


        ```json

        {
          "model": "kling-video",
          "model_name": "kling-v2-6",
          "mode": "t2v",
          "prompt": "海边日落镜头，电影感，风吹长发",
          "duration": 5,
          "aspect_ratio": "16:9"
        }

        ```


        ### 4.7 MiniMax / Hailuo 視訊系列


        對外模型：

        - `minimax-h3`

        - `hailuo-2.3`


        建議：

        - `minimax-h3` 支援文生影片、圖片參考和音訊參考，建議透過 `content` 混排文字與素材；也可使用
        `image_urls`、`audio_urls` 等相容欄位。

        - `hailuo-2.3` 需要首幀圖片，建議在 `content` 中傳入 `role=first_frame` 的 `image_url`
        項，或使用 `image_urls` 傳首幀圖片。

        - `minimax-h3` 常用 `duration=5~15`、`resolution=1440p`；`hailuo-2.3` 常用
        `duration=6` 或 `10`、`resolution=768p`。


        `minimax-h3` 範例：


        ```json

        {
          "model": "minimax-h3",
          "prompt": "A cinematic product video with smooth camera motion",
          "content": [
            {
              "type": "text",
              "text": "Use the product image as reference and match the rhythm of the audio."
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.com/product.jpg"
              },
              "role": "reference_image",
              "name": "product"
            },
            {
              "type": "audio_url",
              "audio_url": {
                "url": "https://example.com/music.mp3"
              },
              "role": "reference_audio",
              "name": "music"
            }
          ],
          "duration": 8,
          "resolution": "1440p",
          "aspect_ratio": "16:9",
          "generate_audio": true
        }

        ```


        `hailuo-2.3` 範例：


        ```json

        {
          "model": "hailuo-2.3",
          "prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
          "content": [
            {
              "type": "text",
              "text": "The camera slowly pushes in, natural motion and cinematic lighting."
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.com/first-frame.jpg"
              },
              "role": "first_frame",
              "name": "first"
            }
          ],
          "duration": 10,
          "resolution": "768p",
          "aspect_ratio": "16:9"
        }

        ```


        - `mode=t2v`

        - 最小輸入參數：`model + prompt`


        - `mode=i2v`

        - 最小輸入參數：`model + prompt + image_url`


        - `mode=i2v_first_last`

        - 最小輸入參數：`model + prompt + image_url + end_image_url`


        - `mode=reference_images`

        - 最小輸入參數：`model + prompt + reference_images`


        - `mode=reference_material`

        - 最小輸入參數：`model + prompt + (image_urls/video_urls/audio_urls 至少一种)`


        ### Gemini Omni 呼叫說明


        - `gemini-omni` 是 new-api 對外公開的影片模型名稱，可直接走 `POST /v1/videos`。

        - `mode=t2v`：文生影片，最小入參為 `model + prompt`。

        - `mode=r2v`：參考圖/參考素材生成，圖片可放在
        `image`、`image_url`、`images`、`image_urls`、`reference_images`、`input_reference`
        或 `content` 中。

        - `mode=edit`：影片編輯，影片可放在 `video`、`video_url`、`videos` 或 `content`
        中，也可同時傳參考圖。

        - 時長欄位可用 `seconds` 或 `duration`，會自動匹配到 4 / 6 / 8 / 10 秒檔。
      operationId: createVideo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 必填，對外模型名稱。 `gemini-omni` 可透過 `/v1/videos` 呼叫。
                  enum:
                    - sora-2
                    - sora-2-pro
                    - gemini-omni
                    - happyhorse-1.0
                    - happyhorse-1.0-i2v
                    - happyhorse-1.0-t2v
                    - happyhorse-1.0-r2v
                    - happyhorse-1.0-video-edit
                    - doubao-seedance-1-0-lite-i2v-250428
                    - doubao-seedance-1-0-lite-t2v-250428
                    - doubao-seedance-1-0-pro-250528
                    - doubao-seedance-1-0-pro-fast-251015
                    - doubao-seedance-1-5-pro-251215
                    - doubao-seedance-2-0-260128
                    - doubao-seedance-2-0-fast-260128
                    - veo3
                    - veo3-fast
                    - veo3-fast-frames
                    - veo3-frames
                    - veo3-pro
                    - veo3-pro-frames
                    - veo3.1
                    - veo3.1-4k
                    - veo3.1-components
                    - veo3.1-fast
                    - veo3.1-pro
                    - veo3.1-pro-4k
                    - kling-video
                    - grok-imagine-1.0-video
                    - grok-imagine-video-1.5-preview
                    - grok-video-3
                    - minimax-h3
                    - hailuo-2.3
                    - viduq3-turbo
                  example: sora-2
                prompt:
                  type: string
                  description: 統一提示詞入口。大多數模型必填。
                image:
                  type: string
                  format: binary
                  description: 單圖進入點，部分相容模式會映射至 images。
                duration:
                  type: integer
                  description: 統一時長入口，部分模型也接受 seconds。
                width:
                  type: integer
                  example: 512
                  description: Video width
                height:
                  type: integer
                  example: 512
                  description: Video height
                fps:
                  type: integer
                  example: 30
                  description: Video frame rate
                seed:
                  type: integer
                  example: 20231234
                  description: Random seed
                'n':
                  type: integer
                  example: 1
                  description: Number of videos to generate
                response_format:
                  type: string
                  example: url
                  description: Response format
                user:
                  type: string
                  example: user-1234
                  description: User identifier
                metadata:
                  type: object
                  additionalProperties: true
                  description: 動態擴充欄位容器。大量模型特定欄位由此進行還原序列化。
                mode:
                  type: string
                  description: 選填，影片生成模式。 `gemini-omni` 支援 `t2v`、`r2v`、`edit`。
                images:
                  type: array
                  description: 統一多圖入口。Vidu、Seedance、Veo 等會使用。
                  items:
                    type: string
                content:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                size:
                  type: string
                  description: 統一尺寸入口，會映射為 resolution/aspect_ratio 等。
                seconds:
                  type: string
                  description: Sora 相容入口，執行時會回退到 duration。
                input_reference:
                  type: string
                  description: Sora/Veo 相容參考圖入口，可為 multipart 檔案或相容物件。
                parameters:
                  type: object
                  additionalProperties: true
              required:
                - model
                - prompt
            examples:
              openai_i2v_json:
                summary: OpenAI Sora i2v (application/json)
                value:
                  size: 1280x720
                  images:
                    - https://example.png
                  model: sora-2
                  prompt: this is an example
                  duration: 12
                  fps: '24'
                  seed: '20231024'
                  mode: i2v
              openai_i2v_input_reference:
                summary: OpenAI i2v (input_reference)
                value:
                  model: sora-2
                  prompt: A cinematic drone shot over snowy mountains at sunrise
                  input_reference:
                    image_url: https://example.com/input.jpg
                  seconds: '8'
                  size: 1280x720
                  response_format: url
              openai_alias_compat:
                summary: Alias兼容 (image_url/duration/aspect_ratio)
                value:
                  model: sora-2
                  prompt: A cinematic drone shot over snowy mountains at sunrise
                  image_url: https://example.com/input.jpg
                  duration: '8'
                  aspect_ratio: '16:9'
                  response_format: url
              gemini_omni_sora_t2v:
                summary: Gemini Omni Sora t2v
                value:
                  model: gemini-omni
                  mode: t2v
                  prompt: A cinematic product video with smooth camera motion
                  duration: 8
                  size: 1280x720
              gemini_omni_sora_r2v:
                summary: Gemini Omni Sora r2v
                value:
                  model: gemini-omni
                  mode: r2v
                  content:
                    - type: text
                      text: Keep the product consistent and create a short ad video
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                  duration: 8
                  size: 1280x720
              gemini_omni_sora_edit:
                summary: Gemini Omni Sora edit
                value:
                  model: gemini-omni
                  mode: edit
                  content:
                    - type: text
                      text: Change the outfit color while keeping the motion natural
                    - type: video_url
                      video_url:
                        url: https://example.com/input.mp4
                    - type: image_url
                      image_url:
                        url: https://example.com/style.jpg
                  duration: 8
                  size: 1280x720
              happyhorse_sora_t2v:
                summary: HappyHorse Sora t2v
                value:
                  model: happyhorse-1.0
                  mode: t2v
                  content:
                    - type: text
                      text: >-
                        A cinematic white horse running through a neon city
                        street
                  duration: 5
                  resolution: 720P
                  ratio: '16:9'
              happyhorse_sora_i2v:
                summary: HappyHorse Sora i2v
                value:
                  model: happyhorse-1.0
                  mode: i2v
                  content:
                    - type: text
                      text: The camera slowly pushes in, natural motion
                    - type: image_url
                      image_url: https://example.com/first-frame.jpg
                  duration: 5
                  resolution: 720P
              happyhorse_sora_r2v:
                summary: HappyHorse Sora r2v
                value:
                  size: 720x1280
                  model: happyhorse-1.0
                  mode: r2v
                  prompt: this is an example
                  duration: 15
                  content:
                    - type: text
                      text: this is an example
                    - type: image_url
                      image_url:
                        url: https://example.png
                      role: reference_image
                      name: image1
                  parameters:
                    resolution: 720P
                    ratio: '9:16'
                    duration: 15
                    seed: 1
              happyhorse_sora_video_edit:
                summary: HappyHorse Sora video_edit
                value:
                  model: happyhorse-1.0
                  mode: video_edit
                  content:
                    - type: text
                      text: >-
                        Change the jacket to a striped sweater and keep the
                        motion natural
                    - type: video_url
                      video_url: https://example.com/input.mp4
                    - type: image_url
                      image_url: https://example.com/reference.jpg
                  resolution: 720P
              seedance_i2v_first:
                summary: Seedance i2v_first
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: i2v_first
                  prompt: A panda skateboarding in a city street, cinematic
                  image_urls:
                    - https://example.com/first.jpg
                  seconds: '5'
                  size: 1280x720
              seedance_i2v_first_last:
                summary: Seedance i2v_first_last
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: i2v_first_last
                  prompt: A camera moves from first frame to last frame naturally
                  image_urls:
                    - https://example.com/first.jpg
                  end_image_url: https://example.com/last.jpg
                  seconds: '5'
                  size: 1280x720
              seedance_reference_images:
                summary: Seedance reference_images
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: reference_images
                  prompt: Stylized short video keeping character consistency
                  reference_images:
                    - https://example.com/ref-1.jpg
                    - https://example.com/ref-2.jpg
                  seconds: '5'
                  size: 1280x720
              seedance_reference_material:
                summary: Seedance 全能參考模式(reference_material)
                value:
                  model: doubao-seedance-1-0-lite-i2v-250428
                  mode: reference_material
                  prompt: >-
                    Blend image and short reference video into a coherent
                    cinematic clip
                  reference_images:
                    - https://example.com/ref-1.jpg
                    - https://example.com/ref-2.jpg
                  video_urls:
                    - https://example.com/ref-video.mp4
                  audio_urls:
                    - https://example.com/ref-audio.mp3
                  seconds: '5'
                  size: 1280x720
              seedance_volc_content:
                summary: Seedance 火山方舟 content 模式
                value:
                  size: 1280x720
                  model: doubao-seedance-2-0-fast-260128
                  prompt: this is an example
                  duration: 15
                  fps: '24'
                  seed: '20231024'
                  mode: reference_material
                  content:
                    - type: text
                      text: this is an example
                    - type: image_url
                      image_url:
                        url: https://example.png
                      role: reference_image
                      name: image1
                    - type: audio_url
                      audio_url:
                        url: https://example.mp3
                      role: reference_audio
                      name: audio1
              veo_first_last_frame:
                summary: Veo 首尾幀模式
                value:
                  model: veo3.1-fast
                  prompt: >-
                    A smooth transition from first frame to last frame,
                    cinematic motion
                  image_urls:
                    - https://example.com/first-frame.jpg
                  end_image_url: https://example.com/last-frame.jpg
                  seconds: '8'
                  size: 1280x720
              veo_reference_images_1to3:
                summary: Veo 1~3 張參考圖模式
                value:
                  model: veo3.1-fast
                  prompt: >-
                    Use reference style and character consistency for a short ad
                    clip
                  reference_images:
                    - https://example.com/ref-1.jpg
                  seconds: '8'
                  size: 1280x720
              kling_text2video:
                summary: Kling 文生影片
                value:
                  model: kling-video
                  prompt: A cat playing piano in the garden
                  duration: 5
                  size: 1280x720
                  metadata:
                    negative_prompt: blurry, low quality
                    mode: std
              kling_image2video:
                summary: Kling 圖生影片
                value:
                  model: kling-video
                  prompt: A cat playing piano in the garden
                  image: https://example.com/input.jpg
                  duration: 5
                  size: 1280x720
                  metadata:
                    negative_prompt: blurry, low quality
                    mode: std
              grok_reference_video:
                summary: Grok 視訊模式
                value:
                  model: grok-imagine-1.0-video
                  prompt: A dramatic cinematic shot with fast motion and rich lighting
                  reference_images:
                    - https://example.com/ref-1.jpg
                  seconds: 10
                  aspect_ratio: '16:9'
                  resolution: 720P
              minimax_h3_sora_reference:
                summary: MiniMax H3 多素材影片
                value:
                  model: minimax-h3
                  prompt: A cinematic product video with smooth camera motion
                  content:
                    - type: text
                      text: >-
                        Use the product image as reference and match the rhythm
                        of the audio.
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                      name: product
                    - type: audio_url
                      audio_url:
                        url: https://example.com/music.mp3
                      role: reference_audio
                      name: music
                  duration: 8
                  resolution: 1440p
                  aspect_ratio: '16:9'
                  generate_audio: true
              hailuo_2_3_sora_first_frame:
                summary: Hailuo 2.3 首幀圖生影片
                value:
                  model: hailuo-2.3
                  prompt: >-
                    The camera slowly pushes in, natural motion and cinematic
                    lighting.
                  content:
                    - type: text
                      text: >-
                        The camera slowly pushes in, natural motion and
                        cinematic lighting.
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
                      name: first
                  duration: 10
                  resolution: 768p
                  aspect_ratio: '16:9'
              vidu_sora_t2v:
                summary: Vidu Sora t2v
                value:
                  model: viduq3-turbo
                  mode: t2v
                  content:
                    - type: text
                      text: A stylish product ad clip with cinematic lighting
                  duration: 5
                  resolution: 720p
                  aspect_ratio: '16:9'
              vidu_sora_i2v:
                summary: Vidu Sora i2v
                value:
                  model: viduq3-turbo
                  mode: i2v
                  content:
                    - type: text
                      text: A stylish ad clip from a product still image
                    - type: image_url
                      image_url: https://example.com/product.jpg
                  duration: 5
                  resolution: 720p
              vidu_sora_first_last:
                summary: Vidu Sora i2v_first_last
                value:
                  model: viduq3-turbo
                  mode: i2v_first_last
                  content:
                    - type: text
                      text: A smooth shot from start frame to end frame
                    - type: image_url
                      image_url: https://example.com/start.jpg
                    - type: image_url
                      image_url: https://example.com/end.jpg
                  duration: 5
                  resolution: 720p
              vidu_sora_reference:
                summary: Vidu Sora reference_images
                value:
                  model: viduq3-turbo
                  mode: reference_images
                  content:
                    - type: text
                      text: Maintain product style and character consistency
                    - type: image_url
                      image_url: https://example.com/ref-1.jpg
                    - type: image_url
                      image_url: https://example.com/ref-2.jpg
                    - type: image_url
                      image_url: https://example.com/ref-3.jpg
                  duration: 5
                  resolution: 720p
                  aspect_ratio: '16:9'
              hailuo_text2video:
                summary: Hailuo 2.3 首幀圖生影片
                value:
                  model: hailuo-2.3
                  prompt: A cinematic travel shot over the coastline
                  image_urls:
                    - https://example.com/first-frame.jpg
                  duration: 6
                  resolution: 768p
                  aspect_ratio: '16:9'
      responses:
        '200':
          description: 成功建立影片任務
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  task_id:
                    type: string
                    description: 相容舊介面 待廢棄
                  object:
                    type: string
                  model:
                    type: string
                  status:
                    type: string
                    description: >-
                      Should use VideoStatus constants: VideoStatusQueued,
                      VideoStatusInProgress, VideoStatusCompleted,
                      VideoStatusFailed
                    enum:
                      - queued
                      - in_progress
                      - completed
                      - failed
                      - video_url
                      - url
                      - completed_at
                  progress:
                    type: integer
                  created_at:
                    type: integer
                  completed_at:
                    type: integer
                  expires_at:
                    type: integer
                  seconds:
                    type: string
                  size:
                    type: string
                  remixed_from_video_id:
                    type: string
                  error:
                    type: object
                  metadata:
                    type: object
                    additionalProperties: true
                  output:
                    type: object
                  request_id:
                    type: string
                required:
                  - created_at
                  - id
                  - model
                  - object
                  - progress
                  - status
              example:
                id: video_abc123
                object: video
                model: sora-2
                status: queued
                progress: 0
                created_at: 1764347090922
                seconds: '8'
          headers: {}
        '400':
          description: 請求參數錯誤
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 錯誤訊息
            type:
              type: string
              description: 錯誤類型
            param:
              type: string
              description: 相關參數
              nullable: true
            code:
              type: string
              description: 錯誤代碼
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 認證。
        格式: `Authorization: Bearer sk-xxxxxx`

````