apyhub
FILE CONVERSION · FILE MANIPULATION

Compress Video File API

What it does

Video Compression reduces the size of a video by taking either an uploaded file or a video URL and returning a compressed result. You control the compression strength with compression_percentage, from 0 to 100, so you can trade off file size against output quality based on your use case.

Use POST /multi-part/download when you want to upload a video file and receive the compressed video back as binary data. Supported input formats include .mp4, .mkv, .avi, .mov, .flv, .3gp, and .webm. Use POST /multi-part/link if you prefer the compressed result as a time-limited signed URL instead of a direct file download.

If your source video is already hosted, POST /url/download and POST /url/link let you send a video_url instead of uploading the file. The download variants return binary output, while the link variants return an object with a data field containing a signed URI for retrieval.

Video Compression is a good fit for upload pipelines, mobile delivery, storage optimisation, and bandwidth-sensitive workflows where smaller video files are easier to store, transfer, or process.

▣ ENDPOINT 01 / 04
POST
Compress video (upload → download)
https://api.eu.apyverse.com/apyhub/video-compression/multi-part/download

QUICKSTART

GUIDE

Quickstart

Upload a video file to generate a compressed download response.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-compression/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a binary file response (string with format: binary), not a JSON object.

TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Video file (.mp4 .mkv .avi .mov .flv .3gp .webm)
Compression strength 0–100 (higher = smaller file, lower quality).

About this endpoint

What it does

Compresses an uploaded video file and returns the compressed video as a binary download. The request sends the source video and an optional compression percentage; the response is the resulting file content.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file upload. Supported formats: .mp4, .mkv, .avi, .mov, .flv, .3gp, .webm.
compression_percentageIntegerNoCompression strength from 0 to 100. Default: 50. Higher values produce a smaller file with lower quality.

Response

Returns a binary file download containing the compressed video. The response schema is a single binary string, so there is no JSON wrapper or response fields to document.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 03 / 04
POST
Compress video (URL → download)
https://api.eu.apyverse.com/apyhub/video-compression/url/download

QUICKSTART

GUIDE

Quickstart

Download a compressed video from a URL by sending the source video_url in the request body.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-compression/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"video_url":"https://assets.apyhub.com/samples/sample.mp4"}'

What you'll get back

Returns a binary file in the response body.

(binary data)
TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Compression strength 0–100 as a string or number.

About this endpoint

What it does

Compresses a video fetched from a URL and returns the compressed file as binary content. The request body must include the source video URL, with an optional compression percentage to control the compression strength.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesSource video URL. Format: URI.
compression_percentageStringNoCompression strength from 0 to 100, as a string or number. Default: 50.

Response

Returns a binary file containing the compressed video.

ParameterTypeMandatoryDescription
fileStringYesBinary response body representing the compressed video file.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.