apyhub
Back

Trim Audio by Start and End Time API

What it does

Audio Trimmer cuts an audio file to the segment you specify. Send a binary audio file plus startSeconds and endSeconds, and you get back a trimmed audio file as binary output.

Use it when you need to clip interviews, podcasts, voice notes, or call recordings to a precise time range before storing, sharing, or processing them further. The endpoint accepts audio files up to 30 MB, making it suitable for common upload flows and batch preprocessing jobs.

Because the response is just the trimmed audio file, it fits cleanly into pipelines that hand the result to transcription, review, or media-export steps. If your product needs to isolate a quote, or extract a segment for downstream analysis, this endpoint keeps the interaction simple: file in, clipped file out.

POST
Trim audio
https://api.eu.apyhub.com/freedailypro/trim-audio-by-start-and-end-time-api/audio-trim

QUICKSTART

GUIDE

Quickstart

Trim an audio file by sending the file plus the start and end times in seconds.

curl -X POST "https://api.eu.apyhub.com/freedailypro/trim-audio-by-start-and-end-time-api/audio-trim" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/audio.mp3" \
  -F "startSeconds=10" \
  -F "endSeconds=30"

What you'll get back

Returns a binary file response containing the trimmed audio.

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 audio file. Up to 30 MB.
End time in seconds
Start time in seconds

About this endpoint

What it does

Trims an uploaded audio file between the specified start and end times, and returns the trimmed audio as binary content.

Request Body

ParameterTypeMandatoryDescription
fileFileYesThe audio file. Binary upload. Up to 30 MB.
startSecondsNumberYesStart time in seconds.
endSecondsNumberYesEnd time in seconds.

Response

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

ParameterTypeDescription
binaryStringThe response body is binary data containing the trimmed audio.

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.