跳转到主要内容
POST
/
generate
/
k
/
grok-image-to-video
Grok 图片转视频
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/grok-image-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image_urls": [
    ""
  ],
  "mode": "normal",
  "prompt": "The person waves and smiles"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
使用 xAI 的 Grok Imagine 模型将静态图片转换为动态视频。 模型特点:
  • 图片动态化 - 将静态图片转化为专业级短视频
  • 音视频同步 - 自动生成匹配的音效、对话甚至歌声
  • 流畅运动 - 24fps 帧率,动作自然无抖动
  • 快速输出 - 15 秒内完成生成

Authorizations

Authorization
string
header
required

请使用您的 API Token 进行认证

Body

application/json

任务参数

image_urls
string[]

图片URL列表(最多1张)

Maximum array length: 1
Example:
[""]
mode
enum<string>
default:normal

模式(可选,默认 normal)

可用选项:
fun,
normal,
spicy
Example:

"normal"

prompt
string

提示词(可选)

Maximum string length: 5000
Example:

"The person waves and smiles"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"