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.

4 min readSume
All posts

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.

Timeline slot fields from the Sume docs, read 2026-09-30
FieldEffect
video[].source_urlSume-hosted clip or still
video[].startOn-spine start; first must be 0
video[].durationOn-screen length, at least 0.2 s
video[].source_inIn-point into the file
audio.duration_secondsOutput 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

All Use cases posts

Written by Sume