video_config.video_length 控制。| 线路 | Base URL | 说明 |
|---|---|---|
| 国内加速(推荐) | https://cdn.wusag.com | 走国内 CDN 节点 |
| 海外直连 | https://api.xinliu.one | 海外服务器或加速节点异常时使用 |
POST {Base URL}/v1/videosAuthorization: Bearer 你的令牌Content-Type: application/json 或 multipart/form-data| model | 时长 |
|---|---|
grok-imagine-1.0-video | 6 / 10 / 15 秒(由 video_config.video_length 控制) |
grok-imagine-1.0-video-20s | 20 秒固定 |
grok-imagine-1.0-video-30s | 30 秒固定 |
aspect_ratio 参数控制,不通过模型名。| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 见上表 |
prompt | string | 是 | 提示词 |
reference_images | array | 否 | 图生视频参考图,最多 7 张 |
video_config.video_length | int | 否 | 时长 6 / 10 / 15(仅基础 grok-imagine-1.0-video 可调) |
video_config.aspect_ratio | string | 否 | 16:9 / 9:16 / 1:1 / 2:3 / 3:2 |
video_config.resolution | string | 否 | SD / HD |
{
"model": "grok-imagine-1.0-video",
"prompt": "保留主体,加入轻微运镜",
"reference_images": ["https://example.com/source.jpg"],
"video_config": {
"video_length": 6,
"aspect_ratio": "16:9",
"resolution": "HD"
}
}task_id,调 GET /v1/videos/{task_id} 轮询。{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video.generation",
"status": "processing",
"progress": 0,
"created_at": 1730000000
}400 参数错误(如 size 不被模型支持、参考图链接不可达)401 令牌无效402 余额不足(按预估费用预扣)404 模型不存在或未开通429 同时进行任务数超上限500 服务端错误