YouTube A/B testing video cuts: build hook variants by API
Build three hook variants of one video as separate files: trim for the hook, Timeline to join hook and body, and a fresh Idempotency-Key per request.

YouTube says it will let creators test up to three video cuts to see which hook performs best, listed as coming soon. To prepare, make each variant its own file: trim a hook range from the source, then join each hook to the shared body with Timeline 1.0. Each request needs its own Idempotency-Key. Video trim is a flat $0.02 per job; Timeline takes one audio spine and ordered video[] slots.
Read 2026-09-30. YouTube's post gives no rules for the cut test, so none are assumed. For the simpler approach of three trims from one take, see YouTube video A/B test: three hook cuts.
When do I need Timeline instead of three trims?
When the hooks are not ranges of the same take. If variant B opens with a separately shot or generated clip, you need to put that clip in front of the body. Timeline's video[] slots do that: video[0].start must be 0, later starts must increase, and source_in sets the in-point into each file.
| Field | Effect |
|---|---|
video[].source_url | Sume-hosted clip or still |
video[].start | On-spine start; first must be 0 |
video[].duration | On-screen length, at least 0.2 s |
video[].source_in | In-point into the file |
audio.duration_seconds | Output length, required, 1 to 1800 s |
How do I keep the three renders separate?
Use one request per variant and mint a distinct Idempotency-Key for each (for example hook-a, hook-b, hook-c). Reusing a key for a different payload is the mistake to avoid; reuse one only to retry the same request after a client timeout. Poll each job's status and fetch each result, which is a new MP4.
const hooks = ["hook-a", "hook-b", "hook-c"];
async function main() {
const trims = await Promise.all(
hooks.map((key, i) =>
fetch("https://api.sume.com/v1/video-trim", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.SUME_API_KEY,
"Content-Type": "application/json",
"Idempotency-Key": key,
},
body: JSON.stringify({
video_url: "https://media.sume.com/artifacts/artf_demo/take.mp4",
start: i * 5,
duration: 4,
}),
}).then((r) => r.json()),
),
);
console.log(trims.map((t) => t.request_id));
}
main();Can I queue many variants at once?
If your variants come from a Format, bulk runs accept an items array of 1 to 100 entries in order, with concurrency of 1 to 16. Mint a fresh Idempotency-Key per batch: replaying a spent key returns the old queue. Video trim and Timeline themselves are single requests, as above.
What does Sume not do here?
Sume produces the files. It does not upload to YouTube, run the test, or read the results. Keep length, ending and captions identical across the three so the hook is the only difference.
Sources
Related posts
More in Use cases
- YouTube thumbnail sizes fhd, qhd and uhd: frames from a clip
YouTube's Data API added fhd (1080p), qhd (1440p) and uhd (4K) thumbnail sizes on 2026-09-11. Here is how Sume's video-frames max_edge lines up.
- YouTube thumbnails.set now allows 50MB: what to upload from Sume
YouTube's API history says thumbnails.set went from 2MB to 50MB on 2026-09-14. A video-frames still at source size (jpeg or png) fits the listed types.
- Firefly Generate Music for a video vs Sume music with inspect
Adobe Firefly can score an uploaded video. Sume music takes text and an optional image, so inspect the clip first, then write the brief and pass a still.
- AI game trailer generator: 4-30 s shots joined in Timeline
Build a game trailer from separate seedance-2.5 shots of 4 to 30 seconds, then join them in Timeline 1.0 with fade or wipe transitions between slots.
Written by Sume