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

# Happy Horse Video Edit

> Transform existing footage with Happy Horse using text instructions and reference images to guide a new visual direction.

<Tip>
  1. Submit the request with `VIDGO_API_KEY`. A `task_id` is returned immediately. Keep it until the task reaches `finished` or `failed`.
  2. Use [Query Task Status](/api-manual/task-management/status) to retrieve the result. If you provide a `callback_url`, Vidgo sends the result to your [webhook](/api-manual/task-management/webhooks) when the task finishes or fails.
</Tip>

# Happy Horse Video Edit

Transform existing footage with Happy Horse using text instructions and reference images to guide a new visual direction.

## Available Models

* **alibaba/happyhorse-1.0/video-edit** - Edit an existing video using written instructions.

## Duration Options

* **Source video: 3-60 seconds** - Duration is read from `video_url`.
* Do not send `duration` for video editing.

## Key Features

* Edit an existing video using written instructions.
* Optionally add up to five reference images to guide the edit.
* Choose from `720p`, `1080p` output resolutions.
* Choose automatic audio handling or preserve the source audio.

## Advanced Parameters

Set `model` and optional `callback_url` at the request root. Place the parameters below inside `input`.

Send only the input fields supported by this workflow. Unsupported `input` fields are rejected before credits are deducted. Input URLs must use HTTP(S), include a hostname, and contain no embedded credentials.

### Prompt

* `prompt`: Required. Describe the requested changes to the video.
* The prompt must not be blank when supplied. Maximum length: **2,500 characters**.

### Reference Inputs

* `reference_image_urls`: Optional; provide up to 5 images.
* Describe referenced subjects in the prompt; `character1` and `character2` markers are not required.

### Source Video

* `video_url`: Required. Provide one publicly accessible source video URL.
* The source video must be directly downloadable over HTTP(S) and no larger than **100 MiB** for duration inspection.

### Resolution

* `resolution`: `720p`, `1080p`. Default: `1080p`.

### Audio

* `audio_setting`: `auto` or `origin`. Default: `auto`.
* `auto` lets the model determine audio handling; `origin` preserves the original audio.

### Seed

* `seed` is optional. Supply an integer from `0` to `2147483647`.

### Safety Checker

* `enable_safety_checker` is optional. Set it to `true` or `false` to control safety checking.

## Pricing

Credits are calculated from the detected source-video duration, capped at **15 seconds**, multiplied by the selected resolution rate. The result is normalized to six decimal places.

Check the Vidgo dashboard for the current rate.

Credits are deducted on submission and refunded if the task fails.


## OpenAPI

````yaml api-manual/video-series/alibaba-happyhorse-1-0-video-edit.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Happy Horse Video Edit
  description: >-
    Transform existing footage with Happy Horse using text instructions and
    reference images to guide a new visual direction.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Video Series
      summary: Happy Horse Video Edit
      description: >-
        Send only the fields shown for this workflow. Parameters from other
        workflows are rejected before credits are deducted.


        When supplied, prompt and text must not be blank. Input URL fields
        require HTTP(S) URLs with a hostname and no embedded credentials.


        Input video must be between three and sixty seconds. Credits equal the
        detected source duration capped at fifteen seconds multiplied by the
        resolution rate, normalized to six decimal places. A nonblank prompt of
        at most 2,500 characters is required. Omit duration.


        Credits are deducted on submission and refunded if the task fails.
        Reference prompts do not require character1 or character2 markers.


        Media inspected for duration must be a publicly reachable HTTP(S) file
        of at most 100 MiB.
      operationId: submit_alibaba_happyhorse_1_0_video_edit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              additionalProperties: true
              properties:
                model:
                  type: string
                  enum:
                    - alibaba/happyhorse-1.0/video-edit
                  example: alibaba/happyhorse-1.0/video-edit
                  description: >-
                    Vidgo public model ID. Must be
                    `alibaba/happyhorse-1.0/video-edit`.
                input:
                  type: object
                  properties:
                    prompt:
                      type: string
                      maxLength: 2500
                      minLength: 1
                      description: >-
                        Text prompt. Required for text-to-video,
                        reference-to-video, and video-edit. Optional for
                        image-to-video. Maximum length is 2,500 characters.
                    reference_image_urls:
                      type: array
                      maxItems: 5
                      items:
                        type: string
                        format: uri
                        description: Reference image urls.
                      description: >-
                        Reference images: 1–9 for reference-to-video, or up to 5
                        optional images for video-edit. Describe referenced
                        subjects in the prompt; specific character markers are
                        not required.
                    video_url:
                      type: string
                      format: uri
                      description: Video url.
                    resolution:
                      type: string
                      enum:
                        - 720p
                        - 1080p
                      default: 1080p
                      description: Resolution.
                    audio_setting:
                      type: string
                      enum:
                        - auto
                        - origin
                      default: auto
                      description: Audio setting.
                    seed:
                      type: integer
                      minimum: 0
                      maximum: 2147483647
                      description: Seed.
                    enable_safety_checker:
                      type: boolean
                      description: Enable safety checker.
                  additionalProperties: false
                  required:
                    - video_url
                    - prompt
                callback_url:
                  type: string
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint for task completion
                    notifications. HTTPS is recommended. Omit, use null, or use
                    an empty string to disable callbacks.
              description: >-
                Keep model and callback_url at the root. Unknown root fields are
                ignored; unsupported input fields are rejected.
            examples:
              basic:
                summary: Basic workflow
                value:
                  model: alibaba/happyhorse-1.0/video-edit
                  input:
                    video_url: https://example.com/video.mp4
                    resolution: 1080p
                    audio_setting: auto
                    prompt: >-
                      Restyle the scene with warm sunset lighting while
                      preserving the original motion.
              callback:
                summary: Receive a completion callback
                value:
                  model: alibaba/happyhorse-1.0/video-edit
                  input:
                    video_url: https://example.com/video.mp4
                    resolution: 1080p
                    audio_setting: auto
                    prompt: >-
                      Restyle the scene with warm sunset lighting while
                      preserving the original motion.
                  callback_url: https://your-domain.com/callback
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - not_started
                          - running
                          - finished
                          - failed
                      created_time:
                        type: string
                        format: date-time
              example:
                code: 200
                data:
                  task_id: task-unified-example
                  status: running
                  created_time: '2026-09-10T08:00:00'
        '400':
          description: >-
            Invalid input, unsupported tier, inaccessible media, or insufficient
            credits
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '404':
          description: Unknown or disabled model
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '408':
          description: Request timed out
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: Invalid JSON or non-object request body
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '429':
          description: Rate or API key credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '502':
          description: Unable to create the upstream generation task
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '503':
          description: Model configuration or capability is not approved
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Use VIDGO_API_KEY.

````