# Video to video API

https://getmegabrain.com/media/video-to-video · prices from the live MegaBrain catalogue

> MegaBrain runs 9 video-to-video models on one API key: HappyHorse 1.0 — video edit, Wan 2.7 — video edit, Wan 2.6, Wan 2.6 Flash, Kling 3.0 Omni, Kling 2.6 — motion control, Kling 3.0 — motion control, Wan 2.2 Animate — move and Wan 2.2 Animate — replace. At default settings the lowest price is Wan 2.6 Flash at $0.012 per second of video, so a 5-second clip costs $0.06; the highest is HappyHorse 1.0 — video edit at $0.168 per second of input. Prices are in US dollars from the live MegaBrain catalogue; a job the provider fails is refunded in full.

The models that take a video in and give a changed video back: make the character from your photo perform the moves of a reference clip, swap the person in a shot, restyle a scene or edit it with a text instruction. Run them in the browser playground or through the API on one MegaBrain key, paid from a prepaid US-dollar balance.

## Video-to-video models and prices

| Model | ID | Price |
|---|---|---|
| [HappyHorse 1.0 — video edit](https://getmegabrain.com/media/alibaba/happyhorse-1.0/video-edit) | `alibaba/happyhorse-1.0/video-edit` | $0.168 per second of input |
| [Wan 2.7 — video edit](https://getmegabrain.com/media/alibaba/wan-2.7/video-edit) | `alibaba/wan-2.7/video-edit` | $0.096 per second of input |
| [Wan 2.6 — video to video](https://getmegabrain.com/media/alibaba/wan-2.6/video-to-video) | `alibaba/wan-2.6/video-to-video` | $0.042 per second of video |
| [Wan 2.6 Flash — video to video](https://getmegabrain.com/media/alibaba/wan-2.6-flash/video-to-video) | `alibaba/wan-2.6-flash/video-to-video` | $0.012 per second of video |
| [Kling 3.0 Omni — video to video](https://getmegabrain.com/media/kling-video/o3/video-to-video) | `kling-video/o3/video-to-video` | $0.1362 per second of input |
| [Kling 2.6 — motion control](https://getmegabrain.com/media/kling-video/v2.6/motion-control) | `kling-video/v2.6/motion-control` | $0.0756 per second of input |
| [Kling 3.0 — motion control](https://getmegabrain.com/media/kling-video/v3/motion-control) | `kling-video/v3/motion-control` | $0.1362 per second of input |
| [Wan 2.2 Animate — move](https://getmegabrain.com/media/alibaba/wan-2.2/animate-move) | `alibaba/wan-2.2/animate-move` | $0.075 per second of input |
| [Wan 2.2 Animate — replace](https://getmegabrain.com/media/alibaba/wan-2.2/animate-replace) | `alibaba/wan-2.2/animate-replace` | $0.036 per second of input |

## Which model to pick

Motion control: Kling 3.0 and Kling 2.6 Motion Control make the person in your image perform the moves of a reference video of up to 30 seconds, a dance, a gesture or a walk, at 720p or 1080p; Wan 2.2 Animate Move does the same at 720p, expressions included. Character swap: Wan 2.2 Animate Replace swaps the person in a video for the character in your image and keeps the scene, light and motion. Editing by instruction: HappyHorse 1.0 edits videos of 3 to 60 seconds and can keep or remake their sound, Kling 3.0 Omni transforms 3 to 15 seconds at up to 4K, and Wan 2.7 edits 2 to 10 seconds; all three take reference images. New clips from references: Wan 2.6 and Wan 2.6 Flash make a 5- or 10-second video that follows the people, motion and look of up to three reference videos.

## The files are links

Pass the source video as a public https:// link to an MP4 or MOV file, and the character image as a JPEG, PNG or WebP link. The field names differ by model (video_url or video_urls, image_url or input_urls): each model’s page lists them. In the playground you can upload the files instead.

## Priced by the length of your video

The server reads how long the input video is before it accepts the job, and the price is that length times the per-second price in the table, so the cost is known before anything runs. Wan 2.6 and Wan 2.6 Flash are priced by the clip length you ask for instead. A job the provider fails is refunded in full.

## No source video? Start from a still

To bring a single photo or illustration to life rather than change a clip, pass it as the start frame of an image-to-video model.

## Call it

```python
import os, time, requests

BASE = "https://getmegabrain.com/api/gateway/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MEGABRAIN_API_KEY']}"}

job = requests.post(f"{BASE}/queue/kling-video/v3/motion-control", headers=HEADERS, json={
  "prompt": "a slow dolly shot of a lighthouse at dawn, waves below",
  "input_urls": [
    "https://example.com/photo.jpg"
  ],
  "video_urls": [
    "https://example.com/clip.mp4"
  ]
}).json()

while requests.get(job["status_url"], headers=HEADERS).json()["status"] not in ("COMPLETED", "FAILED"):
    time.sleep(2)

print(requests.get(job["response_url"], headers=HEADERS).json())
```

## FAQ

**How much does AI video-to-video cost through an API?**

MegaBrain runs 9 video-to-video models on one API key: HappyHorse 1.0 — video edit, Wan 2.7 — video edit, Wan 2.6, Wan 2.6 Flash, Kling 3.0 Omni, Kling 2.6 — motion control, Kling 3.0 — motion control, Wan 2.2 Animate — move and Wan 2.2 Animate — replace. At default settings the lowest price is Wan 2.6 Flash at $0.012 per second of video, so a 5-second clip costs $0.06; the highest is HappyHorse 1.0 — video edit at $0.168 per second of input. Prices are in US dollars from the live MegaBrain catalogue; a job the provider fails is refunded in full.

**Do I need an account with each model’s maker?**

No. Sign up on MegaBrain, top up the balance by card and create one API key: it works for every model in the table, for the other image, video and audio models and for the text models.

**How is generation paid for?**

From a prepaid US-dollar balance at the price in the table, with no subscription. The price of a job is held when it is submitted and refunded in full if the provider fails it.

**What is motion control?**

Copying the movement of one video onto a character from an image: you send a photo of the character and a reference clip of someone dancing, waving or walking, and get a video of your character making the same moves. Kling 3.0 and 2.6 Motion Control and Wan 2.2 Animate Move do this; Kling 2.6 takes a reference video of 3 to 30 seconds.

**How do I call it from code?**

A POST request to https://getmegabrain.com/api/gateway/v1/queue/<model id> submits the job; then poll status_url until it is COMPLETED and fetch the video link from response_url. There is a Python example below, and every model’s parameters are on its page.
