# Video upscaling API

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

> MegaBrain runs 2 video upscaling models on one API key: Topaz Video Upscale and Video Upscale. At default settings the lowest price is Video Upscale at $0.009 per second of input, so a 10-second input costs $0.18; the highest is Topaz Video Upscale at $0.048 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 raise a video’s resolution and restore its detail: take a 720p AI clip to 4K for a big screen, sharpen old footage or clean up a phone recording. Run them in the browser or through the API on one MegaBrain key, paid per second of the input video from a prepaid US-dollar balance.

## Video upscaling models and prices

| Model | ID | Price |
|---|---|---|
| [Topaz Video Upscale](https://getmegabrain.com/media/topaz/video-upscale) | `topaz/video-upscale` | $0.048 per second of input |
| [Video Upscale](https://getmegabrain.com/media/upscale/video) | `upscale/video` | $0.009 per second of input |

## Which upscaler to pick

Topaz Video Upscale sharpens and enlarges by the factor you set in upscale_factor, 1, 2 or 4: at 1 it only sharpens. Video Upscale (upscale/video) aims at an output size instead, 1080P, 2K or 4K in resolution, for videos of up to 60 seconds.

## Priced by the length of your video

The server reads how long the input video is before it accepts the job; the price is that length times the per-second price in the table. A job the provider fails is refunded in full.

## Generate, then upscale

Make your drafts at a video model’s lower resolution, then upscale only the take you keep instead of paying for 1080p on every attempt.

## 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/topaz/video-upscale", headers=HEADERS, json={
  "video_url": "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 upscaling cost through an API?**

MegaBrain runs 2 video upscaling models on one API key: Topaz Video Upscale and Video Upscale. At default settings the lowest price is Video Upscale at $0.009 per second of input, so a 10-second input costs $0.18; the highest is Topaz Video Upscale at $0.048 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.

**How do I send the video?**

Pass a public https:// link to an MP4 or MOV file in video_url. In the playground you can upload a file instead.

**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.
