grok-imagine-video-1.5-preview 可将单张静态图像转化为流畅的电影级视频。给它一个起始帧和一段描述运动的提示词,它就能让场景动起来,包括镜头运动、氛围和物理效果,同时忠实于你的源图像。你可以生成最高 720p 的片段。
用自然语言提示词来执导镜头。描述镜头运动、节奏和声音设计,然后设置分辨率和片段长度。模型会保留输入帧中的细节和光照,因此结果是原图像的延续,而非对其的重新诠释。
该模型同样适用于序列创作。逐帧布置、逐帧动画,再将镜头串联成更长的场景,从而在整个项目中保持一致的观感。
用几行代码让图像动起来。
import os
import xai_sdk
client = xai_sdk.Client(api_key=os.getenv("XAI_API_KEY"))
response = client.video.generate(
prompt="Slow cinematic push-in as embers drift across the battlefield and the helmet's crest stirs in the wind",
model="grok-imagine-video-1.5-preview",
image_url="https://your-host.com/helmet.jpg",
duration=10,
resolution="720p",
)
print(response.url)
grok-imagine-video-1.5-preview turns a single still image into fluid, cinematic video. Give it a starting frame and a prompt describing the motion, and it animates the scene, including camera moves, atmosphere, and physics, while staying faithful to your source image. You can generate clips at up to 720p.
Direct the shot with natural-language prompts. Describe the camera move, the pacing, and the sound design, then set your resolution and clip length. The model holds detail and lighting from the input frame, so the result continues the original image rather than reinterpreting it.
The model also works well for sequences. Stage each frame, animate it, and chain the shots together into longer scenes that keep a consistent look across an entire project.
Animate an image in a few lines of code.
import os
import xai_sdk
client = xai_sdk.Client(api_key=os.getenv("XAI_API_KEY"))
response = client.video.generate(
prompt="Slow cinematic push-in as embers drift across the battlefield and the helmet's crest stirs in the wind",
model="grok-imagine-video-1.5-preview",
image_url="https://your-host.com/helmet.jpg",
duration=10,
resolution="720p",
)
print(response.url)