audio-trim
Cuts the given range out of an uploaded audio file and returns the result as a downloadable file. Stage the input with POST /v1/uploads first. ASYNCHRONOUS: the call returns 202 with a run id — poll GET /v1/runs/{id}, or register a webhook and be told.
v2 beta server · 5 tokens
Call it
POST https://timbrica.com/v1/tools/audio-trim/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json
Input
| Field | Type | Required | Notes |
|---|---|---|---|
audio | object | yes | Staged input file. Upload it with POST /v1/uploads (multipart `file`, or JSON {"url":"…"}). |
trim_start | number | no |
Start of the kept range, in seconds.
default: 0 |
trim_end | number | no | End of the kept range, in seconds. Omit to keep to the end. |
format | string | no |
Output format. Defaults to the input format.
one of: mp3, wav, ogg, flac, m4a, aac, opus, wma, aiff, webm |
bitrate | integer | no | Output bitrate in kbps, for lossy formats. |
fade_in | number | no | Fade-in length, seconds. |
fade_out | number | no | Fade-out length, seconds. |
Errors it can return
validation_failed
input_too_large
insufficient_tokens
internal_error
History
- v2 — 2026-08-03 — Now asynchronous: returns 202 + run id instead of blocking. Media work no longer occupies a web worker shared with live visitors. Poll GET /v1/runs/{id} or use a webhook.
- v1 — 2026-07-30 — Initial release (server lane, staged file input).
This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.