ForHosting KIT · Video

Trim a video

Most edits a video needs aren't edits at all — they're a start point and an end point. This endpoint cuts exactly that range and hands back a clean clip, without touching the parts you already got right.

● StablePer request + per minute$0.077
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The fifteen extra minutes nobody wants

A raw recording almost always has slack at both ends: a countdown before a webinar starts, a stretch of silence after a customer call wraps, a warm-up take before a product demo gets good. None of that belongs in the file you actually ship, but opening a full editor just to shave off the edges is a disproportionate amount of tooling for a two-cut job. video.trim exists for exactly that moment — you know the timestamps, you just need the clip.

What the request looks like

POST /video/trim with the source video and the start and end points you want kept, and the response is an immediate task_id while the cut runs in the background. Once it's done, the trimmed file shows up through a signed webhook call or waits at a signed link valid for 24 hours — whichever your system is set up to watch for.

Why a trim isn't a full re-encode

Video files are built from keyframes and the frames that depend on them, and a smart cut lines the edit points up against that structure instead of decoding and re-compressing every single frame in the file. That's the difference between a trim and a full transcode: a trim can often preserve the original encoding decisions almost entirely, which keeps quality intact and keeps the job fast. It's the same principle editors have relied on since the earliest non-linear editing systems — cut on structure, not on brute force.

Fitting into a pipeline

Trimming rarely happens alone. A recording pipeline might trim dead air off a webinar capture, hand the result to a thumbnail step, then to a watermark step, each one an independent async task chained by webhook. Because pricing is a flat per-request fee plus a small per-minute rate, trimming a two-hour recording down to an eight-minute highlight costs based on what you send in, not what you keep, so it's worth trimming early in any chain rather than late. Treat it as the first gate the raw file passes through, and every step after it inherits a shorter, cheaper, faster job to run.

Webinar countdown removal

A webinar platform trims the pre-show countdown and post-show silence off every recording before archiving it for on-demand viewing.

Highlight extraction from long recordings

A sports content team cuts a single scoring play out of a full match recording to publish as a standalone social clip.

Call recording redaction window

A support platform trims a customer call down to just the relevant segment before attaching it to a ticket, leaving out hold music and small talk.

Chained pre-processing step

A content pipeline trims raw footage first, then passes the shorter clip on to resize and watermark tasks, cutting total processing time across the chain.

How do I trim a video with the API?

POST the source video and the start and end timestamps to /video/trim, keep the returned task_id, and retrieve the trimmed clip by webhook or a signed link valid for 24 hours.

Is the video trim API free?

No, there is no free tier or trial; it costs $0.077 per request plus $0.0045 per minute of video, and a failed trim is never charged.

Does trimming re-encode the whole video?

The cut is made against the video's existing structure whenever possible, avoiding a full re-encode and keeping the process fast and close to lossless.

Can I trim multiple segments from the same file?

Each request cuts one continuous range, so multiple segments from the same source are submitted as separate async tasks.

How precise are the start and end points?

You specify the timestamps you want kept, and the endpoint cuts to that range as closely as the underlying video structure allows.

Is this endpoint live yet?

It's in deployment now, so check the endpoint status before sending production traffic since it isn't accepting jobs at this moment.

Does video length affect the price?

Yes, price is a flat per-request fee plus a per-minute rate based on the source video's duration.

Is my video stored after the trim finishes?

No, source and trimmed files are deleted after the retention window and are never used for training.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/video/trim

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/video/trim \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"audio":"https://ejemplo.com/audio.mp3"}'
{
  "audio": "https://ejemplo.com/audio.mp3"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "video.trim",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.077
Per minute$0.0045

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb500
max_minutes60
max_megapixels3.9
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →