Developer API

Compress Videos From Your Code

Three endpoints. Upload a video, get a job ID, download the compressed MP4. No encoding infrastructure, no FFmpeg flags, no queue to babysit.

The same engine that has already compressed 133,635 videos on this site — available over HTTPS.

compress.sh
# 1. Upload a video, get a job ID
curl -X POST https://handbrake-online.com/api/v1/jobs \
  -H "Authorization: Bearer $API_KEY" \
  -F "file=@holiday.mov"

# => {"job_id":"job_8f3c1a","status":"queued"}

# 2. Poll until it is done
curl https://handbrake-online.com/api/v1/jobs/job_8f3c1a \
  -H "Authorization: Bearer $API_KEY"

# => {"status":"completed","compressed_size":18443212}

# 3. Download the compressed MP4
curl -L -o small.mp4 \
  https://handbrake-online.com/api/v1/jobs/job_8f3c1a/download \
  -H "Authorization: Bearer $API_KEY"
1

Upload

POST your file as multipart form data — or hand us a URL and we fetch it. MP4, M4V, MOV, AVI, MKV, MPEG and WMV are accepted.

2

Get a job ID

Every upload returns a job ID immediately. Poll its status, or register a webhook and we call you the moment encoding finishes.

3

Download

Pull the compressed MP4 from the download endpoint. Typically up to 80% smaller at the same perceived quality.

The whole API

Authenticate with a bearer token in the Authorization header. Everything speaks JSON, except the download endpoint, which streams the file.

Method Endpoint What it does
POST /api/v1/jobs Upload a video and create an encoding job
GET /api/v1/jobs/{id} Job status, progress and file sizes
GET /api/v1/jobs/{id}/download Stream the compressed MP4
GET /api/v1/jobs List your jobs, newest first
DELETE /api/v1/jobs/{id} Delete a job and its files right away
node.js
const form = new FormData()
form.append('file', await openAsBlob('holiday.mov'))

const job = await fetch(
  'https://handbrake-online.com/api/v1/jobs',
  {
    method: 'POST',
    headers: { Authorization: `Bearer ${process.env.API_KEY}` },
    body: form,
  }
).then(r => r.json())

console.log(job.job_id) // job_8f3c1a
php
$job = Http::withToken($apiKey)
    ->attach('file', file_get_contents('holiday.mov'), 'holiday.mov')
    ->post('https://handbrake-online.com/api/v1/jobs')
    ->json();

// poll until completed, then download
$mp4 = Http::withToken($apiKey)
    ->get("https://handbrake-online.com/api/v1/jobs/{$job['job_id']}/download")
    ->body();

Pricing

The website stays free forever. The API is metered by encoded video minutes, billed monthly.

Starter

For side projects

$15 /month

100 encoded minutes included, then $0.18/min.

Choose Starter
Most popular

Growth

For production apps

$99 /month

1,000 encoded minutes included, then $0.12/min. Webhooks and priority queue.

Choose Growth

Scale

For heavy pipelines

$499 /month

10,000 encoded minutes included, then $0.07/min. Dedicated workers.

Choose Scale

Enterprise

Custom volume

Talk to us

Volume pricing, SLA, EU-only processing and invoicing.

Get in touch

Create your developer account

Register below and we send your personal API key to your inbox. No credit card needed to start.

Free to register. You only pay for what you encode. See our privacy policy.

Which settings do you encode with?

The same proven Handbrake default preset the website uses — H.264 MP4, tuned for a large size reduction at a quality most viewers cannot tell apart from the source.

How long do you keep my files?

Source and result are deleted automatically shortly after the job completes, and you can delete a job yourself at any time. Details are in the privacy policy.

How big can a file be?

The browser uploader stops at 500 MB. Over the API you can send larger files in chunks — the limit depends on your plan, and Enterprise has none worth mentioning.

Is the free website going away?

No. Compressing a video in your browser stays free. The API is the paid product for teams who want to do it automatically, at volume, from their own software.