Skip to main content
POST
Grok Imagine Reference-to-Video

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
默认值:grok-imagine-reference-to-video
必填

grok-imagine-reference-to-video:参考图生成视频

示例:

"grok-imagine-reference-to-video"

prompt
string
必填

文本提示词,描述想要生成的视频内容

说明:

  • 支持中英文
  • 可使用 @Image1@Image2 … 引用参考图
  • 最多 4096 个字符
Maximum string length: 4096
示例:

"A @Image1 astronaut walking through glowing blue fog, cinematic slow motion"

reference_image_urls
string[]
必填

参考图片 URL 列表

说明:

  • 数量:1 - 7
  • 在 prompt 中使用 @Image1 ~ @Image7 引用对应图片
Required array length: 1 - 7 elements
示例:
duration
integer | null

输出视频时长(秒)

说明:

  • 范围 1 - 10
  • 未传时默认 8
示例:

8

aspect_ratio
string | null

输出视频宽高比

可选值:

  • 16:94:33:21:12:33:49:16

说明:

  • 未传时默认 16:9
示例:

"16:9"

resolution
string | null

输出视频分辨率

可选值:

  • 480p
  • 720p

说明:

  • 未传时默认 480p
示例:

"480p"

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
video.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
video
示例:

"video"