ForHosting KIT · Audio & Voice

Trim audio

The good part of a recording is usually thirty seconds buried inside forty minutes, and dragging a waveform in an editor to find it is the slow way to get there. This endpoint cuts the exact window you specify and leaves the rest behind.

● 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 forty minutes nobody needed

A full board meeting recording contains one decision worth quoting, a two-hour podcast contains one clip worth sharing on social, a customer call contains one moment of feedback worth pulling for a highlight reel. Shipping the entire file every time forces whoever receives it to do the searching you already did. audio.trim exists so that the clip, not the container, is what travels.

How the cut is made

POST /audio/trim with the source file and a start and end point, and the task runs asynchronously, returning a task_id right away. Once the trim completes, you get the resulting clip through a signed webhook call or a signed link that stays valid for 24 hours — plenty of time for a job queue or a person to come collect it.

Precision without re-encoding artifacts

Trimming sounds simple, and conceptually it is: pick a start, pick an end, keep what's between them. But naive cutting at arbitrary points in a compressed audio stream can introduce clicks or misaligned frames if it isn't done carefully, which is a lesson every audio engineer learns the first time a hard cut pops instead of ending clean. The endpoint handles the cut properly so the output starts and stops where you asked, without the artifacts that come from cutting blind.

Fitting into a larger editing pipeline

Trim rarely runs alone — it's usually the first step before a clip gets normalized, denoised or converted to a delivery format, and running it as its own async task means each step in that chain can be triggered independently as soon as the previous one's webhook fires. Because pricing is per request plus per minute of the source file, extracting a ten-second highlight from a ninety-minute recording costs close to nothing beyond the base request fee, which makes clipping at scale genuinely practical rather than a manual chore reserved for the highlights someone remembers to make. A media team that used to assign an intern to scrub through recordings looking for quotable moments can instead script the search and let this endpoint handle the actual cutting, keeping a human in charge of judgment and out of the business of dragging playheads.

Highlight clip from a podcast episode

A show extracts the most quotable thirty seconds from a full episode to post as a teaser on social media.

Evidence excerpt from a call recording

A support team pulls the exact segment of a customer call where a commitment was made, without sharing the entire conversation.

Ringtone or notification sound

A mobile app trims a short signature sound out of a longer musical track to use as a custom notification tone.

Removing a long intro before further processing

A transcription pipeline trims off a lengthy musical intro before sending the spoken portion of a file downstream.

How do I trim audio with the API?

POST the file and the start and end times to /audio/trim, keep the returned task_id, and get the clip by webhook or a signed link valid for 24 hours.

Is the audio trimmer API free?

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

What audio formats can I trim?

The common ones — MP3, WAV, OGG, M4A and FLAC — check the endpoint reference for the current full list.

Can I extract more than one clip from the same file?

Yes, submit a separate trim task for each segment you want, and each one returns its own task_id and result independently.

Does trimming lose audio quality?

The cut points are handled cleanly so the resulting clip doesn't introduce clicks or artifacts beyond whatever compression the source format already applied.

Is this endpoint live yet?

It's in deployment now and not yet accepting jobs; check the endpoint status page before pointing production traffic at it.

How precise can the start and end points be?

Precise enough for clip editing and highlight extraction; consult the endpoint reference for the exact time resolution it accepts.

Is my audio kept after trimming?

No, source files and results 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/audio/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/audio/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": "audio.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_mb200
max_minutes180
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 →