> ## 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 Reference to Video

> Submit an asynchronous Aliyun HappyHorse `happyhorse-1.1-r2v` reference-to-video task.

After submitting a task, query its status via `GET /ali/api/v1/tasks/{task_id}`.



## OpenAPI

````yaml api-reference/en/zmodelVideo/ali/happyhorse-1.1-r2v.json POST /ali/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.0.1
info:
  title: HappyHorse 1.1 Reference to Video
  version: 1.0.0
  description: >-
    Aliyun HappyHorse `happyhorse-1.1-r2v` reference-to-video capability
    documentation. The unified API endpoint is
    `/ali/api/v1/services/aigc/video-generation/video-synthesis`, used to create
    asynchronous video generation tasks. Supports multiple reference images and
    uses a text prompt to describe the scene, fusing subject characters from the
    images into a smoothly flowing video.
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API server endpoint
security: []
tags:
  - name: HappyHorse Video
    description: Aliyun HappyHorse video generation capability
paths:
  /ali/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      tags:
        - HappyHorse Video
      summary: Create happyhorse-1.1-r2v reference-to-video task
      description: >-
        Submit an asynchronous Aliyun HappyHorse `happyhorse-1.1-r2v`
        reference-to-video task.


        After submitting a task, query its status via `GET
        /ali/api/v1/tasks/{task_id}`.
      operationId: aliHappyHorse11R2VCreate
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: >-
            Request content type. This parameter must be set to
            application/json.
        - name: X-DashScope-Async
          in: header
          required: true
          schema:
            type: string
          description: >-
            Asynchronous processing configuration parameter. HTTP requests only
            support async mode and must be set to enable. Missing this header
            will raise the error: "current user api does not support synchronous
            calls".
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HappyHorse11R2VRequest'
            examples:
              reference_to_video_multi_image:
                summary: Reference to video (multi-image)
                value:
                  model: happyhorse-1.1-r2v
                  input:
                    prompt: >-
                      [Image
                      1]中身着红色旗袍的女性，镜头先以侧面中景勾勒旗袍修身剪裁与S型曲线，随即切换至低角度仰拍，捕捉她轻抬玉手展开[Image
                      2]中的折扇的同时，[Image
                      3]中的流苏耳坠随头部转动轻盈摆动的细节，最后推近至面部特写，定格在她指尖轻点扇骨、眼波流转间的含蓄风情，多视角全方位展现东方韵味。
                    media:
                      - type: reference_image
                        url: >-
                          https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg
                      - type: reference_image
                        url: >-
                          https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/fvuihk/hh-v2v2-folding-fan.jpg
                      - type: reference_image
                        url: >-
                          https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/imerii/hh-v2v-earrings.jpg
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 5
      responses:
        '200':
          description: Submitted successfully. Returns a video task object.
          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: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication failed, e.g. missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit triggered or insufficient account quota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An internal error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    HappyHorse11R2VRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - happyhorse-1.1-r2v
          description: 'Model name. Available value: `happyhorse-1.1-r2v`.'
        input:
          $ref: '#/components/schemas/HappyHorse11R2VInput'
        parameters:
          $ref: '#/components/schemas/HappyHorse11R2VParameters'
    VideoTaskResponse:
      type: object
      properties:
        output:
          type: object
          properties:
            task_id:
              type: string
              description: Task ID. Valid for 24 hours for querying.
            task_status:
              type: string
              description: |-
                Task status.

                Enum values:
                - PENDING: Task queued
                - RUNNING: Task processing
                - SUCCEEDED: Task completed successfully
                - FAILED: Task failed
                - CANCELED: Task canceled
                - UNKNOWN: Task does not exist or status unknown
        request_id:
          type: string
          description: >-
            Unique request ID. Can be used for request tracing and issue
            diagnosis.
        code:
          type: string
          description: Error code. Only returned when the request fails.
        message:
          type: string
          description: Error message. Only returned when the request fails.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message.
        request_id:
          type: string
          description: Request ID.
    HappyHorse11R2VInput:
      type: object
      required:
        - prompt
        - media
      properties:
        prompt:
          type: string
          description: >-
            Text prompt. Used to describe the elements and visual
            characteristics expected in the generated video. Supports input in
            any language, up to 5000 non-Chinese characters or 2500 Chinese
            characters. Excess content will be automatically truncated.


            Reference notation: Use "[Image 1], [Image 2]" in the prompt to
            refer to the reference images at corresponding positions in the
            `media` array, in the same order as the `media` array. When using,
            specify the concrete object in the reference image, e.g. "[Image 1]
            the woman in the red qipao".
          maxLength: 5000
        media:
          type: array
          description: >-
            Media asset list, used to specify reference images. Each element of
            the array is a media object containing type and url fields. Defines
            the order in which characters are referenced in the prompt,
            following the array order. The first `reference_image` in the array
            corresponds to [Image 1], the second to [Image 2], and so on. Number
            of reference images: 1~9.
          minItems: 1
          maxItems: 9
          items:
            $ref: '#/components/schemas/ReferenceImageItem'
    HappyHorse11R2VParameters:
      type: object
      properties:
        resolution:
          type: string
          enum:
            - 1080P
            - 720P
          description: |-
            Resolution tier of the generated video.
            - `1080P`: default value.
            - `720P`
          default: 1080P
        ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '3:4'
            - '4:3'
            - '4:5'
            - '5:4'
            - '1:1'
            - '9:21'
            - '21:9'
          description: |-
            Aspect ratio of the generated video.
            - `16:9`: default value.
            - `9:16`
            - `3:4`
            - `4:3`
            - `4:5`
            - `5:4`
            - `1:1`
            - `9:21`
            - `21:9`
          default: '16:9'
        duration:
          type: integer
          description: >-
            Duration of the generated video in seconds. An integer in the range
            3~15. Default: 5.
          minimum: 3
          maximum: 15
          default: 5
        watermark:
          type: boolean
          description: >-
            Whether to add a watermark on the generated video. The watermark is
            positioned at the bottom-right corner with the fixed text "Happy
            Horse".

            - `true`: default value, add watermark.

            - `false`: no watermark.
          default: true
        seed:
          type: integer
          description: >-
            Random seed, range [0, 2147483647]. When unspecified, the system
            auto-generates a random seed. For better reproducibility, set a
            fixed seed. Note: due to the probabilistic nature of model
            generation, the same seed does not guarantee identical results every
            time.
          minimum: 0
          maximum: 2147483647
    ReferenceImageItem:
      type: object
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - reference_image
          description: |-
            Media asset type. Fixed value:
            - `reference_image`: reference image.
        url:
          type: string
          description: >-
            Reference image URL or Base64-encoded data.


            Image constraints:

            - Formats: JPEG, JPG, PNG, WEBP.

            - Resolution: short side no less than 400 pixels, 720P or higher is
            recommended. Avoid passing images that are too small, blurry, or
            over-compressed, which may affect the result.

            - File size: up to 20MB.


            Supported input formats:

            1. Public URL: HTTP or HTTPS protocol. Example: https://xxx/xxx.jpg.

            2. Base64-encoded image string: format
            `data:{MIME_type};base64,{base64_data}`. Example:
            data:image/png;base64,GDU7MtCZzEbTbmRZ......


            **Base64 Encoding Data Format**


            Format: `data:{MIME_type};base64,{base64_data}`.


            - `{base64_data}`: The string obtained after Base64 encoding the
            image file.

            - `{MIME_type}`: The media type of the image, which must correspond
            to the file format.


            **Image Format and MIME Type Mapping**


            | Image Format | MIME Type |

            | --- | --- |

            | JPEG | image/jpeg |

            | JPG | image/jpeg |

            | PNG | image/png |

            | WEBP | image/webp |
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````