Conversational video edits on Omni: a three-turn chain on Sume

Edit a clip in turns on Sume: each Omni video_to_video call takes the last result as video_url. Three turns on a 10 s clip cost $3.75 at 720p. curl chain.

5 min readSume
All posts

To edit a video conversationally on Sume, send each turn as a separate Video Router call to gemini-omni-flash-1.1 with the previous result as video_url and one instruction in the prompt. Three turns on a 10-second clip at 720p cost $3.75, because each turn bills the output seconds at $0.125 a second, rounded up to the cent.

There is no hidden conversation state. The Video Router page states that the API does not expose previous_interaction_id or extend, so the chat is yours: a list of prompts, a list of job ids, and the clip URL that flows from one turn to the next.

What one turn is

The Omni edit mode is triggered by one field. Send video_url and a prompt that gives the instructions, for example "Replace the bottle with an apple. Keep everything else the same." The resolution is optional and defaults to 720p. Do not send aspect_ratio (the API answers 400) and do not send duration: the source clip sets the output. If you do send duration with video_url, it is used only as a hint for the balance reserve, with a default of 8 seconds.

The video is the edit source, not a reference. You cannot combine video_url with image_url, end_image_url or reference_*_urls. If you want an image or clip to steer a new generation instead, that is the reference path, covered on the Video Router page.

The chain

Turn 1 swaps the product. Turn 2 changes the lighting. Turn 3 changes the background. Each call returns an async job; when it completes, read its result with GET /v1/jobs/{id}/result and pass the clip URL into the next call. Use a different Idempotency-Key per turn so a retry of turn 2 can never be mistaken for turn 3.

# turn N: PREV_URL is the clip from turn N-1, PROMPT is this turn's one change
curl -s -X POST https://api.sume.com/v1/video-router/generate \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: edit-chain-017-turn-$N" \
  -d '{
    "model": "gemini-omni-flash-1.1",
    "prompt": "Swap the sneaker for a boot. Keep everything else the same.",
    "video_url": "https://example.com/previous-turn.mp4",
    "resolution": "720p",
    "mode": "async"
  }'
# then: curl https://api.sume.com/v1/jobs/$JOB_ID/result  (read the clip URL, use it as video_url in turn N+1)

What each turn costs

Each turn is billed on the output, which follows the source length. Because every turn uses the previous result, the length stays constant unless an edit changes it.

Cost of an edit chain by clip length and resolution on Sume (computed from Sume rates, read 2026-10-05)
ClipResolutionOne turnThree turns
8 s720p$1.00$3.00
8 s1080p$1.50$4.50
10 s720p$1.25$3.75
10 s1080p$1.88$5.64

Habits that keep a chain clean

  • One instruction per turn, plus a "keep everything else the same" clause. That keeps the diff small and tells you which prompt broke a clip.
  • Save every job id and prompt. If turn 3 goes wrong, restart from the turn 2 URL rather than from scratch.
  • Edit at 720p while you iterate and decide the final resolution on the last turn only, since resolution is a per-call choice.
  • Native audio is always on for this model. Expect sound in each turn's output and check it as you check the picture.

Why chain at all

A chain gives you an approval point after every change. If the product swap looks right but the lighting change spoils the skin tones, you throw away turn 2 only and keep turn 1. A single prompt that asks for everything gives you one pass or one fail. In exchange, a chain costs one call per change and every call re-renders the whole clip, so you pay for the full output length each time.

The practical limit is your patience and your budget rather than a documented turn cap. The Video Router page documents no limit on chain depth, and it also documents no memory between calls, so treat each call as a fresh edit of a finished clip.

Sound and length across turns

Native audio is always on for this model. Each turn returns a clip with its own sound, so a chain does not accumulate separate audio files for you to manage: the last clip is the one to keep. Because the source sets the output, the length you start with is the length you finish with. Trim to the range you want before turn 1 using the Video Trim API; every later turn is then billed on that shorter length.

Failure handling

If a turn fails, the job reports a message about what went wrong, such as an input URL that could not be fetched. Fix the cause and re-submit with a new idempotency key, since a repeated key with a different body returns a conflict. A repeated key with the same body is the safe retry for a network error: it returns the original job instead of billing twice.

Budget the reserve

Edit has no duration input, so the balance reserve is an estimate: 8 seconds unless you pass a hint. An 8-second reserve at 720p is $1.00. The final charge follows the actual output, so a balance that covers the hint is enough to submit.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume