Upload a file

POST /api/v1/uploads — get a signed URL, PUT a local video file (MP4, MOV or WebM, up to 100MB) to it, then pass the returned video URL to /upscale.

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/uploads

Request

FieldTypeRequiredDescription
content_typestringYesvideo/mp4, video/quicktime or video/webm
sizeintegerYesFile 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"
}
FieldDescription
upload_urlWhere to PUT the file. No Authorization header is needed; the URL itself is the permission.
headersSend these headers with the PUT. Content-Type must match what you declared.
video_urlPass this to /upscale once the upload finishes.
max_bytesThe upload is rejected if the file is bigger than the size you declared.
expires_atThe 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

StatusCodeWhen
400invalid_requestUnsupported content_type, invalid size, or the PUT sent a different Content-Type or was interrupted
403paid_plan_requiredThe account has never bought credits or subscribed
402insufficient_creditsYour credit balance is empty
403invalid_upload_tokenThe upload URL is invalid or has expired (PUT)
411invalid_requestThe PUT had no body or no Content-Length
413file_too_largeThe file is over 100MB, or bigger than the declared size