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

# HappyHorse-1.1-文生视频

> 提交一个异步的阿里云 HappyHorse `happyhorse-1.1-t2v` 文生视频任务。

提交任务后，请通过 `GET /ali/api/v1/tasks/{task_id}` 查询任务状态。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/ali/happyhorse-1.1-t2v.json POST /ali/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.0.1
info:
  title: HappyHorse-1.1-文生视频
  version: 1.0.0
  description: >-
    阿里云 HappyHorse `happyhorse-1.1-t2v` 文生视频能力文档。平台统一接口端点为
    `/ali/api/v1/services/aigc/video-generation/video-synthesis`，用于创建异步视频生成任务。输入文本提示词生成物理真实、运动流畅的视频内容。
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: baze平台 API 服务端点
security: []
tags:
  - name: HappyHorse Video
    description: 阿里云 HappyHorse happyhorse-1.1-t2v 文生视频能力
paths:
  /ali/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      tags:
        - HappyHorse Video
      summary: 创建 happyhorse-1.1-t2v 文生视频任务
      description: |-
        提交一个异步的阿里云 HappyHorse `happyhorse-1.1-t2v` 文生视频任务。

        提交任务后，请通过 `GET /ali/api/v1/tasks/{task_id}` 查询任务状态。
      operationId: aliHappyHorse11T2VCreate
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: 请求内容类型。此参数必须设置为 application/json。
        - name: X-DashScope-Async
          in: header
          required: true
          schema:
            type: string
          description: >-
            异步处理配置参数。HTTP 请求只支持异步，必须设置为 enable。缺少此请求头将报错："current user api does
            not support synchronous calls"。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HappyHorse11T2VRequest'
            examples:
              文生视频:
                summary: 文生视频
                value:
                  model: happyhorse-1.1-t2v
                  input:
                    prompt: 一座由硬纸板和瓶盖搭建的微型城市，在夜晚焕发出生机。一列硬纸板火车缓缓驶过，小灯点缀其间，照亮前路。
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 5
      responses:
        '200':
          description: 提交成功，返回视频任务对象。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
              example:
                output:
                  task_status: PENDING
                  task_id: 0385dc79-5ff8-4d82-bcb6-xxxxxx
                request_id: 4909100c-7b5a-9f92-bfe5-xxxxxx
        '400':
          description: 请求参数不合法。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 鉴权失败，例如未提供令牌或令牌无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 触发速率限制或账户额度不足。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 服务端处理请求时发生内部错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    HappyHorse11T2VRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - happyhorse-1.1-t2v
          description: 模型名称。可选值：`happyhorse-1.1-t2v`。
        input:
          $ref: '#/components/schemas/HappyHorse11T2VInput'
        parameters:
          $ref: '#/components/schemas/HappyHorse11T2VParameters'
    VideoTaskResponse:
      type: object
      properties:
        output:
          type: object
          properties:
            task_id:
              type: string
              description: 任务ID。查询有效期24小时。
            task_status:
              type: string
              description: |-
                任务状态。

                枚举值：
                - PENDING：任务排队中
                - RUNNING：任务处理中
                - SUCCEEDED：任务执行成功
                - FAILED：任务执行失败
                - CANCELED：任务已取消
                - UNKNOWN：任务不存在或状态未知
        request_id:
          type: string
          description: 请求唯一标识。可用于请求明细溯源和问题排查。
        code:
          type: string
          description: 请求失败的错误码。请求成功时不会返回此参数。
        message:
          type: string
          description: 请求失败的详细信息。请求成功时不会返回此参数。
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: 错误码。
        message:
          type: string
          description: 错误信息。
        request_id:
          type: string
          description: 请求 ID。
    HappyHorse11T2VInput:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          description: >-
            文本提示词，用于描述期望生成的视频内容。支持任何语言输入，长度不超过 5000 个非中文字符或 2500
            个中文字符，超过部分将自动截断。
          maxLength: 5000
    HappyHorse11T2VParameters:
      type: object
      properties:
        resolution:
          type: string
          enum:
            - 720P
            - 1080P
          description: |-
            指定生成视频的分辨率档位。
            - `720P`
            - `1080P`：默认值。
          default: 1080P
        ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
            - '4:5'
            - '5:4'
            - '9:21'
            - '21:9'
          description: |-
            指定生成视频的宽高比。
            - `16:9`：默认值。
            - `9:16`
            - `1:1`
            - `4:3`
            - `3:4`
            - `4:5`
            - `5:4`
            - `9:21`
            - `21:9`
          default: '16:9'
        duration:
          type: integer
          description: 指定生成视频的时长，单位为秒。取值为 [3, 15] 之间的整数。默认值为 5。
          minimum: 3
          maximum: 15
          default: 5
        watermark:
          type: boolean
          description: |-
            是否在生成的视频上添加水印标识。水印位于视频右下角，文案固定为 "Happy Horse"。
            - `true`：默认值，添加水印。
            - `false`：不添加水印。
          default: true
        seed:
          type: integer
          description: >-
            随机数种子，取值范围为 [0, 2147483647]。未指定时，系统自动生成随机种子。若需提升生成结果的可复现性，建议固定 seed
            值。请注意，由于模型生成具有概率性，即使使用相同 seed，也不能保证每次生成结果完全一致。
          minimum: 0
          maximum: 2147483647
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````