> ## 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.

# 创建视频(HappyHorse与Wan)

> 该系列支持OpenAI视频生成格式（详见链接 [视频生成Sora兼容格式](/api-reference/cn/视频生成sora兼容格式/创建视频)）。

HappyHorse 与 Wan 视频生成接口，公开路径遵循 DashScope 官方协议。

HappyHorse 支持 `happyhorse-1.0`、`happyhorse-1.0-i2v`、`happyhorse-1.0-t2v`、`happyhorse-1.0-r2v`、`happyhorse-1.0-video-edit`；Wan 支持 `wan-3.0`、`wan-3.0-480p`、`wan-3.0-1080p`。其中 `happyhorse-1.0` 是聚合模型，需要通过 `mode` 区分 `t2v`、`i2v`、`r2v`、`video_edit`。Wan 三个模型分别固定 720P、480P、1080P，支持 2～30 秒及最多 10 图、5 视频、5 音频参考。

公开接口保持官方端点格式；渠道专用前缀仅用于网关请求特定上游渠道时内部拼接。客户端不需要显式传 `X-DashScope-Async`，由网关或官方渠道适配层处理。

补充 HappyHorse 与 Wan 视频生成格式的公开请求骨架、任务查询结构和推荐验证模板，公开路径保持 DashScope 官方端点格式。

支持模型：
happyhorse-1.0, happyhorse-1.0-t2v, happyhorse-1.0-i2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, wan-3.0, wan-3.0-480p, wan-3.0-1080p

统一请求字段：
- `model` (string, 必填): HappyHorse 或 Wan 对外模型名。Wan 支持 `wan-3.0`、`wan-3.0-480p`、`wan-3.0-1080p`；HappyHorse 聚合模型 `happyhorse-1.0` 需配合 `mode` 使用。
- `mode` (string, 可选): 聚合模型模式，常见值为 `t2v`、`i2v`、`r2v`、`video_edit`。固定子模型可不传。
- `input.prompt` (string, 必填): 视频生成或编辑提示词。
- `input.media` (array[object], 可选): 多媒体输入。支持 `first_frame`、`last_frame`、`reference_image`、`reference_video`、`reference_audio`；Wan 最多支持 10 图、5 视频、5 音频。
- `parameters.duration` (integer, 可选): 生成时长，单位秒。
- `parameters.resolution` (string, 可选): 输出分辨率。Wan 三个模型分别固定 `720P`、`480P`、`1080P`；HappyHorse 常见值为 `720P`、`1080P`。
- `parameters.ratio` (string, 可选): 输出宽高比，文生视频和参考生视频常用。
- `parameters.watermark` (boolean, 可选): 是否添加水印。
- `parameters.seed` (integer, 可选): 随机种子。

常见模型/模式差异：
- `HappyHorse 聚合模型`: 支持模型 happyhorse-1.0；聚合模型通过 mode 区分最终模型。
- `HappyHorse 文生视频`: 支持模型 happyhorse-1.0-t2v；官方格式文生视频。
- `HappyHorse 首帧图生视频`: 支持模型 happyhorse-1.0-i2v；官方格式首帧图生视频。
- `HappyHorse 参考生视频`: 支持模型 happyhorse-1.0-r2v；官方格式多参考图生视频。
- `HappyHorse 视频编辑`: 支持模型 happyhorse-1.0-video-edit；官方格式视频编辑。
- `Wan 3.0 720P`: 支持模型 wan-3.0；Wan 3.0 官方格式多模态参考视频生成。
- `Wan 3.0 480P`: 支持模型 wan-3.0-480p；固定 480P 的 Wan 3.0 官方格式调用。
- `Wan 3.0 1080P`: 支持模型 wan-3.0-1080p；固定 1080P 的 Wan 3.0 官方格式调用。



## OpenAPI

````yaml api-reference/cn/openapi.json POST /api/v1/services/aigc/video-generation/video-synthesis
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:
  /api/v1/services/aigc/video-generation/video-synthesis:
    post:
      tags:
        - 视频生成HappyHorse与Wan
      summary: 创建视频(HappyHorse与Wan)
      description: >-
        该系列支持OpenAI视频生成格式（详见链接
        [视频生成Sora兼容格式](/api-reference/cn/视频生成sora兼容格式/创建视频)）。


        HappyHorse 与 Wan 视频生成接口，公开路径遵循 DashScope 官方协议。


        HappyHorse 支持
        `happyhorse-1.0`、`happyhorse-1.0-i2v`、`happyhorse-1.0-t2v`、`happyhorse-1.0-r2v`、`happyhorse-1.0-video-edit`；Wan
        支持 `wan-3.0`、`wan-3.0-480p`、`wan-3.0-1080p`。其中 `happyhorse-1.0`
        是聚合模型，需要通过 `mode` 区分 `t2v`、`i2v`、`r2v`、`video_edit`。Wan 三个模型分别固定
        720P、480P、1080P，支持 2～30 秒及最多 10 图、5 视频、5 音频参考。


        公开接口保持官方端点格式；渠道专用前缀仅用于网关请求特定上游渠道时内部拼接。客户端不需要显式传
        `X-DashScope-Async`，由网关或官方渠道适配层处理。


        补充 HappyHorse 与 Wan 视频生成格式的公开请求骨架、任务查询结构和推荐验证模板，公开路径保持 DashScope 官方端点格式。


        支持模型：

        happyhorse-1.0, happyhorse-1.0-t2v, happyhorse-1.0-i2v,
        happyhorse-1.0-r2v, happyhorse-1.0-video-edit, wan-3.0, wan-3.0-480p,
        wan-3.0-1080p


        统一请求字段：

        - `model` (string, 必填): HappyHorse 或 Wan 对外模型名。Wan 支持
        `wan-3.0`、`wan-3.0-480p`、`wan-3.0-1080p`；HappyHorse 聚合模型
        `happyhorse-1.0` 需配合 `mode` 使用。

        - `mode` (string, 可选): 聚合模型模式，常见值为
        `t2v`、`i2v`、`r2v`、`video_edit`。固定子模型可不传。

        - `input.prompt` (string, 必填): 视频生成或编辑提示词。

        - `input.media` (array[object], 可选): 多媒体输入。支持
        `first_frame`、`last_frame`、`reference_image`、`reference_video`、`reference_audio`；Wan
        最多支持 10 图、5 视频、5 音频。

        - `parameters.duration` (integer, 可选): 生成时长，单位秒。

        - `parameters.resolution` (string, 可选): 输出分辨率。Wan 三个模型分别固定
        `720P`、`480P`、`1080P`；HappyHorse 常见值为 `720P`、`1080P`。

        - `parameters.ratio` (string, 可选): 输出宽高比，文生视频和参考生视频常用。

        - `parameters.watermark` (boolean, 可选): 是否添加水印。

        - `parameters.seed` (integer, 可选): 随机种子。


        常见模型/模式差异：

        - `HappyHorse 聚合模型`: 支持模型 happyhorse-1.0；聚合模型通过 mode 区分最终模型。

        - `HappyHorse 文生视频`: 支持模型 happyhorse-1.0-t2v；官方格式文生视频。

        - `HappyHorse 首帧图生视频`: 支持模型 happyhorse-1.0-i2v；官方格式首帧图生视频。

        - `HappyHorse 参考生视频`: 支持模型 happyhorse-1.0-r2v；官方格式多参考图生视频。

        - `HappyHorse 视频编辑`: 支持模型 happyhorse-1.0-video-edit；官方格式视频编辑。

        - `Wan 3.0 720P`: 支持模型 wan-3.0；Wan 3.0 官方格式多模态参考视频生成。

        - `Wan 3.0 480P`: 支持模型 wan-3.0-480p；固定 480P 的 Wan 3.0 官方格式调用。

        - `Wan 3.0 1080P`: 支持模型 wan-3.0-1080p；固定 1080P 的 Wan 3.0 官方格式调用。
      operationId: create__happyhorse_wan_task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - happyhorse-1.0
                    - happyhorse-1.0-t2v
                    - happyhorse-1.0-i2v
                    - happyhorse-1.0-r2v
                    - happyhorse-1.0-video-edit
                    - wan-3.0
                    - wan-3.0-480p
                    - wan-3.0-1080p
                  example: happyhorse-1.0-t2v
                  description: >-
                    HappyHorse 或 Wan 对外模型名。Wan 支持
                    `wan-3.0`、`wan-3.0-480p`、`wan-3.0-1080p`；HappyHorse 聚合模型
                    `happyhorse-1.0` 需配合 `mode` 使用。
                mode:
                  type: string
                  enum:
                    - t2v
                    - i2v
                    - r2v
                    - video_edit
                  description: 聚合模型模式，常见值为 `t2v`、`i2v`、`r2v`、`video_edit`。固定子模型可不传。
                input:
                  type: object
                  required:
                    - prompt
                  properties:
                    prompt:
                      type: string
                      example: >-
                        A white horse running through a neon city street,
                        cinematic
                      description: 视频生成或编辑提示词。
                    media:
                      type: array
                      items:
                        type: object
                        required:
                          - type
                          - url
                        properties:
                          type:
                            type: string
                            enum:
                              - first_frame
                              - last_frame
                              - reference_image
                              - reference_video
                              - reference_audio
                              - video
                              - audio
                          url:
                            type: string
                            format: uri
                      description: >-
                        多媒体输入。支持
                        `first_frame`、`last_frame`、`reference_image`、`reference_video`、`reference_audio`；Wan
                        最多支持 10 图、5 视频、5 音频。
                parameters:
                  type: object
                  properties:
                    resolution:
                      type: string
                      enum:
                        - 480P
                        - 720P
                        - 1080P
                      example: 720P
                      description: >-
                        输出分辨率。Wan 三个模型分别固定 `720P`、`480P`、`1080P`；HappyHorse 常见值为
                        `720P`、`1080P`。
                    ratio:
                      type: string
                      example: '16:9'
                      description: 输出宽高比，文生视频和参考生视频常用。
                    duration:
                      type: integer
                      example: 5
                      description: 生成时长，单位秒。
                    watermark:
                      type: boolean
                      description: 是否添加水印。
                    seed:
                      type: integer
                      description: 随机种子。
            examples:
              happyhorse_native_aggregate_t2v:
                summary: HappyHorse 聚合模型
                value:
                  model: happyhorse-1.0
                  mode: t2v
                  input:
                    prompt: >-
                      A white horse running through a neon city street,
                      cinematic
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 5
              happyhorse_native_t2v:
                summary: HappyHorse 文生视频
                value:
                  model: happyhorse-1.0-t2v
                  input:
                    prompt: >-
                      A white horse running through a neon city street,
                      cinematic
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 5
              happyhorse_native_i2v:
                summary: HappyHorse 首帧图生视频
                value:
                  model: happyhorse-1.0-i2v
                  input:
                    prompt: The subject walks forward naturally
                    media:
                      - type: first_frame
                        url: https://example.com/first-frame.jpg
                  parameters:
                    resolution: 720P
                    duration: 5
              happyhorse_native_r2v:
                summary: HappyHorse 参考生视频
                value:
                  model: happyhorse-1.0-r2v
                  input:
                    prompt: >-
                      Keep the character and product consistent in a cinematic
                      shot
                    media:
                      - type: reference_image
                        url: https://example.com/ref-1.jpg
                      - type: reference_image
                        url: https://example.com/ref-2.jpg
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 5
              happyhorse_native_video_edit:
                summary: HappyHorse 视频编辑
                value:
                  model: happyhorse-1.0-video-edit
                  input:
                    prompt: Change the jacket to a striped sweater
                    media:
                      - type: video
                        url: https://example.com/input.mp4
                      - type: reference_image
                        url: https://example.com/reference.jpg
                  parameters:
                    resolution: 720P
              wan_3_0_native:
                summary: Wan 3.0 720P
                value:
                  model: wan-3.0
                  input:
                    prompt: Keep the character consistent across all references
                    media:
                      - type: reference_image
                        url: https://example.com/reference.jpg
                      - type: reference_audio
                        url: https://example.com/reference.mp3
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 10
              wan_3_0_480p_native:
                summary: Wan 3.0 480P
                value:
                  model: wan-3.0-480p
                  input:
                    prompt: Create a smooth transition
                    media:
                      - type: first_frame
                        url: https://example.com/first.jpg
                      - type: last_frame
                        url: https://example.com/last.jpg
                  parameters:
                    resolution: 480P
                    ratio: '16:9'
                    duration: 10
              wan_3_0_1080p_native:
                summary: Wan 3.0 1080P
                value:
                  model: wan-3.0-1080p
                  input:
                    prompt: Generate a cinematic reference video
                    media:
                      - type: reference_video
                        url: https://example.com/reference.mp4
                  parameters:
                    resolution: 1080P
                    ratio: '16:9'
                    duration: 10
      responses:
        '200':
          description: 任务创建成功
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                properties:
                  id:
                    type: string
                    example: task_xxx
                  output:
                    type: object
                    properties:
                      task_id:
                        type: string
                        description: 创建任务返回的任务 ID，用于查询任务。
                      task_status:
                        type: string
                        description: 任务状态，常见值 `PENDING`、`RUNNING`、`SUCCEEDED`、`FAILED`。
                      video_url:
                        type: string
                        description: 任务成功后的生成视频 URL。
                  usage:
                    type: object
                    properties:
                      duration:
                        type: string
                        description: 生成时长，单位秒。
                      SR:
                        type: string
                        description: 输出分辨率档位。
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````