Upload a file
POST /api/v1/uploads — get a signed URL, PUT a local video file to it, then upscale it.
If your video isn't at a public URL, upload it first. Uploading takes two requests: ask us for a signed upload URL, then send the file straight to storage with PUT.
POST https://videoupscaler.co/api/v1/uploadsRequest
| Field | Type | Required | Description |
|---|---|---|---|
content_type | string | Yes | video/mp4, video/quicktime or video/webm |
size | integer | Yes | File size in bytes, up to 100MB (104857600) |
For files over 100MB, host the file yourself and pass its URL to /upscale (up to 500MB).
Response
201 Created:
{
"upload_url": "https://api.videoupscaler.co/uploads/eyJrZXki…",
"method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"video_url": "https://storage.videoupscaler.co/videos/api/5f0c…mp4",
"max_bytes": 7340032,
"expires_at": "2026-09-30T09:00:00.000Z"
}| Field | Description |
|---|---|
upload_url | Where to PUT the file. No Authorization header is needed; the URL itself is the permission. |
headers | Send these headers with the PUT. Content-Type must match what you declared. |
video_url | Pass this to /upscale once the upload finishes. |
max_bytes | The upload is rejected if the file is bigger than the size you declared. |
expires_at | The upload URL works for 1 hour. |
Full example
FILE=clip.mp4
SIZE=$(wc -c < "$FILE" | tr -d ' ')
# 1. Get an upload URL
UPLOAD=$(curl -s https://videoupscaler.co/api/v1/uploads \
-H "Authorization: Bearer $VIDEOUPSCALER_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"content_type\": \"video/mp4\", \"size\": $SIZE}")
# 2. Upload the file
curl -X PUT "$(echo "$UPLOAD" | jq -r .upload_url)" \
-H "Content-Type: video/mp4" \
--data-binary @"$FILE"
# 3. Upscale it
curl https://videoupscaler.co/api/v1/upscale \
-H "Authorization: Bearer $VIDEOUPSCALER_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"video_url\": \"$(echo "$UPLOAD" | jq -r .video_url)\", \"resolution\": \"1080p\"}"import { readFile } from 'node:fs/promises';
const api = 'https://videoupscaler.co/api/v1';
const auth = { Authorization: `Bearer ${process.env.VIDEOUPSCALER_API_KEY}` };
const file = await readFile('clip.mp4');
// 1. Get an upload URL
const upload = await fetch(`${api}/uploads`, {
method: 'POST',
headers: { ...auth, 'Content-Type': 'application/json' },
body: JSON.stringify({ content_type: 'video/mp4', size: file.length }),
}).then((r) => r.json());
// 2. Upload the file
await fetch(upload.upload_url, { method: 'PUT', headers: upload.headers, body: file });
// 3. Upscale it
const task = await fetch(`${api}/upscale`, {
method: 'POST',
headers: { ...auth, 'Content-Type': 'application/json' },
body: JSON.stringify({ video_url: upload.video_url, resolution: '1080p' }),
}).then((r) => r.json());import os, requests
api = "https://videoupscaler.co/api/v1"
auth = {"Authorization": f"Bearer {os.environ['VIDEOUPSCALER_API_KEY']}"}
path = "clip.mp4"
# 1. Get an upload URL
upload = requests.post(f"{api}/uploads", headers=auth,
json={"content_type": "video/mp4", "size": os.path.getsize(path)}).json()
# 2. Upload the file
with open(path, "rb") as f:
requests.put(upload["upload_url"], headers=upload["headers"], data=f).raise_for_status()
# 3. Upscale it
task = requests.post(f"{api}/upscale", headers=auth,
json={"video_url": upload["video_url"], "resolution": "1080p"}).json()A successful PUT returns 200 with {"video_url": "…"}.
Notes
- Requesting an upload URL is free, but needs a credit balance of at least 1 credit.
- Uploaded files are kept only for processing and may be deleted after 7 days.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_request | Unsupported content_type, invalid size, or the PUT sent a different Content-Type or was interrupted |
403 | paid_plan_required | The account has never bought credits or subscribed |
402 | insufficient_credits | Your credit balance is empty |
403 | invalid_upload_token | The upload URL is invalid or has expired (PUT) |
411 | invalid_request | The PUT had no body or no Content-Length |
413 | file_too_large | The file is over 100MB, or bigger than the declared size |