---
title: "POST /happyhorse/api/v1/services/aigc/video-generation/video-synthesis"
method: POST
path: "/happyhorse/api/v1/services/aigc/video-generation/video-synthesis"
---

# POST /happyhorse/api/v1/services/aigc/video-generation/video-synthesis

`POST /happyhorse/api/v1/services/aigc/video-generation/video-synthesis`

## Request

- Base URL: `https://api.ttapi.io`
- URL: `https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis`
- Auth: API key in header `TT-API-KEY`
- TypeScript: <https://skmtc.dev/ttapi/apis/flowmusic-api-docs/docs/happyhorse/api/v1/services/aigc/video-generation/video-synthesis/post.ts> (a function with typed inputs; its response is checked against the schema)

Video Editing - Edit video based on videos and reference images

## Request body

- VideoEditRequest
  - `model` string, required: Model name. Fixed value: happyhorse-1.0-video-edit.
  - `input` object, required: Basic input information, including video to edit, reference images and prompt.
    - `prompt` string, required: Text prompt, used to describe the editing intent for the video, such as style transfer, partial replacement, etc. Supports any language input, with a maximum length of 5000 non-Chinese characters or 2500 Chinese characters. Exceeding content will be automatically truncated.
    - `media` union[], required: Media list, used to specify the video to edit and reference images. Array must contain 1 video type element; optionally contain 0 to 5 reference_image type elements.
      - union
        - object: Video to edit
          - `type` 'video', required: Media type. Fixed value: video (video to edit).
          - `url` string, required: URL of video to edit, must be a publicly accessible URL. Supports HTTP and HTTPS protocol. Video limits: format: MP4, MOV (H.264 encoding recommended); duration: 3 to 60 seconds; resolution: long side not exceeding 2160 pixels, short side not less than 320 pixels; aspect ratio: 1:2.5 to 2.5:1; file size: not exceeding 100MB; frame rate: greater than 8fps. Output video duration: 3 to 15 seconds (when input video is not more than 15 seconds, output duration is consistent with input; when input video exceeds 15 seconds, system will automatically truncate the first 15 seconds as valid segment, so maximum output is 15 seconds).
        - object: Reference image
          - `type` 'reference_image', required: Media type. Fixed value: reference_image.
          - `url` string, required: URL of reference image, must be a publicly accessible URL. Supports HTTP or HTTPS protocol. Image limits: format: JPEG, JPG, PNG, WEBP; resolution: width and height not less than 300 pixels; aspect ratio: 1:2.5 to 2.5:1; file size: not exceeding 10MB.
  - `parameters` object: Video editing parameters, such as setting video resolution, etc.
    - `resolution` '720P' | '1080P': Resolution level of generated video.
    - `watermark` boolean: Whether to add watermark to generated video. Watermark is located at the bottom right corner of video, text is fixed as "Happy Horse". true: default, add watermark; false: no watermark.
    - `audio_setting` 'auto' | 'origin': Audio control. auto: default, controlled by model; origin: preserve the original audio of input video.
    - `seed` integer: Random seed, value range: [0, 2147483647]. If not specified, system will automatically generate a random seed. To improve reproducibility of generation results, it is recommended to fix the seed value. Note that due to the probabilistic nature of model generation, even with the same seed, cannot guarantee identical results each time.

## Response `200`

Request successful

- object
  - `output` object, required: Task output information
    - `task_status` 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELED' | 'UNKNOWN': Task status
    - `task_id` string: Task ID. Valid for 24 hours.
  - `request_id` string, required: Request unique identifier. Can be used for request tracing and troubleshooting.

---

[API](https://skmtc.dev/ttapi/apis/flowmusic-api-docs.md) - [All operations](https://skmtc.dev/ttapi/apis/flowmusic-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/ttapi/apis/flowmusic-api-docs/revisions/f27f8a59dbd0?raw)
