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

> Submit an asynchronous Aliyun HappyHorse `happyhorse-1.1-i2v` image-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-i2v.json POST /ali/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.0.1
info:
  title: HappyHorse 1.1 Image to Video
  version: 1.0.0
  description: >-
    Aliyun HappyHorse `happyhorse-1.1-i2v` image-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. Uses a first-frame image as the base
    and supports guidance via text description to generate physically realistic
    and smoothly moving 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-i2v image-to-video task
      description: >-
        Submit an asynchronous Aliyun HappyHorse `happyhorse-1.1-i2v`
        image-to-video task.


        After submitting a task, query its status via `GET
        /ali/api/v1/tasks/{task_id}`.
      operationId: aliHappyHorse11I2VCreate
      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/HappyHorse11I2VRequest'
            examples:
              image_to_video_first_frame:
                summary: Image to video - first frame
                value:
                  model: happyhorse-1.1-i2v
                  input:
                    prompt: 一只猫在草地上奔跑
                    media:
                      - type: first_frame
                        url: https://cdn.translate.alibaba.com/r/wanx-demo-1.png
                  parameters:
                    resolution: 720P
                    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:
    HappyHorse11I2VRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - happyhorse-1.1-i2v
          description: 'Model name. Available value: `happyhorse-1.1-i2v`.'
        input:
          $ref: '#/components/schemas/HappyHorse11I2VInput'
        parameters:
          $ref: '#/components/schemas/HappyHorse11I2VParameters'
    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.
    HappyHorse11I2VInput:
      type: object
      required:
        - media
      properties:
        prompt:
          type: string
          description: >-
            Text prompt describing the desired video content. Supports input in
            any language, up to 5000 non-Chinese characters or 2500 Chinese
            characters. Excess content will be automatically truncated.
          maxLength: 5000
        media:
          type: array
          description: >-
            Input media list. Used to specify the image required for video
            generation. Must contain exactly one first-frame image.
          minItems: 1
          maxItems: 1
          items:
            $ref: '#/components/schemas/MediaItem'
    HappyHorse11I2VParameters:
      type: object
      properties:
        resolution:
          type: string
          enum:
            - 720P
            - 1080P
          description: >-
            Specifies the output video resolution tier, controlling video
            clarity (total pixels). The model automatically scales to a nearby
            total pixel count based on the selected resolution tier. The output
            video aspect ratio is approximately consistent with the input first
            frame.

            - `720P`

            - `1080P`: default value.
          default: 1080P
        duration:
          type: integer
          description: >-
            Specifies the 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
    MediaItem:
      type: object
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - first_frame
          description: |-
            Media asset type. Available value:
            - `first_frame`: first frame.
        url:
          type: string
          description: >-
            Media material URL. Pass in the first frame URL of the image
            (type=first_frame), or Base64 encoded data.


            Image restrictions:

            - Format: JPEG, JPG, PNG, WEBP.

            - Resolution: Width and height are not less than 300 pixels.

            - Aspect ratio: 1:2.5 to 2.5:1.

            - File size: No more than 20MB.


            Supported input formats:

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

            2. Base64 encoded image string: Data 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.'

````