apyhub
Back
▣ FILE CONVERSION · FILE MANIPULATION

Convert Video Formats API

Hosted on ApyHub

What it does

The video converter API changes a video from one container format to another. Send a video_url or upload the file as video, set output_format, and get the result back as a direct download or as a signed link.

output_format takes mp4, mkv, avi, mov, flv, 3gp or webm. Four endpoints cover the input and output combinations: URL or upload in, binary download or signed data URI out. Download routes suit a request someone is waiting on, and link routes suit background jobs and anything that stores the file for later. Uploads go up to 100 MB per request, so use the URL routes for anything larger.

Media pipelines use the video converter API to normalize mixed uploads into one format before storage. CMS ingest converts whatever contributors send into the format the player expects. Backend jobs re-wrap archive footage into something a browser can play.

The conversion is controlled by output_format. To change file size, the Video Compression API takes a compression_percentage from 0 to 100.

For long videos and batch work, the Async Video Converter API does the same conversion as a job: submit, get a job_id, poll until it finishes. It also pairs with the Video Watermark API when the output carries a logo. All of them are callable by AI agents through ApyHub MCP.

▣ ENDPOINT 02 / 04
POST
Convert video format (upload → download)
https://api.eu.apyhub.com/apyhub/convert-video-formats/multi-part/download

QUICKSTART

GUIDE

Quickstart

Download a converted video file by uploading your source video and choosing an output format.

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

What you'll get back

Returns a binary file stream, not a JSON object. The response body is the converted video file in the requested format.

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)
Desired output container format.

About this endpoint

What it does

Converts an uploaded video file to a different container format and returns the converted file as a binary response.

Request Body

ParameterTypeDescription
videoBinaryVideo file upload. Must be binary data. Supported input files: .mp4, .mkv, .avi, .mov, .flv, .3gp, .webm.
output_formatENUMDesired output container format. Allowed values: mp4, mkv, avi, mov, flv, 3gp, webm.

Response

Returns a binary file response containing the converted video. The output is a raw binary stream, not a JSON object.

ParameterTypeDescription
binary responseStringConverted video file content returned as binary data.

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

▣ ENDPOINT 04 / 04
POST
Convert video format (URL → download)
https://api.eu.apyhub.com/apyhub/convert-video-formats/url/download

QUICKSTART

GUIDE

Quickstart

Convert a video from a URL into the format you choose.

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

What you'll get back

Returns the converted file as binary data (string with format: "binary"), so the response is the video content itself rather than JSON.

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*

About this endpoint

What it does

Converts a video from a source URL into the requested output format and returns the resulting file as binary content. The request body must include the source video_url and the desired output_format.

Request Body

ParameterTypeDescription
video_urlStringSource video URL. Must be a valid URI.
output_formatENUMDesired output format. Allowed values: mp4, mkv, avi, mov, flv, 3gp, webm.

Response

Returns a binary file stream containing the converted video in the requested format.

ParameterTypeDescription
binaryStringThe converted video file returned as binary content.
▣ 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.