Grok Imagine Video 1.5 API in Python: animate a still on Sume
Animate one image with Grok Imagine Video 1.5 on Sume: Python, a first frame, 720p, 4 to 15 seconds, $0.15 for 12 seconds. Text-only calls fail.

To animate a still with Grok Imagine Video 1.5 on Sume, POST model: "grok-imagine-video-1.5" to /v1/videos with the image as a first_frame in frame_images. A 12-second 720p clip costs $0.15.
This row is image-to-video only: a text-only request is rejected, and so is any input_references, end frame, aspect_ratio or generate_audio.
The script
Needs pip install requests and SUME_API_KEY.
import os, time, requests
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
BASE = "https://api.sume.com/v1/videos"
body = {
"model": "grok-imagine-video-1.5",
"prompt": "Soft wind moves the curtains, the cat blinks slowly",
"duration": 12,
"resolution": "720p",
"frame_images": [{
"type": "image_url",
"image_url": {"url": "https://example.com/cat-window.jpg"},
"frame_type": "first_frame",
}],
}
r = requests.post(BASE, headers=H, json=body, timeout=60)
print(r.status_code, r.text)
job = r.json()
while r.status_code == 202:
s = requests.get(job["polling_url"], headers=H, timeout=60).json()
if s["status"] in ("completed", "failed", "cancelled"):
print(s["status"], s.get("unsigned_urls"), s.get("usage"))
break
time.sleep(10)The limits
The numbers below come from the Grok row in the Video Router catalog and the provider pricing table.
| Field | Value |
|---|---|
| Modes | Image-to-video only; image_url or first frame required |
| Duration | 4 to 15 seconds |
| Resolutions | 480p, 720p |
| Price | $0.0125 per second (provider list $0.01 times 1.25) |
| Not accepted | End frame, references, audio, aspect_ratio, bitrate_mode, seed |
When it fits
Grok is the lowest-priced row in the catalog, so use it for loops, product tiles and previews where silence is fine. Twelve seconds costs $0.15, and the 15-second maximum costs $0.19.
If you need sound, a text-only prompt or a last frame, pick another row: Gemini Omni Flash 1.1 for sound at 3 to 10 seconds, Wan 3.0 for a 2 to 30 second range, Kling 3 for a first and last frame. The GET /v1/videos/models endpoint lists which each row supports.
- Poll
polling_url; download fromunsigned_urls[0]. - Send an
Idempotency-Keyon retried submits. - Source images must be publicly reachable HTTPS URLs.
Sources
Related posts
More in Developers
- Handle every Sume API error with one switch on next_action
Sume errors share one envelope. Branch on next_action, retryable and retry_after_seconds, and your client handles new codes without a code change. JS sample.
- HappyHorse 1.1's five aspect ratios vs the Sume video catalog
HappyHorse 1.1 on Cloudflare takes 16:9, 9:16, 1:1, 4:3 and 3:4. Which Sume video models cover all five, and which do not.
- HappyHorse 1.1 takes a seed on Cloudflare; Sume video models do not
Cloudflare's HappyHorse 1.1 accepts a seed up to 2,147,483,647 and an optional watermark. No Sume v1 video model accepts a seed; here is the workaround.
- Hindi speech to text API: Sume STT with language_code hi
Transcribe Hindi audio with Sume STT: send language_code hi, check the reported language, and review code-mixed speech. $0.01 per audio minute.
Written by Sume