Timeline audio segments: re-base video start times after concat
After a concat, use segments[] (index, start, duration_seconds) as the on-spine start of each video slot in Timeline 1.0. Declared starts are authoritative.

A timeline audio concat returns segments[] with index, start and duration_seconds; the docs call these the offsets to re-base Timeline 1.0 video[].start against. When each video slot covers one part, use that segment's start as the slot's start, and the joined audio_url as audio.url.
What does the mapping look like?
Example values, not a real job. Two lines were concatenated; slot 1 must start at 0.
| Segment | `start` | `duration_seconds` | Video slot |
|---|---|---|---|
| 0 | 0 | 1.9 | video[0], start: 0 |
| 1 | 1.9 | 1.7 | video[1], start: 1.9 |
Which timeline rules still apply?
video[0].start must be 0 and later starts must increase, or the render fails with timeline_must_start_at_zero or invalid_segment_timing. Declared starts are authoritative; the compiler compensates for transitions and never pre-shifts them. Coverage may trail the spine by at most 0.5 s. See the Timeline docs.
How do I check before paying?
Call POST /v1/timeline-1.0/plan. It is unbilled, needs no Idempotency-Key, and returns duration_seconds, segment_count, billable_minutes and estimated_cost_usd_micros. It cannot predict short-source pad or loop warnings.
curl -X POST https://api.sume.com/v1/timeline-1.0/plan \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"audio": {
"url": "https://media.sume.com/artifacts/artf_demo/joined.wav",
"duration_seconds": 3.6
},
"video": [
{ "source_url": "https://media.sume.com/artifacts/artf_demo/a.mp4", "start": 0, "duration": 1.9 },
{ "source_url": "https://media.sume.com/artifacts/artf_demo/b.mp4", "start": 1.9, "duration": 1.7 }
]
}'How does the job run?
Timeline jobs default to mode: "async". Pass mode: "sync" to wait up to 30 seconds for a 200 finished job, or you get 202 and poll GET /v1/jobs/:id/status and GET /v1/jobs/:id/result; there is no separate GET for the audio or render job. Idempotency-Key is required on the render and audio jobs, and every URL must already be this workspace's media.sume.com audio or video. Plan first with the unbilled endpoint.
Hosted MCP has timeline_audio and timeline_create; the flow is the tool, then jobs_wait, then the result tool. Details are in the Timeline audio docs and Timeline 1.0 docs.
Sources
Related posts
More in Media tools
- How to burn captions onto a video with the Sume API
Send a public HTTPS video URL to POST /v1/video-captions and get a job-backed captioned video, timed by speech-to-text or by text you supply.
- How to extract frames from a video with the Sume API
POST /v1/video-frames returns stills at the times you name from one Sume-hosted clip, as durable images at source size. The call is unbilled.
- How to use Sume's Timeline compose and Timeline audio APIs
Timeline compose puts one still and one video in the same frame as a new MP4. Timeline audio joins or splits Sume-hosted audio into reusable files.
- Trim, filter, or detach audio from a video with the Sume API
Video trim cuts a range into a new MP4, video filter dims or crops into a new MP4, and audio detach extracts a wav or mp3. Each takes one Sume-hosted clip.
Written by Sume