apyhub
Back

Trim Video File API

What it does

Video Trimmer lets you send a video file and cut out a segment by specifying start and end times in seconds. It returns the trimmed clip as a binary file, ready to store, re-upload, or pass into another media workflow.

Use it when you need to isolate a highlight from a longer recording, prepare a short preview from a full-length asset, or remove unwanted lead-in and tail sections before further processing. The request body accepts three fields: file for the video upload, startSeconds, and endSeconds.

The response is the trimmed video itself, not a JSON wrapper. That makes it a good fit for pipelines that expect a file output, such as media ingestion, review tools, or automated content preparation steps.

If your product handles user-uploaded video, Video Trimmer gives you a simple way to normalize clips before analysis, sharing, or archiving.

POST
Trim a video
https://api.eu.apyhub.com/freedailypro/trim-video-file-api/video-trim

QUICKSTART

GUIDE

Quickstart

Trim a video by uploading the file and choosing the start and end times in seconds.

curl -X POST "https://api.eu.apyhub.com/freedailypro/trim-video-file-api/video-trim" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/video.mp4" \
  -F "startSeconds=10" \
  -F "endSeconds=30"

What you'll get back

Returns the trimmed video as a binary file (string with format: binary), not JSON.

TRY ITLIVE · 10 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*
The video. Up to 100 MB.
End time in seconds
Start time in seconds

About this endpoint

What it does

Trims a video by taking an uploaded file and cutting it between the specified start and end times, then returns the resulting video as binary output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesThe video file to trim. Binary upload. Up to 100 MB.
startSecondsNumberYesStart time in seconds.
endSecondsNumberYesEnd time in seconds.

Response

Returns a binary file containing the trimmed video, not a JSON object.

ParameterTypeDescription
binaryStringThe response body is binary data containing the trimmed video clip.

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

▣ 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.