> ## Documentation Index
> Fetch the complete documentation index at: https://docs.newapi.si/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 4.0 直接使用标准视频参数；具体请求格式见 4.6 节。

### 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 4.0 视频

对外模型：`kling-4.0`（720p）、`kling-4.0-1080p`。原生格式可使用 `POST /text-to-video/kling-4.0`、`POST /image-to-video/kling-4.0`、`POST /omni-video/kling-4.0`，并通过 `GET /tasks?task_ids=任务ID` 查询。原生请求无需 `model`，由 `settings.resolution` 选择清晰度，默认1080p；原生参考图/视频类型为 `refer_image`、`feature_video`，创建返回 `data` 对象，查询返回 `data` 数组。可通过 `POST /api/v3/contents/generations/tasks` 或 `POST /v1/videos` 提交，分别通过对应路径的 `GET /{task_id}` 查询。OpenAI/Sora 直接使用 `prompt`、`seconds`、`size` 和 `input_reference`；Seedance 直接使用 `content` 与顶层 `duration/resolution/ratio/mode`，两者都无需额外 `contents/settings/options`。`kling-4.0` 对应 720p，`kling-4.0-1080p` 对应 1080p；请让 `settings.resolution` 与模型名一致。`settings` 中使用 `duration`（4–30 秒）、`resolution`（720p/1080p）、`aspect_ratio`（21:9、16:9、9:16、1:1）。当前接口最多支持 10 张参考图、5 段参考视频。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL：/v1/videos 使用 audio_urls，Seedance 使用 content 的 audio_url 项；需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。

```json
{
  "model": "kling-4.0",
  "prompt": "A cinematic product shot",
  "seconds": "4",
  "size": "1280x720",
  "input_reference": "https://example.com/product.jpg"
}
```

### 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 秒档。

Kling 4.0 可直接使用 Seedance 格式 content/duration/resolution/ratio/mode，或 OpenAI 视频格式 prompt/seconds/size/input_reference；两者都无需额外的 contents/settings/options。mode 可选 t2v（纯文本）、i2v（单张首帧）、i2v_first_last（首尾两帧）、reference_images（普通参考图）、reference_material（全能素材参考，音频须使用支持该能力的路由）。省略 mode 且没有显式工具时，有参考素材默认 reference_material，无任何参考素材默认 t2v。参考模式使用普通参考图角色，不把明确的首尾帧静默改成参考图；首尾帧请显式选择 i2v 或 i2v_first_last，并省略画幅参数。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL：/v1/videos 使用 audio_urls，Seedance 使用 content 的 audio_url 项；需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。

Vidu Q4：`vidu-q4` 固定 720p，`vidu-q4-540p` 固定 540p，支持生成 3～16 秒视频。至少需要 1 张图片，最多支持 15 张参考图；参考生成可附带最多 3 段 MP3 音频，每段 3～12 秒、最大 50MB。不支持纯文生、指定首尾帧或参考视频。多张图片用于共同参考，不表示首尾位置。可通过 `POST /v1/videos`、`POST /api/v3/contents/generations/tasks`，或 Vidu 格式 `POST /ent/v2/img2video`、`POST /ent/v2/reference2video` 创建任务。统一入口推荐使用 `mode=reference_images`；带音频时使用 `mode=reference_material`。参考音频可用 `audio_urls`，Seedance 格式也可用标准 `content` 的 `audio_url` 项；`audio` 布尔字段表示生成音频开关，与参考音频 URL 列表分别使用。分辨率须与模型名一致。

### Magi-2 1080p

`magi-2-1080p` 支持 OpenAI `/v1/videos` 和 Ark `/api/v3/contents/generations/tasks` 两种格式，分别通过对应路径的 `GET /{task_id}` 查询。固定 1080p，生成时长 4～30 秒。支持 16:9、9:16、1:1、4:3、3:4、21:9；1:1 输出为 1440×1440。参考模式最多 10 张图片、5 段视频、5 段音频，共 20 份素材。每段视频和音频为 2～30 秒，所有视频累计不超过 30 秒，所有音频累计不超过 30 秒。图片上限 30 MB，视频 200 MB，音频 15 MB。首尾帧模式不能混入其他图片、视频或音频参考。提示词可用 `<<<image_1>>>`、`<<<video_1>>>`、`<<<audio_1>>>` 按各类素材输入顺序引用。当前不提供独立 sand.ai 官方格式入口。

```json
{
  "model": "magi-2-1080p",
  "prompt": "以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。",
  "seconds": "4",
  "size": "1440x1440",
  "image_urls": [
    "https://example.com/blocks.png"
  ],
  "video_urls": [
    "https://example.com/rotation.mp4"
  ],
  "audio_urls": [
    "https://example.com/rhythm.wav"
  ]
}
```



## OpenAPI

````yaml api-reference/cn/openapi.json POST /v1/videos
openapi: 3.0.0
info:
  title: NewAPIs API 参考文档
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.newapi.si
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 4.0 直接使用标准视频参数；具体请求格式见 4.6 节。


        ### 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 4.0 视频


        对外模型：`kling-4.0`（720p）、`kling-4.0-1080p`。原生格式可使用 `POST
        /text-to-video/kling-4.0`、`POST /image-to-video/kling-4.0`、`POST
        /omni-video/kling-4.0`，并通过 `GET /tasks?task_ids=任务ID` 查询。原生请求无需
        `model`，由 `settings.resolution` 选择清晰度，默认1080p；原生参考图/视频类型为
        `refer_image`、`feature_video`，创建返回 `data` 对象，查询返回 `data` 数组。可通过 `POST
        /api/v3/contents/generations/tasks` 或 `POST /v1/videos` 提交，分别通过对应路径的
        `GET /{task_id}` 查询。OpenAI/Sora 直接使用 `prompt`、`seconds`、`size` 和
        `input_reference`；Seedance 直接使用 `content` 与顶层
        `duration/resolution/ratio/mode`，两者都无需额外
        `contents/settings/options`。`kling-4.0` 对应 720p，`kling-4.0-1080p` 对应
        1080p；请让 `settings.resolution` 与模型名一致。`settings` 中使用 `duration`（4–30
        秒）、`resolution`（720p/1080p）、`aspect_ratio`（21:9、16:9、9:16、1:1）。当前接口最多支持
        10 张参考图、5 段参考视频。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL：/v1/videos 使用
        audio_urls，Seedance 使用 content 的 audio_url
        项；需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。


        ```json

        {
          "model": "kling-4.0",
          "prompt": "A cinematic product shot",
          "seconds": "4",
          "size": "1280x720",
          "input_reference": "https://example.com/product.jpg"
        }

        ```


        ### 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 秒档。


        Kling 4.0 可直接使用 Seedance 格式 content/duration/resolution/ratio/mode，或
        OpenAI 视频格式 prompt/seconds/size/input_reference；两者都无需额外的
        contents/settings/options。mode 可选
        t2v（纯文本）、i2v（单张首帧）、i2v_first_last（首尾两帧）、reference_images（普通参考图）、reference_material（全能素材参考，音频须使用支持该能力的路由）。省略
        mode 且没有显式工具时，有参考素材默认 reference_material，无任何参考素材默认
        t2v。参考模式使用普通参考图角色，不把明确的首尾帧静默改成参考图；首尾帧请显式选择 i2v 或
        i2v_first_last，并省略画幅参数。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL：/v1/videos 使用
        audio_urls，Seedance 使用 content 的 audio_url
        项；需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。


        Vidu Q4：`vidu-q4` 固定 720p，`vidu-q4-540p` 固定 540p，支持生成 3～16 秒视频。至少需要 1
        张图片，最多支持 15 张参考图；参考生成可附带最多 3 段 MP3 音频，每段 3～12 秒、最大
        50MB。不支持纯文生、指定首尾帧或参考视频。多张图片用于共同参考，不表示首尾位置。可通过 `POST /v1/videos`、`POST
        /api/v3/contents/generations/tasks`，或 Vidu 格式 `POST
        /ent/v2/img2video`、`POST /ent/v2/reference2video` 创建任务。统一入口推荐使用
        `mode=reference_images`；带音频时使用 `mode=reference_material`。参考音频可用
        `audio_urls`，Seedance 格式也可用标准 `content` 的 `audio_url` 项；`audio`
        布尔字段表示生成音频开关，与参考音频 URL 列表分别使用。分辨率须与模型名一致。


        ### Magi-2 1080p


        `magi-2-1080p` 支持 OpenAI `/v1/videos` 和 Ark
        `/api/v3/contents/generations/tasks` 两种格式，分别通过对应路径的 `GET /{task_id}`
        查询。固定 1080p，生成时长 4～30 秒。支持 16:9、9:16、1:1、4:3、3:4、21:9；1:1 输出为
        1440×1440。参考模式最多 10 张图片、5 段视频、5 段音频，共 20 份素材。每段视频和音频为 2～30 秒，所有视频累计不超过
        30 秒，所有音频累计不超过 30 秒。图片上限 30 MB，视频 200 MB，音频 15
        MB。首尾帧模式不能混入其他图片、视频或音频参考。提示词可用
        `<<<image_1>>>`、`<<<video_1>>>`、`<<<audio_1>>>` 按各类素材输入顺序引用。当前不提供独立
        sand.ai 官方格式入口。


        ```json

        {
          "model": "magi-2-1080p",
          "prompt": "以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。",
          "seconds": "4",
          "size": "1440x1440",
          "image_urls": [
            "https://example.com/blocks.png"
          ],
          "video_urls": [
            "https://example.com/rotation.mp4"
          ],
          "audio_urls": [
            "https://example.com/rhythm.wav"
          ]
        }

        ```
      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.1
                    - happyhorse-1.1-1080p
                    - wan-3.0-prime
                    - wan-3.0-prime-1080p
                    - sd-2-5-4k
                    - sd-2-5-flash
                    - sd-2-5-flash-480p
                    - 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
                    - sd-2-5
                    - 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-4.0
                    - kling-4.0-1080p
                    - grok-imagine-1.0-video
                    - grok-imagine-video-1.5-preview
                    - grok-video-3
                    - minimax-h3
                    - hailuo-2.3
                    - viduq3-turbo
                    - viduq2
                    - vidu2.0
                    - vidu-q4
                    - vidu-q4-540p
                    - magi-2-1080p
                  example: sora-2
                prompt:
                  type: string
                  description: >-
                    视频描述。Kling 4.0 的标准 OpenAI/Sora 请求直接使用 prompt；使用标准 Seedance
                    格式时可在 content 的 text 项中提供文本，无需
                    contents/settings/options。其他模型按各自格式要求提供文本。
                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: 动态扩展字段容器。大量模型特有字段从这里反序列化。
                tool:
                  type: string
                mode:
                  type: string
                  description: >-
                    可选，视频生成模式。 `gemini-omni` 支持 `t2v`、`r2v`、`edit`。


                    Kling 4.0 可直接使用 Seedance 格式
                    content/duration/resolution/ratio/mode，或 OpenAI 视频格式
                    prompt/seconds/size/input_reference；两者都无需额外的
                    contents/settings/options。mode 可选
                    t2v（纯文本）、i2v（单张首帧）、i2v_first_last（首尾两帧）、reference_images（普通参考图）、reference_material（全能素材参考，音频须使用支持该能力的路由）。省略
                    mode 且没有显式工具时，有参考素材默认 reference_material，无任何参考素材默认
                    t2v。参考模式使用普通参考图角色，不把明确的首尾帧静默改成参考图；首尾帧请显式选择 i2v 或
                    i2v_first_last，并省略画幅参数。Kling 4.0 默认音画同出。全能参考模式支持公网音频
                    URL：/v1/videos 使用 audio_urls，Seedance 使用 content 的 audio_url
                    项；需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。
                  example: reference_material
                  x-kling-modes:
                    - t2v
                    - i2v
                    - i2v_first_last
                    - reference_images
                    - reference_material
                images:
                  type: array
                  description: 统一多图入口。Vidu、Seedance、Veo 等会使用。
                  items:
                    type: string
                content:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: >-
                    Seedance 格式也可调用 Kling 4.0；文本使用 text，图片/视频/音频使用
                    image_url/video_url/audio_url 对象。图片 role 为
                    first_frame、last_frame 或 reference_image，视频为
                    reference_video，音频为
                    reference_audio。参考音频须使用支持该能力的全能参考路由，不能由输出音轨推定所有路由均可输入音频。用
                    mode 区分生成场景。
                contents:
                  type: array
                  minItems: 1
                  description: Kling 4.0 旧信封兼容字段；标准 OpenAI/Sora、Seedance 请求无需提供。
                  items:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
                        enum:
                          - prompt
                          - reference_image
                          - reference_video
                          - first_frame
                          - last_frame
                      text:
                        type: string
                        description: type=prompt 时的文本描述。
                      url:
                        type: string
                        format: uri
                        description: 参考素材或首尾帧的可访问 URL。
                settings:
                  type: object
                  description: 旧信封兼容设置；标准格式直接使用 seconds/size 或 duration/resolution/ratio。
                  properties:
                    duration:
                      type: integer
                      minimum: 4
                      maximum: 30
                      example: 4
                    resolution:
                      type: string
                      enum:
                        - 720p
                        - 1080p
                    aspect_ratio:
                      type: string
                      enum:
                        - '21:9'
                        - '16:9'
                        - '9:16'
                        - '1:1'
                options:
                  type: object
                  maxProperties: 0
                  description: 旧信封兼容字段；标准格式无需提供。
                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
                audio_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                  description: >-
                    标准 OpenAI/Sora、Seedance 的参考音频 URL
                    列表；仅用于支持音频参考的全能参考路由，与生成输出音轨开关不同。
                resolution:
                  type: string
                  description: 输出分辨率，常见值 `540p`、`720p`、`1080p`。
              required:
                - model
            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
              canvas_video_tier:
                summary: 固定分辨率视频
                value:
                  model: happyhorse-1.1-1080p
                  prompt: A white horse walking through a meadow.
                  seconds: '5'
                  size: 1920x1080
              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_4_sora:
                summary: Kling 4.0 720p OpenAI 视频格式
                value:
                  model: kling-4.0
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1280x720
                  input_reference: https://example.com/product.jpg
              kling_4_sora_1080p:
                summary: Kling 4.0 1080p OpenAI 视频格式
                value:
                  model: kling-4.0-1080p
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1920x1080
                  input_reference: https://example.com/product.jpg
              kling_4_seedance_reference_material:
                summary: Kling 4.0 720p Seedance · 默认素材参考
                value:
                  model: kling-4.0
                  mode: reference_material
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_seedance_t2v:
                summary: Kling 4.0 720p Seedance · 纯文本
                value:
                  model: kling-4.0
                  mode: t2v
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                  ratio: '16:9'
              kling_4_seedance_i2v:
                summary: Kling 4.0 720p Seedance · 首帧图生
                value:
                  model: kling-4.0
                  mode: i2v
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
              kling_4_seedance_i2v_first_last:
                summary: Kling 4.0 720p Seedance · 首尾帧
                value:
                  model: kling-4.0
                  mode: i2v_first_last
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
                    - type: image_url
                      image_url:
                        url: https://example.com/last-frame.jpg
                      role: last_frame
              kling_4_seedance_reference_images:
                summary: Kling 4.0 720p Seedance · 参考图片
                value:
                  model: kling-4.0
                  mode: reference_images
                  duration: 4
                  resolution: 720p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_seedance_reference_material_1080p:
                summary: Kling 4.0 1080p Seedance · 默认素材参考
                value:
                  model: kling-4.0-1080p
                  mode: reference_material
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_seedance_t2v_1080p:
                summary: Kling 4.0 1080p Seedance · 纯文本
                value:
                  model: kling-4.0-1080p
                  mode: t2v
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                  ratio: '16:9'
              kling_4_seedance_i2v_1080p:
                summary: Kling 4.0 1080p Seedance · 首帧图生
                value:
                  model: kling-4.0-1080p
                  mode: i2v
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
              kling_4_seedance_i2v_first_last_1080p:
                summary: Kling 4.0 1080p Seedance · 首尾帧
                value:
                  model: kling-4.0-1080p
                  mode: i2v_first_last
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/first-frame.jpg
                      role: first_frame
                    - type: image_url
                      image_url:
                        url: https://example.com/last-frame.jpg
                      role: last_frame
              kling_4_seedance_reference_images_1080p:
                summary: Kling 4.0 1080p Seedance · 参考图片
                value:
                  model: kling-4.0-1080p
                  mode: reference_images
                  duration: 4
                  resolution: 1080p
                  content:
                    - type: text
                      text: A cinematic product shot with natural motion
                    - type: image_url
                      image_url:
                        url: https://example.com/product.jpg
                      role: reference_image
                  ratio: '16:9'
              kling_4_text:
                summary: Kling 4.0 720p 文生视频（旧信封兼容）
                value:
                  model: kling-4.0
                  mode: t2v
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                  settings:
                    duration: 4
                    resolution: 720p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference:
                summary: Kling 4.0 720p 参考生成（旧信封兼容）
                value:
                  model: kling-4.0
                  mode: reference_material
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                    - type: reference_image
                      url: https://example.com/product.jpg
                    - type: reference_video
                      url: https://example.com/motion.mp4
                  settings:
                    duration: 4
                    resolution: 720p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference_audio:
                summary: Kling 4.0 720p 全能参考音频 URL
                value:
                  model: kling-4.0
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1280x720
                  input_reference: https://example.com/product.jpg
                  mode: reference_material
                  audio_urls:
                    - https://example.com/reference.mp3
              kling_4_text_1080p:
                summary: Kling 4.0 1080p 文生视频（旧信封兼容）
                value:
                  model: kling-4.0-1080p
                  mode: t2v
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                  settings:
                    duration: 4
                    resolution: 1080p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference_1080p:
                summary: Kling 4.0 1080p 参考生成（旧信封兼容）
                value:
                  model: kling-4.0-1080p
                  mode: reference_material
                  contents:
                    - type: prompt
                      text: A cinematic product shot with natural motion
                    - type: reference_image
                      url: https://example.com/product.jpg
                    - type: reference_video
                      url: https://example.com/motion.mp4
                  settings:
                    duration: 4
                    resolution: 1080p
                    aspect_ratio: '16:9'
                  options: {}
              kling_4_reference_audio_1080p:
                summary: Kling 4.0 1080p 全能参考音频 URL
                value:
                  model: kling-4.0-1080p
                  prompt: A cinematic product shot with natural motion
                  seconds: '4'
                  size: 1920x1080
                  input_reference: https://example.com/product.jpg
                  mode: reference_material
                  audio_urls:
                    - https://example.com/reference.mp3
              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'
              vidu_q4_openai_720p_reference:
                summary: Vidu Q4 720p 多图 / 音频参考
                value:
                  model: vidu-q4
                  prompt: 保持参考图中的主体与色彩，镜头缓慢推进，主体自然运动。
                  resolution: 720p
                  mode: reference_material
                  seconds: '3'
                  images:
                    - https://example.com/reference-1.jpg
                    - https://example.com/reference-2.jpg
                  audio_urls:
                    - https://example.com/reference-1.mp3
                    - https://example.com/reference-2.mp3
              vidu_q4_openai_540p_reference:
                summary: Vidu Q4 540p 多图 / 音频参考
                value:
                  model: vidu-q4-540p
                  prompt: 保持参考图中的主体与色彩，镜头缓慢推进，主体自然运动。
                  resolution: 540p
                  mode: reference_material
                  seconds: '3'
                  images:
                    - https://example.com/reference-1.jpg
                    - https://example.com/reference-2.jpg
                  audio_urls:
                    - https://example.com/reference-1.mp3
                    - https://example.com/reference-2.mp3
              magi_2_1080p_openai:
                summary: Magi-2 1080p 图/视频/音频参考
                value:
                  model: magi-2-1080p
                  prompt: >-
                    以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及
                    <<<audio_1>>> 的轻柔节奏。
                  seconds: '4'
                  size: 1440x1440
                  image_urls:
                    - https://example.com/blocks.png
                  video_urls:
                    - https://example.com/rotation.mp4
                  audio_urls:
                    - https://example.com/rhythm.wav
      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`

````

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