Grok Imagine 1.5
Grok Imagine 1.5 的首帧要求、参数、输出尺寸和请求示例
grok-imagine-1.5 专门用于首帧图生视频,适合让一张已确定主体、构图或风格的图片动起来,例如人物动作、镜头推进和社媒短视频。
必须提供首帧
本模型不支持纯文生视频。请求必须提供 1 张首帧,新接入使用 start_frames;images 只用于兼容已有请求。
快速了解
| 项目 | 支持范围 |
|---|---|
| 任务流程 | POST /v1/task/submit 提交,GET /v1/task/{task_id} 查询 |
| 视频时长 | 3–15 秒 |
| 清晰度 | 480p、720p |
| 画面比例 | 1:1、16:9、9:16 |
| 素材输入 | 仅 1 张首帧,不支持其他参考素材 |
| 音频生成 | 支持,默认开启 |
请求使用 Bearer 认证,生成参数统一放在 input 对象中:
Authorization: Bearer $API_KEYinput 参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
prompt | string | 是 | 提示词,最多 5000 个字符 |
duration | integer | 是 | 3–15 秒 |
aspect_ratio | string | 是 | 1:1、16:9、9:16 |
resolution | string | 是 | 480p 或 720p |
start_frames | array | 二选一 | 推荐的首帧字段,只能传 1 张 |
images | array | 二选一 | start_frames 的兼容别名,只读取第 1 张 |
audio | boolean | 否 | 是否生成带音频视频,默认 true |
不要同时传 start_frames 和 images。本模型不支持 image_references、end_frames、video_references、audio_references。
输出尺寸
| aspect_ratio | 480p | 720p |
|---|---|---|
1:1 | 544x544 | 960x960 |
16:9 | 736x400 | 1280x720 |
9:16 | 400x736 | 720x1280 |
请求示例
curl https://cdn.12ai.org/v1/task/submit \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-1.5",
"input": {
"prompt": "以这张海边画面作为首帧,镜头向前推进,海浪翻涌,光线自然",
"start_frames": [
"https://example.com/ocean.jpg"
],
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": 5,
"audio": true
}
}'curl https://cdn.12ai.org/v1/task/submit \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-1.5",
"input": {
"prompt": "让图片中的人物轻微转头并看向镜头,背景灯光轻微流动",
"images": [
"https://example.com/portrait.jpg"
],
"aspect_ratio": "9:16",
"resolution": "720p",
"duration": 5,
"audio": false
}
}'获取结果
提交成功后保存返回的 id,再用它查询任务:
curl https://cdn.12ai.org/v1/task/task_xxxxxxxxxxxxxxxx \
-H "Authorization: Bearer $API_KEY"当 status 为 completed 时,从 outputs 读取视频 URL:
{
"id": "task_xxxxxxxxxxxxxxxx",
"status": "completed",
"phase": "completed",
"outputs": [
"https://img.12ai.org/videos/task_xxxxxxxxxxxxxxxx_0.mp4"
],
"error": null
}轮询状态、失败处理和回调格式见 异步视频任务。
使用边界
| 场景 | 建议 |
|---|---|
| 已有确定画面 | 使用本模型,并把图片作为唯一首帧传入 |
| 纯文生视频 | 改用 gemini-omni-flash 或 Seedance |
| 多图参考 | 改用 happy-horse-1.1 |
| 首尾帧过渡 | 改用 Seedance,本模型不支持 end_frames |
