| 线路 | Base URL | 说明 |
|---|---|---|
| 官网(推荐) | https://iliu.ai | 官网地址 |
| 海外直连 | https://api.xinliu.one | 海外直连节点 |
POST {Base URL}/v1/videosAuthorization: Bearer 你的令牌Content-Type: application/json| model | 说明 |
|---|---|
grok-imagine-video-preview | 720P,默认 6 秒 |
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型名 |
prompt | string | 是 | 提示词 |
reference_images | array | 否 | 参考图数组,元素为图片公网直链 URL(须可公开访问,不支持 Base64 / data URI)。提供后转为图生视频 |
seconds | string | 否 | 视频时长(秒),可选 6 / 10 / 15,默认 6(底层支持 1~15 整数) |
size | string | 否 | 画面方向与尺寸,默认 720x1280。可选 720x1280 / 1280x720 / 1024x1024 / 1024x1792 / 1792x1024,输出分辨率最高 720P 档 |
resolution | string | 否 | 清晰度档,可选 SD / HD / 480p / 720p |
{
"model": "grok-imagine-video-preview",
"prompt": "一只红色的狐狸走过清晨的雪林,电影感",
"size": "1280x720",
"seconds": "6"
}{
"model": "grok-imagine-video-preview",
"prompt": "一只红色的狐狸走过清晨的雪林,电影感",
"reference_images": ["https://files.example.com/source.jpg"],
"size": "1280x720"
}task_id,用 GET /v1/videos/{task_id} 轮询。任务完成后请使用响应中的 url 字段下载视频(url / video_url / result_url 三字段值相同)。{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video",
"model": "grok-imagine-video-preview",
"status": "queued",
"progress": 0,
"created_at": 1730000000,
"seconds": "6",
"size": "720x1280"
}{
"id": "task_xxx",
"status": "completed",
"progress": 100,
"model": "grok-imagine-video-preview",
"size": "720x1280",
"seconds": "6",
"url": "https://files.example.com/video/xxxxx.mp4",
"video_url": "https://files.example.com/video/xxxxx.mp4",
"result_url": "https://files.example.com/video/xxxxx.mp4",
"created_at": 1730000000,
"completed_at": 1730000040
}400 参数错误(如 seconds 超出 1~15、size 不在枚举内)401 令牌无效404 模型不存在或未开通429 同时处理任务数量超限500 服务端错误