ForHosting KIT · Audio & Voice

Concatenate audio clips

Planning an audio concatenation is easier when every boundary is known before rendering begins.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

This calculator takes clip durations in their intended order, adds them together, and reports the timestamp at which each clip starts in the merged timeline. The first clip always begins at zero, and every later offset is the sum of all earlier durations. Use the result to prepare chapters, captions, edit decisions, cue sheets, playback controls, or validation checks without uploading or processing the audio itself.

Enter durations in playback order

Provide one duration in seconds for every audio clip, arranged in exactly the order in which the clips will appear. Decimal values are supported, so a clip measured as 12.375 seconds can be represented without rounding it to a whole second. Zero is also accepted for placeholders or intentionally silent entries that occupy no time. Every value must be a finite, non-negative number, and a request may contain no more than 10,000 clips. The list cannot be empty because an empty sequence has no meaningful set of clip boundaries to report. This capability works from durations only: it does not inspect files, decode media, change sample rates, insert fades, or modify audio. That makes it useful early in a workflow, when metadata is available but source files may still be remote, large, or awaiting approval. Keep all values in seconds and use a consistent source of duration metadata so the computed timeline matches the media tool that will eventually perform the actual concatenation.

Read the merged timeline

The response contains two fields. total_duration is the sum of every supplied duration and represents the length, in seconds, of a gapless concatenation. clip_starts is an array aligned by index with the input list. Its first value is zero because the first clip starts at the beginning. Each following value is the accumulated duration of all clips before it. For example, if the first two clips last 12.5 and 8.25 seconds, the third clip starts at 20.75 seconds. The output retains numeric seconds rather than formatting timestamps as clock text, which makes it straightforward to feed into code, subtitle tools, media manifests, or editing systems with their own display conventions. Cumulative values are normalized to twelve decimal places to suppress familiar binary floating-point artifacts such as 0.1 plus 0.2 appearing with a long tail, while preserving substantially more precision than typical audio metadata provides.

Use offsets without assuming a rendered join

Treat the calculated offsets as a deterministic plan for a gapless sequence, not as measurements from an encoded output file. A real media pipeline can alter timing when it trims samples, adds crossfades, inserts silence, resamples sources, applies codec padding, or rounds boundaries to frames. If any of those operations are part of your merge, adjust the input durations to represent the effective contribution of each clip or validate the finished file afterward. For plain end-to-end concatenation, the returned values can drive chapter markers, transcript shifts, waveform labels, progress navigation, and quality-control assertions. They also provide a convenient way to compare a proposed playlist with a maximum runtime before committing compute resources to rendering. Because the calculation is pure and uses no network, the same input always produces the same result in the browser and through the API. Automated requests cost $0.002, while the page can run the calculation locally for quick interactive planning.

Build chapter markers

Convert ordered clip lengths into exact chapter start positions for a podcast, lecture, or audiobook timeline.

Shift transcript cues

Add each clip start offset to its local transcript timestamps before combining transcripts into one sequence.

Check a playlist runtime

Calculate the complete running time and every transition boundary before sending media to a rendering pipeline.

What does the API request cost?

Each API request costs $0.002. The calculation can also run locally in your browser.

What unit should I use?

Supply every duration in seconds. Decimal seconds are supported and all returned durations and offsets are also in seconds.

Does this capability merge audio files?

No. It calculates the timeline for an ordered list of durations; it does not upload, decode, encode, or concatenate media files.

Can the duration list be empty?

No. At least one clip duration is required, and an empty list returns an invalid input error.

Are gaps or crossfades included?

Only if you account for them in the supplied durations. The calculation assumes each listed contribution follows the previous one with no automatic gap or overlap.

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/merge-clips

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, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/audio/merge-clips \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"durations":[12.5,8.25,3]}'
{
  "durations": [
    12.5,
    8.25,
    3
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "audio.merge_clips",
  "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.002

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 →