Home/Video transcoding API
Video transcoding API

A video transcoding API that turns any upload into web-ready MP4, up to 4K

Upload a file in almost any format, call one endpoint, and download an H.264 MP4 that plays in every browser. No encoding farm, no ffmpeg flags, no queue to babysit.

What the transcoding API does

You send a video; you get back files you can ship. Video Piper accepts MP4, MOV, MKV, WebM and most other common formats, up to 20 GiB and 8 hours per file, and produces an H.264 and AAC MP4 with fast start, so it plays progressively in any browser, plus a poster image for thumbnails. On Pro and Scale you also get an adaptive HLS stream. Because browsers record WebM, recordings made in a web page work without any conversion on your side.

The result is a plain download link or a signed playback link you can drop into a <video> tag. There is nothing to host, no job queue to run and no encoder settings to tune.

Choose the quality, up to 4K

Set maxHeight to 720, 1080 (the default), 1440 or 2160 (4K). The API makes that level and every lower one, so players can switch between them, and it never upscales. The top quality you can request depends on your plan: Free tops out at 720p, Starter at 1080p, and Pro and Scale at 4K. If a request asks for more than the plan allows, the API answers 403 PLAN_UPGRADE_REQUIRED, and a dry run reports the same error before you commit to an encode.

How it stays fast and consistent

Every video runs the same pipeline: plan, then video chunks and audio in parallel, then publish.

Videos under 5 minutes skip the fan-out: they are planned, encoded and published inside one container, which avoids two container starts. The documentation puts it plainly: short videos are usually ready within a minute or two of complete, and long ones are processed in parallel chunks.

Uploads that don't fall over

Video bytes never pass through the API. You create the video, get pre-signed URLs, and upload the file straight to storage in parallel 64 MiB parts. If a part fails you retry that part, not the file. Calling complete twice never starts a second job. If the file already lives online, skip the upload and pass a public HTTPS sourceUrl; the API downloads it and processes it the same way.

To keep processing quick, request the last parts of a large upload late: when the final parts (within 192 MiB of the end) are requested, the API starts the processing container so it boots while they upload. No extra calls are needed.

Example: upload, process, download

Adapted from the quickstart in the documentation (with 4K requested). Files up to 64 MiB are a single part; the docs also show Python and JavaScript versions that handle any size.

AUTH="Authorization: Bearer $VIDEO_API_KEY"; JSON="Content-Type: application/json"

# 1. Create the video
SIZE=$(wc -c < lesson.mp4 | tr -d ' ')
VIDEO_ID=$(curl -s -X POST "$VIDEO_API/videos" -H "$AUTH" -H "$JSON" \
  -d "{\"fileName\":\"lesson.mp4\",\"sizeBytes\":$SIZE,\"maxHeight\":2160}" | jq -r .videoId)

# 2. Get an upload URL for part 1, and PUT the bytes to it (no Authorization header)
PART_URL=$(curl -s -X POST "$VIDEO_API/videos/$VIDEO_ID/parts" -H "$AUTH" -H "$JSON" \
  -d '{"partNumbers":[1]}' | jq -r '.parts[0].url')
curl -s -T lesson.mp4 "$PART_URL"

# 3. Start processing
curl -s -X POST "$VIDEO_API/videos/$VIDEO_ID/complete" -H "$AUTH" -H "$JSON" -d '{}'

# 4. Wait for SUCCEEDED, then download
until [ "$(curl -s "$VIDEO_API/videos/$VIDEO_ID" -H "$AUTH" | jq -r .status)" != "RUNNING" ]; do sleep 10; done
curl -s -o lesson-processed.mp4 "$(curl -s "$VIDEO_API/videos/$VIDEO_ID" -H "$AUTH" | jq -r .downloadUrl)"

Rather than polling, you can subscribe to the video.ready webhook, which carries the download and playback links. Add an Idempotency-Key header to POST /videos and complete so a retried request returns the first response instead of creating a duplicate.

Catch mistakes before they cost minutes

Requests are checked against your videos' real lengths before anything runs, and every problem comes back at once with its field path. Add ?dryRun=true to check a request, including plan limits, without creating or starting anything.

What transcoding costs

You pay for what you keep. A processing minute is one minute of finished output video, counted at least one minute per video. 720p and 1080p count once, 1440p counts double and 4K counts four times. Trimming reduces your minutes because the output is shorter. Uploads are always free, and plans include storage and delivery allowances.

Which plans include transcoding

Transcoding is part of the core API on every plan. What changes by plan is the highest quality you can ask for, and adaptive streaming links, which are a Pro and Scale feature.

PlanPriceProcessing minutesMax qualityTranscoding
Free$0/mo30720pIncluded
Starter$49/mo4001080pIncluded
Pro$199/mo1,5004KIncluded
Scale$699/mo6,0004KIncluded

Usage beyond a paid plan is billed at $0.09 per processing minute, $0.15 per GB-month of storage and $0.55 per GB of delivery. Full details are on the pricing page.

In the documentation

Frequently asked questions

Which input formats does the transcoding API accept?

MP4, MOV, MKV, WebM and most other common formats, up to 20 GiB and 8 hours per file by default. Browser recordings in WebM are fully supported.

What does a finished video look like?

Each finished video has an H.264 and AAC MP4 with fast start for streaming playback, plus a poster image. Pro and Scale videos also get adaptive HLS streaming copies.

How long does transcoding take?

Short videos are usually ready within a minute or two of calling complete. Long videos are split into frame-exact chunks and encoded in parallel, on GPUs for videos over 10 minutes.

Does it upscale low-resolution video?

No. You choose the highest quality to produce (720p, 1080p, 1440p or 2160p) and every lower level is made too, but a video is never upscaled past its source.

How is transcoding billed?

Per processing minute of finished output video, with at least one minute per video. 1440p counts double and 4K counts four times. Paid plans keep working past their allowance at $0.09 per extra minute.

Start building with Video Piper

Create a free account with just your email, grab an API key and make your first request in minutes.