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

# Happy Horse 1.1

> Happy Horse 1.1 API 可根据文本、一张首帧图片或一到九张参考图片生成 3–15 秒的 720p 或 1080p 视频。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

`happy-horse-1.1` 通过一个公开 model ID 支持文生视频、图生视频和参考生视频。

## 模型

* **happy-horse-1.1** - Alibaba Happy Horse 1.1 视频生成

## 输入模式

### 文生视频

发送 `prompt`，不带 `image_urls` 或 `reference_image_urls`。使用 `aspect_ratio`、`resolution` 和 `duration` 控制输出。

### 图生视频

发送只含一项的 `image_urls` 数组。该图片用作首帧。此模式下 `prompt` 为可选。

### 参考生视频

发送包含 1-9 张图片的 `reference_image_urls`，并且必须提供 `prompt`。

不要将 `reference_image_urls` 与 `image_urls` 同时使用。

## 必填参数

* **model**：`happy-horse-1.1`
* **input.prompt**：文生视频和参考生视频必填。图生视频可选。最大长度为 2,500 个字符。
* **input.image\_urls**：图生视频必填。
* **input.reference\_image\_urls**：参考生视频必填。

## 可选参数

* **image\_urls**：图生视频所用的首帧图片 URL 数组，只含一项
* **reference\_image\_urls**：参考生视频使用的 1-9 张图片
* **aspect\_ratio**：仅限文生视频和参考生视频。`21:9`、`16:9`、`4:3`、`1:1`、`3:4`、`4:5`、`5:4`、`9:16` 或 `9:21`。默认为 `16:9`
* **resolution**：`720p` 或 `1080p`。默认为 `1080p`
* **duration**：`3` 到 `15` 的整数秒。默认为 `5`
* **seed**：可选，`0` 到 `2147483647` 的整数
* **enable\_safety\_checker**：可选布尔值

## 注意事项

* `image_urls` 必须恰好解析为一张图片，且仅用于图生视频。
* `reference_image_urls` 会选择参考生视频，不能与 `image_urls` 同时使用。
* 文生视频和参考生视频请不要传 `image_urls`，并使用 `aspect_ratio`。


## OpenAPI

````yaml zh/api-manual/video-series/happy-horse-1-1.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Happy Horse 1.1 API
  description: Happy Horse 1.1 API 根据文本、一张首帧图片或一到九张参考图片生成 3–15 秒的 720p 或 1080p 视频。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Happy Horse 1.1
      summary: 提交 Happy Horse 1.1 任务
      description: 使用阿里巴巴 Happy Horse 1.1 生成视频
      operationId: submitHappyHorse11Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: 文生视频
                value:
                  model: happy-horse-1.1
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Medium shot of a professional news anchor at a sleek desk
                      in a modern broadcast studio, cool blue lighting, softly
                      glowing screens behind. 0-5s: He looks into the camera and
                      says in a clear measured voice, "Good evening. Tonight, a
                      breakthrough that could change how millions of us work."
                      5-10s: He turns slightly toward a second camera, "We'll
                      have the full story, and what it means for you, right
                      after this." Precise lip-sync, subtle studio room tone,
                      crisp broadcast quality, shallow depth of field.
                    aspect_ratio: '16:9'
                    resolution: 1080p
                    duration: 10
              image-to-video:
                summary: 图生视频
                value:
                  model: happy-horse-1.1
                  input:
                    image_urls:
                      - >-
                        https://storage.poyo.ai/happy-horse-1-1/image-to-video-input.png
                    prompt: >-
                      A bearded man sits in a warm rustic study with brick and
                      wood walls, bookshelves, a glowing table lamp, and a
                      leather chair. He gently strums an acoustic guitar, then
                      looks up toward the camera and starts singing with natural
                      lip-sync. The camera slowly pushes in, keeping the cozy
                      room light and shallow depth of field. Audio: soft
                      acoustic guitar, intimate male vocal, quiet room tone.
                    resolution: 1080p
                    duration: 10
              reference-to-video:
                summary: 参考生视频
                value:
                  model: happy-horse-1.1
                  input:
                    prompt: >-
                      Ultra-realistic skincare commercial using the four
                      reference images as the exact product identity. Show a
                      frosted glass serum bottle on a clean marble countertop
                      with soft morning light and water droplets. Slow macro
                      push-in, gentle rotation of the bottle, dewy highlights on
                      the label, premium spa atmosphere. Audio: soft water
                      ripple, subtle glass tap, calm luxury ambient music. No
                      people.
                    reference_image_urls:
                      - >-
                        https://storage.poyo.ai/happy-horse-1-1/reference-input-1.png
                      - >-
                        https://storage.poyo.ai/happy-horse-1-1/reference-input-2.png
                      - >-
                        https://storage.poyo.ai/happy-horse-1-1/reference-input-3.png
                      - >-
                        https://storage.poyo.ai/happy-horse-1-1/reference-input-4.png
                    aspect_ratio: '16:9'
                    resolution: 1080p
                    duration: 10
                    seed: 42
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Happy Horse 1.1 模型标识
          enum:
            - happy-horse-1.1
        callback_url:
          type: string
          format: uri
          description: 接收结果通知的 Webhook 回调 URL
          example: https://your-domain.com/callback
        input:
          type: object
          properties:
            prompt:
              type: string
              maxLength: 2500
              description: 文本提示词。文生视频和参考生视频时必填，图生视频时可选。最大长度为 2,500 个字符。
              example: >-
                Medium shot of a professional news anchor at a sleek desk in a
                modern broadcast studio, cool blue lighting, softly glowing
                screens behind. Precise lip-sync, subtle studio room tone, crisp
                broadcast quality, shallow depth of field.
            image_urls:
              type: array
              maxItems: 1
              items:
                type: string
                format: uri
              description: 图生视频使用的首帧图片 URL 数组，仅含一项。不要与 reference_image_urls 同时使用。
              example:
                - https://example.com/first-frame.png
            reference_image_urls:
              type: array
              maxItems: 9
              items:
                type: string
                format: uri
              description: 参考生视频使用的参考图片。不要与 image_urls 同时使用。
              example:
                - https://example.com/reference.png
            aspect_ratio:
              type: string
              description: 文生视频和参考生视频的输出宽高比
              enum:
                - '21:9'
                - '16:9'
                - '4:3'
                - '1:1'
                - '3:4'
                - '4:5'
                - '5:4'
                - '9:16'
                - '9:21'
              default: '16:9'
              example: '16:9'
            resolution:
              type: string
              description: 输出分辨率
              enum:
                - 720p
                - 1080p
              default: 1080p
              example: 1080p
            duration:
              type: integer
              description: 输出时长（秒）。积分按时长和所选分辨率计算。
              minimum: 3
              maximum: 15
              default: 5
              example: 5
            seed:
              type: integer
              description: 可选的随机种子，用于复现生成结果
              minimum: 0
              maximum: 2147483647
              example: 42
            enable_safety_checker:
              type: boolean
              description: 对输入和输出启用内容审核
              example: true
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
              example: '2026-06-23T10:30:00'
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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