Draft on Grok Imagine, finish on Seedance 2.5: two calls, one prompt
A Python flow that renders a prompt on grok-imagine-video-1.5 for $0.125, then re-sends the approved text to seedance-2.5 at 1080p for $14.22.

Send the idea to grok-imagine-video-1.5 first: a 10-second draft is $0.125. When the draft shows the right motion and framing, send the same prompt to seedance-2.5 at 1080p for $14.22. The two are separate jobs on the same /v1/videos endpoint; only model and resolution change.
The script
It submits the draft, waits, and only sends the expensive call if you answer yes. Poll polling_url; the draft is done when status is completed.
import os, time, requests
H = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"], "Content-Type": "application/json"}
U = "https://api.sume.com/v1/videos"
PROMPT = "A chef flips a pancake in slow motion, steam rising"
def run(model, **kw):
r = requests.post(U, headers=H, json={"model": model, "prompt": PROMPT, "duration": 10, **kw})
r.raise_for_status()
url = r.json()["polling_url"]
while True:
j = requests.get(url, headers=H).json()
if j["status"] in ("completed", "failed", "cancelled"):
return j
time.sleep(30)
draft = run("grok-imagine-video-1.5")
print(draft["status"], draft.get("unsigned_urls"))
if draft["status"] == "completed" and input("Finish? [y/N] ") == "y":
final = run("seedance-2.5", resolution="1080p")
print(final["status"], final.get("usage"))What it costs
The draft is a rounding error next to the final.
| Step | Model | Setting | Price |
|---|---|---|---|
| Draft | grok-imagine-video-1.5 | 10 s | $0.125 |
| Final | seedance-2.5 | 10 s, 1080p | $14.22 |
| Eight drafts, one final | - | - | $15.22 |
Things to know
- Sume reserves the full price at submit; a balance shortfall returns
402 insufficient_credits. - Do not reuse the same
Idempotency-Keyfor draft and final: a replay returns the first job. - Different models read prompts differently, so treat the draft as a check of the idea, not a preview of the final.
Extending the script
Once the single-pair flow works, read prompts from a file and store each draft's job id. A reviewer then picks which ids get a final, and only those prompts go to the second call. The second call can also use a webhook: add an HTTPS callback_url to the body and Sume POSTs a signed envelope when the job reaches a terminal state, so you stop polling.
Sume reserves the full price at submit, so the number in the table is also the amount that must be free in the balance when you send the request. If it is not, the call fails with 402 insufficient_credits before any provider work starts.
Sources
Related posts
More in Developers
- Elixir Req: submit and poll a Sume video job after Sora
An Elixir script using Req: POST /v1/videos with an Idempotency-Key, poll every 30 seconds, stop on completed, failed or cancelled. Req never retries the POST.
- Env and secrets diff for removing Sora: SUME_API_KEY, one auth header
Which environment variables to delete, add and rotate when a service leaves the OpenAI Videos API for Sume, plus a startup check that fails on a missing secret.
- Extract 16 kHz mono audio from a video for transcription
A Python script that detaches speech-ready 16 kHz mono wav from a Sume-hosted video, then polls the job. Costs $0.01 per detach before the STT minute.
- Face swap request in Python: validate the video URL before you send
A Python snippet that rejects non-HTTPS, localhost and private-IP video URLs locally, then submits a Sume face-swap beta run with a quality and idempotency key.
Written by Sume