Timeline audio 400: concat takes no url, split takes no parts
Sume's timeline audio endpoint rejects concat with a top-level url and split with parts. Stable error codes and the right shape for each operation.

If POST /v1/timeline-1.0/audio returns audio_concat_takes_no_url or audio_split_takes_no_parts, you sent fields from the wrong operation. Concat takes only parts[]. Split takes only a top-level url plus ranges[]. Remove the fields that belong to the other operation and resend; the refusal happens at admission, so nothing was generated.
The endpoint either joins Sume-hosted audio into one gapless file or slices one file into ranges. Because both operations share one URL, the operation field decides which other fields are legal.
What does each operation accept?
Concat needs operation: "concat" and parts[], one to 20 ordered items, each { url, source_in?, duration? }. Split needs operation: "split", a top-level url, and ranges[] of one to 20 items, each { start, end? }. Ranges may overlap, and an omitted end runs to the end of the file.
An Idempotency-Key header is required on both. The default mode is async; pass mode: "sync" to wait up to 30 seconds for a 200, otherwise you get a 202 and poll the job.
# Split: top-level url + ranges, no parts
curl -X POST https://api.sume.com/v1/timeline-1.0/audio \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: timeline-audio-split-001" \
-d '{
"operation": "split",
"url": "https://media.sume.com/artifacts/artf_demo/spine.wav",
"ranges": [{ "start": 0, "end": 12.4 }, { "start": 12.4 }]
}'Which error code means which mistake?
The codes are stable, so you can branch on them in client code instead of matching message text.
| Code | Cause | Fix |
|---|---|---|
audio_concat_requires_parts | Concat sent without parts | Add parts[] |
audio_concat_takes_no_url | Concat sent with a top-level url | Move the file into parts[0].url |
audio_concat_takes_no_ranges | Concat sent with ranges | Drop ranges; trim with source_in and duration |
audio_split_requires_url | Split sent without url | Add the source file URL |
audio_split_requires_ranges | Split sent without ranges | Add ranges[] |
audio_split_takes_no_parts | Split sent with parts | Drop parts |
audio_range_end_before_start | A range end is at or before start | Fix the range |
unsupported_media_source | URL is not Sume-hosted | Import the file first |
Why is my URL refused even with the right shape?
All URLs must already be this workspace's media.sume.com audio. An outside URL such as https://example.com/take.wav is rejected at admission with unsupported_media_source; a dead or other-workspace URL returns source_not_found. Import the file with POST /v1/media-imports first.
If your source is a video, extract its track once with audio detach, then split the detached file, instead of detaching again for every range.
What comes back and what does it cost?
Concat returns kind: timeline_audio with one audio_url, a duration_seconds, and segments[] giving each part's start offset. Split returns segments[], each with its own audio_url. There is no GET route for this resource, so poll GET /v1/jobs/{id}/status and read /result.
The default output is wav, which is sample-exact; mp3 is smaller but adds priming padding at every edge, so keep wav if you will join again. Sume's docs list the public rate as $0.01 flat per job, with the live rate in GET /v1/catalog. Concat parts must also share a channel layout, or the worker returns audio_parts_channel_mismatch.
Sources
Related posts
More in Developers
- Validate an image request against supported_parameters first
Sume rejects a parameter a model does not list with 400 unsupported_parameter. Read the catalog descriptors and check a request body before you POST /v1/images.
- Which MCP server lets Claude Code or Cursor generate video and images?
MCP servers that let Claude Code and Cursor make video and images: Sume, fal, Replicate, Runway, Higgsfield. Endpoints, sign-in, billing, setup.
- Idempotency keys for AI video APIs: retry without paying twice
An idempotency key makes a retried create return the original run or job instead of a second paid one. How Sume's Idempotency-Key works on each API.
- Signed webhooks for Sume video runs: events, retries, verification
Sume sends one HMAC-SHA256 signed POST when a Format, Action, or Agent Completion run completes or fails. Verify the raw body and dedupe on request_id.
Written by Sume