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

# HappyHorse 1.0

> HappyHorse 1.0 视频生成模型，支持文生视频、图生视频（首帧）、参考生视频（多参考图）、视频编辑（视频 + 参考图）



## OpenAPI

````yaml /zh/openapi/videos/happyhorse-1-0.yaml POST /v1/videos/generate
openapi: 3.1.0
info:
  title: HappyHorse 1.0
  version: '1.0'
  description: HappyHorse 1.0 视频生成模型，支持文生视频、图生视频（首帧）、参考生视频（多参考图）、视频编辑（视频 + 参考图）。
servers:
  - url: https://openapi.imini.ai/imini/router
security:
  - ApiKeyAuth: []
paths:
  /v1/videos/generate:
    post:
      summary: HappyHorse 1.0
      description: >
        提交异步的视频生成任务，后续需通过查询接口轮询结果。


        > 模型 ID：`dashscope/happyhorse-1.0` · 底层：HappyHorse 1.0


        **支持的输入模式**（按入参形态自动派发，无需显式指定）：

        - **文生视频**：仅传 `prompt`

        - **图生视频-首帧**：1 张 `first_frame`（不接受 `aspect_ratio`，输出宽高比跟随首帧）

        - **参考生视频**：1~9 张 `asset` 参考图。`prompt` 中可用 `character1`、`character2` 指代第
        N 张参考图（顺序与数组一致）

        - **视频编辑**：1 段 `reference_video` + 0~5 张 `asset` 参考图，按 `prompt`
        指令对源视频做风格转换、局部替换等编辑（不接受 `aspect_ratio` / `duration`，输出时长跟随源视频，最长 15 秒）


        > 上述场景**互斥**，不可混用。**不支持**首尾帧、特征参考视频、参考音频，也不支持 `generate_audio`
        开关；视频编辑场景下的音频控制走 `extra_params.audio_setting`。
      operationId: generateHappyHorse10
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
              properties:
                model:
                  type: string
                  description: 固定值 `dashscope/happyhorse-1.0`
                prompt:
                  type: string
                  description: >
                    提示词，长度不超过 **5000** 字符。支持中、英、日、韩等多语言。


                    > 参考生视频场景下，`prompt` 中可用 `character1`、`character2` … 指代
                    `reference_images` 中第 N 张参考图（顺序与数组一致）。
                  example: 一座由硬纸板和瓶盖搭建的微型城市，在夜晚焕发出生机。一列硬纸板火车缓缓驶过，小灯点缀其间，照亮前路。
                resolution:
                  type: string
                  description: 输出分辨率，默认 `1080P`。
                  default: 1080P
                  enum:
                    - 720P
                    - 1080P
                aspect_ratio:
                  type: string
                  description: >
                    输出宽高比，默认
                    `16:9`。**仅文生视频与参考生视频接受**；图生视频-首帧（输出跟随首帧）、视频编辑（输出跟随源视频）不接受此参数。
                  default: '16:9'
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                duration:
                  type: integer
                  description: >
                    视频时长（秒），默认 `5`，取值范围 `3 ~ 15`
                    的整数。**视频编辑场景不接受此参数**（输出时长跟随源视频，最长 15 秒）。
                  default: 5
                  minimum: 3
                  maximum: 15
                reference_images:
                  type: array
                  description: >
                    参考图列表。按 `reference_type` 与 `reference_videos` 的组合决定输入模式：

                    - **图生视频-首帧**：1 张 `first_frame`

                    - **参考生视频**：1~9 张 `asset`，无 `reference_videos`

                    - **视频编辑**：0~5 张 `asset`，配合 1 段 `reference_videos`


                    > 图片要求：格式 `jpg` / `jpeg` / `png` / `webp`；公网可访问 URL 或
                    `data:image/` base64；首帧场景宽高 ≥ 300 px、宽高比 1:2.5 ~ 2.5:1、单张 ≤
                    10 MB；参考生视频场景短边 ≥ 400 px，推荐 720P 以上。
                  maxItems: 9
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                        description: |
                          图片地址，支持两种形式：
                          **1)** 公网可访问 URL（`http://` 或 `https://`）；
                          **2)** Data URI base64（`data:image/` 开头）。
                      reference_type:
                        type: string
                        description: |
                          参考类型：
                          - `asset` — 通用素材参考（默认）
                          - `first_frame` — 首帧
                        default: asset
                        enum:
                          - asset
                          - first_frame
                reference_videos:
                  type: array
                  description: >
                    参考视频列表，**视频编辑场景必填且仅 1 段**。仅支持公网可访问 URL，不支持 base64。


                    > 视频要求：格式 `mp4` / `mov`（建议 H.264 编码）；时长 3 ~ 60 秒（超过 15
                    秒会从头自动截取前 15 秒）；分辨率长边 ≤ 2160 px、短边 ≥ 320 px；宽高比 1:2.5 ~
                    2.5:1；单段 ≤ 100 MB；FPS > 8。
                  maxItems: 1
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                        description: 公网可访问的视频 URL，不支持 base64。
                      refer_type:
                        type: string
                        description: |
                          参考类型，当前仅支持 `base`（待编辑视频）。
                        default: base
                        enum:
                          - base
                extra_params:
                  type: object
                  description: |
                    模型扩展参数，全部选填：
                    - `audio_setting` — 字符串，**仅视频编辑场景生效**。声音控制策略：
                      - `auto`（默认）：由模型自动决定
                      - `origin`：保留源视频的原始声音
                  additionalProperties: true
                  properties:
                    audio_setting:
                      type: string
                      enum:
                        - auto
                        - origin
                      default: auto
            examples:
              Text to Video:
                summary: Text to Video
                value:
                  model: dashscope/happyhorse-1.0
                  prompt: 一座由硬纸板和瓶盖搭建的微型城市，在夜晚焕发出生机。一列硬纸板火车缓缓驶过，小灯点缀其间，照亮前路。
                  resolution: 720P
                  aspect_ratio: '16:9'
                  duration: 5
              Image to Video (first frame):
                summary: Image to Video - First Frame
                value:
                  model: dashscope/happyhorse-1.0
                  prompt: 一只猫在草地上奔跑
                  reference_images:
                    - url: https://cdn.translate.alibaba.com/r/wanx-demo-1.png
                      reference_type: first_frame
                  resolution: 720P
                  duration: 5
              Reference Images to Video:
                summary: Reference Images (character1 / character2)
                value:
                  model: dashscope/happyhorse-1.0
                  prompt: >-
                    身着红色旗袍的女性 character1，轻抬玉手展开折扇 character2 时流苏耳坠 character3
                    随头部转动轻盈摆动，多视角全方位展现东方韵味。
                  reference_images:
                    - url: >-
                        https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg
                      reference_type: asset
                    - url: >-
                        https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/fvuihk/hh-v2v2-folding-fan.jpg
                      reference_type: asset
                    - url: >-
                        https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/imerii/hh-v2v-earrings.jpg
                      reference_type: asset
                  resolution: 720P
                  aspect_ratio: '16:9'
                  duration: 5
              Video Edit:
                summary: Video Edit (instruction + reference image)
                value:
                  model: dashscope/happyhorse-1.0
                  prompt: 让视频中的马头人身角色穿上图片中的条纹毛衣
                  reference_videos:
                    - url: >-
                        https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4
                      refer_type: base
                  reference_images:
                    - url: >-
                        https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260415/hynnff/wan-video-edit-clothes.webp
                      reference_type: asset
                  resolution: 720P
                  extra_params:
                    audio_setting: origin
      responses:
        '200':
          description: 提交成功（异步模式）
          content:
            application/json:
              schema:
                type: object
                properties:
                  task_id:
                    type: string
                    description: 任务唯一 ID，用于后续轮询查询
                    example: task_2044275355061448704
                  model:
                    type: string
                    description: 本次任务使用的模型 ID
                    example: dashscope/happyhorse-1.0
                  created_at:
                    type: string
                    description: 任务创建时间（ISO 8601）
                    example: '2026-04-27T10:43:20.233Z'
                  request_id:
                    type: string
                    description: 请求唯一 ID
                    example: 67e2e394-cf6f-4998-b293-ebf20d14dc26
        '400':
          description: Validation Error (e.g. invalid parameter, invalid prompt)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Error code
                        example: INVALID_PARAMETER
                      message:
                        type: string
                        description: Error message details
                        example: >-
                          aspect_ratio is not accepted in I2V mode (output
                          follows first_frame)
                      status:
                        type: integer
                        description: HTTP status code
                        example: 400
                      request_id:
                        type: string
                        description: Unique request identifier
                        example: req_abc123
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        在请求 Header 中传入 `Authorization: Bearer <YOUR_API_KEY>`。前往 [API Keys
        管理页](https://imini.ai/zh/api-keys) 创建和管理 API Key。

````