# Frameport Upscale 1 API

> Your clip at 1080p or 2K: the same motion, frame rate and sound, sharper detail.

Frameport Upscale 1, a Frameport engine, called with one API key: from $0.03 per second of clip, charged only when the edit succeeds.

- Model id: `fp-upscale-1`
- Type: video, a clip editor: it changes a clip you send
- Maker: Frameport
- Tasks: Video upscale
- Endpoint: `POST https://frameport.ai/v1/videos/edits`
- Page: https://frameport.ai/models/fp-upscale-1
- Every model, as JSON: https://frameport.ai/models.json

## Pricing

| Resolution | Per second of clip |
| --- | --- |
| 1080p (default) | $0.03 |
| 2K | $0.05 |

- Charged once, and only when the edit succeeds. A failed job costs $0.00: its hold is released in full.
- The exact price is known before the run: the API returns it as `reserved_usd` when it accepts the job.
- Billed on the length of the clip you send, rounded up to the second (0.15 s over is not counted), 5 s at least. The price of the longest clip (30 s) is held first, then brought down to your clip's once it is measured.

## Options

| Option | Value |
| --- | --- |
| Tasks | Video upscale |
| Resolutions | 1080p, 2K |
| Clip length | 1 to 30 seconds (5 s billed at least) |
| Clip file | MP4 or MOV, up to 100 MB, 900 frames at most |
| Sound | Kept from the clip |
| Output | A video file, signed link valid about an hour |
| Billing unit | Per second of clip |
| Model id | `fp-upscale-1` |

## Frameport Upscale 1 API parameters

`POST https://frameport.ai/v1/videos/edits` with a JSON body and your key as a Bearer token:

| Field | Values | Notes |
| --- | --- | --- |
| `model` (required) | "fp-upscale-1" | Required. |
| `video` (required) | an https URL, or a file id | Required: the clip, MP4 or MOV, up to 100 MB, 900 frames at most, 1 to 30 seconds. A public https link we download, or one of your video outputs (file_…). |
| `resolution` | 1080p and 2K | 1080p when left out. A second of clip costs 1080p $0.03, 2K $0.05. |

## Frameport Upscale 1 request bodies, one per mode

### Upscale, a 5 s clip · $0.15

```json
{
  "model": "fp-upscale-1",
  "video": "https://example.com/clip.mp4",
  "resolution": "1080p"
}
```

## Submit, poll, download

### cURL

```bash
# 1. Submit: the price is held on your balance (reserved_usd)
curl https://frameport.ai/v1/videos/edits \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fp-upscale-1",
    "video": "https://example.com/clip.mp4",
    "resolution": "1080p"
  }'

# 2. Poll with the id it returns, until "succeeded" or "failed"
curl https://frameport.ai/v1/videos/edits/$GENERATION_ID \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY"

# 3. Download outputs[0].url once it has succeeded (a signed link, no key needed)
curl -L "$OUTPUT_URL" -o out.mp4
```

### Python

```python
import os, time
import requests

API = "https://frameport.ai/v1"
headers = {"Authorization": f"Bearer {os.environ['FRAMEPORT_API_KEY']}"}

# 1. Submit: the price is held on your balance (reserved_usd)
gen = requests.post(f"{API}/videos/edits", headers=headers, json={
    "model": "fp-upscale-1",
    "video": "https://example.com/clip.mp4",
    "resolution": "1080p",
}).json()
if gen.get("error"):
    raise SystemExit(gen["error"]["message"])

# 2. Poll until it succeeds or fails
while gen["status"] in ("queued", "running"):
    time.sleep(3)
    gen = requests.get(f"{API}/videos/edits/{gen['id']}", headers=headers).json()

# A failed generation costs nothing: the hold is released
if gen["status"] == "failed":
    raise SystemExit(gen["error"]["message"])

# 3. Download the file (a signed link, no key needed)
file = requests.get(gen["outputs"][0]["url"])
open("out.mp4", "wb").write(file.content)
print("saved out.mp4", gen["cost_usd"])
```

### JavaScript

```js
import { writeFile } from 'node:fs/promises'

const API = 'https://frameport.ai/v1'
const headers = {
  'Authorization': `Bearer ${process.env.FRAMEPORT_API_KEY}`,
  'Content-Type': 'application/json',
}

// 1. Submit: the price is held on your balance (reserved_usd)
let gen = await fetch(`${API}/videos/edits`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    model: 'fp-upscale-1',
    video: 'https://example.com/clip.mp4',
    resolution: '1080p',
  }),
}).then(res => res.json())
if (gen.error) throw new Error(gen.error.message)

// 2. Poll until it succeeds or fails
while (gen.status === 'queued' || gen.status === 'running') {
  await new Promise(resolve => setTimeout(resolve, 3000))
  gen = await fetch(`${API}/videos/edits/${gen.id}`, { headers }).then(res => res.json())
}
// A failed generation costs nothing: the hold is released
if (gen.status === 'failed') throw new Error(gen.error.message)

// 3. Download the file (a signed link, no key needed)
const file = await fetch(gen.outputs[0].url)
await writeFile('out.mp4', Buffer.from(await file.arrayBuffer()))
console.log('saved out.mp4', gen.cost_usd)
```

## What Frameport Upscale 1 is good at

Your clip at 1080p or 2K: the same motion, frame rate and sound, sharper detail.

## About the Frameport Upscale 1 API

### How much does the Frameport Upscale 1 API cost?

Frameport Upscale 1 is billed per second of the clip you send: $0.03 at 1080p and $0.05 at 2K. A 5-second clip at 1080p costs $0.15. A clip under 5 seconds is billed 5. The price of the longest clip is held first and brought down to your clip's once it is measured; you are charged once, only when the edit succeeds.

### How do I call Frameport Upscale 1 from code?

Send POST /v1/videos/edits with "model": "fp-upscale-1" and the clip in video, your API key as a Bearer token. The answer is a generation with an id: poll GET /v1/videos/edits/{id} until its status is succeeded, then download outputs[0].url.

### What happens if a Frameport Upscale 1 generation fails?

Nothing is charged. The price is held on your balance when the job starts and released in full if it fails: cost_usd stays at 0.

### Which clips does Frameport Upscale 1 take?

MP4 or MOV, up to 100 MB, 900 frames at most, 1 to 30 seconds (5 s billed at least): a public https link, or one of your own video outputs by its file id. A clip it cannot use is refused with invalid_video, and nothing is charged.

### Do I need a subscription?

No. You top up a prepaid balance in dollars, from $10, and it never expires. Every model runs on the same balance and the same API key.
