grok-imagine-video (Official)
通过官方渠道设置提示词、宽高比、时长和分辨率,生成后可查询结果或续写 Grok 视频。
更新于:从提示词到成片
The wave crests fully and pitches forward, the translucent green crest folding and crashing down onto the dark rocks with tremendous force. White foam explodes upward and outward. Sound: the deep boom of a heavy swell hitting rock, the hiss and rush of water pulling back across stone, low wind across an open coastline, and sea spray on a microphone.
The camera tracks alongside runners in Bangkok as all four sprint in perfect lockstep, breath visible in the cool morning air. Shopfront shutters, parked motorbikes, and pedestrians streak past in heavy horizontal motion blur. Sound: running shoes on pavement, synchronized breathing, a distant scooter, and an early street-market ambience.
The figure slowly lowers the phone from their ear, exhales, and turns almost imperceptibly toward the room. Dust motes drift through golden light while a cat lifts its head and curtains move in a slow breeze. Sound: distant city traffic, a kitchen tap dripping, the soft hum of an old TV, and a creaking wood floor.
grok-imagine-video (Official) 能做什么
根据提示词生成
提交简洁提示词,通过一个 TTAPI 任务获取视频结果。
常用参数
设置提示词、模型、输出参数和回调即可接入。
异步查询
通过轮询或 Webhook 接收结果,避免耗时生成阻塞界面。
接入产品
官方 grok-imagine-video 的输出可以展示、保存或交给后续流程处理。
按操作计费,单位为 quota
按模型、操作和输出设置扣除 quota。
grok-imagine-video (Official) 操作和请求字段
使用 TTAPI 密钥,按下方字段向接口发送请求。
/grok/v1/videos/generations使用 duration、image、reference_images 和 resolution 提交官方渠道 Grok 任务。
查看接口文档/grok/v1/videos/{request_id}通过 request_id 查询官方 Grok 视频结果。
查看接口文档/grok/v1/videos/extensions通过提示词、源视频、时长和模型续写官方渠道的 Grok 视频。
查看接口文档请求头
TT-API-KEYstring必填填写 TTAPI API 密钥。
Content-Typestring必填使用 application/json。
请求体
promptstring按条件填写grok-imagine-video 文生视频必填,grok-imagine-video-1.5 图生视频选填。
modelenum选填默认 grok-imagine-video-1.5,可选 grok-imagine-video 或 grok-imagine-video-1.5。
aspect_ratioenum选填可选 1:1、16:9、9:16、4:3、3:4、3:2 或 2:3。
durationinteger | string选填默认 8 秒,接受 1 至 15 的数字或数字字符串。
imageobject按条件填写图生视频的图像对象。grok-imagine-video-1.5 必填,基础版选填。
reference_imagesobject[]选填参考素材生成视频使用的参考图对象。
resolutionenum选填可选 480p、720p 或 1080p。
voice_idenum选填视频音频的角色音色 ID,可选 carina、zagan、helix、orion、luna、iris、altair 或 zenith。
发送请求并获取结果
复制当前模型的请求地址、鉴权请求头和请求体。
curl --request POST \
--url https://api.ttapi.io/grok/v1/videos/generations \
--header "TT-API-KEY: $TTAPI_KEY" \
--header 'Content-Type: application/json' \
--data '{"prompt":"static telephoto shot of a coastal apartment building at dusk","model":"grok-imagine-video","aspect_ratio":"2:3","duration":6,"resolution":"720p","voice_id":"luna"}'