xAI shipped Python SDK v1.20.0 on 2026-09-24 (PyPI xai-sdk). For grok-imagine-video-1.5 it adds last_frame_url/last_frame_file_id to pin the exact closing frame (optionally interpolating from a pinned first frame) and a keyframes list to pin up to four in-clip reference images at second timestamps strictly inside the duration. Docs list video at about $0.08/sec with 480p/720p/1080p. Aimed at Imagine pipelines that need controllable start/end framing or storyboard alignment.

Key Takeaways

  • ✓Shipped: v1.20.0 — pip install -U xai-sdk
  • ✓last_frame_url/file_id pins the exact end frame; combine with image_* to interpolate first→last on grok-imagine-video-1.5
  • ✓keyframes: up to 4 {image_url|image_file_id, timestamp} entries with in-clip second timestamps
  • ✓Docs list ~$0.08/sec video with 480p/720p/1080p
  • ✓See CHANGELOG and docs.x.ai Imagine / video guides
🔬

In-Depth Technical Analysis

Core Background & Industry Pain Points Storyboard and brand pipelines need locked first/last frames and mid-clip reference poses; text prompts alone are unstable. SDK-level last-frame and keyframe controls are required for grok-imagine-video-1.5 (up to 1080p). ### Architecture Highlights & Internals v1.20.0 adds last_frame_url/last_frame_file_id on video.generate/start/prepare, optional first-frame pinning via image_*, and up to four keyframes with in-clip second timestamps. Supported on grok-imagine-video-1.5 per the CHANGELOG. ### Authoritative Benchmarks & Measured Scores No separate public quality/latency leaderboard for keyframe mode. Docs list ~$0.08/sec and 480p/720p/1080p on the Imagine overview. Validate end-frame alignment and timestamp hits on short canaries. ### Developer Hands-on Guide pip install -U xai-sdk==1.20.0, set XAI_API_KEY, and pass image_*, last_frame_*, and keyframes through generate/prepare. File IDs work alongside URLs. See docs.x.ai video guides and the REST reference.