> ## Documentation Index
> Fetch the complete documentation index at: https://docs.1788.love/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok 视频：线路与请求参数

> Grok Imagine 1.5 视频生成：官方渠道 A、T 与特价渠道 V 线路的模型名、能力对照和统一请求写法

> [!NOTE]
>
> **给 AI 助手的要点**
>
> * 接口：`POST https://1788.love/v1/videos`，请求头 `Authorization: Bearer YOUR_1788_API_KEY`、`Content-Type: application/json`。创建 → 查询 → 下载的流程见[任务式接口](https://docs.1788.love/guides/async-tasks.md)。
> * Grok 只有**文生视频**和**图生视频**。不支持参考视频、参考音频、尾帧；带了会直接报错，不会悄悄忽略。
> * 图片写成 `image_with_roles`（`role` 取 `first_frame` 或 `reference_image`），也接受 `image_urls`。比例写 `aspect_ratio`（也接受 `ratio`，渠道 A 另接受 `size`）。
> * `duration` 是 JSON 数字，不能加引号。
> * 清晰度：渠道 A 用 `quality` 或 `resolution` 填 `480p` / `720p`；渠道 T 的清晰度写在模型名里（`grok-t-480` / `grok-t-720`）；特价渠道 V 按条计费，可选 `480p` / `720p`。
> * 价格不在文档里写，见[价目表](https://1788.love/pricing)。

## 线路表

| 模型名 | 渠道 | 计费 | 清晰度 | 时长（秒） | 比例 | 参考图上限 | 视频 / 音频 | 首帧 / 尾帧 |
| - | - | - | - | - | - | - | - | - |
| `grok-imagine-1.5-video` | 官方 A | 按秒 | `480p`、`720p`（默认 720p） | 6–30 | `16:9` `9:16` `1:1` `3:2` `2:3` | 7 | 不支持 | 首帧 ✓（作为参考图）/ 尾帧 ✗ |
| `grok-t-480` | 官方 T | 按秒 | 480p（模型名决定） | 6–15 | `16:9` `9:16` `1:1` `3:2` `2:3` | 7 | 不支持 | 首帧 ✓ / 尾帧 ✗ |
| `grok-t-720` | 官方 T | 按秒 | 720p（模型名决定） | 6–15 | 同上 | 7 | 不支持 | 首帧 ✓ / 尾帧 ✗ |
| `grok-1.5-req-a` | 特价渠道 V · 路线一 | 按条 | `480p`、`720p` | 5–15 | `16:9` `9:16` `1:1` `4:3` `3:4` `21:9` | 6 | 不支持 | 首帧 ✓（作为参考图）/ 尾帧 ✗ |
| `grok-1.5-req-c` | 特价渠道 V · 路线二 | 按条 | `480p`、`720p` | 5–15 | `16:9` `9:16` `1:1` `4:3` `3:4` `21:9` | 6 | 不支持 | 首帧 ✓（作为参考图）/ 尾帧 ✗ |

* "按条"：一次任务一个固定价，和时长无关。
* 同一个请求的图片只能是三种情况之一：不带图（文生视频）、1 张图、2–7 张参考图。
* 渠道 T 的图片处理：恰好 1 张图时当首帧；2–7 张当参考图。显式写 `first_frame` 的图必须是唯一一张。

> [!NOTE]
>
> 上表以接口实际校验为准。渠道 A 的时长上限、清晰度范围和旧文档保持一致（6–30 秒，480p / 720p）。

## 统一请求写法

所有 Grok 模型共用同一套字段：

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 上表里的模型名 |
| `prompt` | string | 是 | 画面描述；有图时可以很短 |
| `duration` | integer | 建议 | 秒数，JSON 数字（不要写 `"6"`），范围见线路表 |
| `aspect_ratio` | string | 建议 | 比例，取值见线路表。也接受字段名 `ratio`；渠道 A 还接受旧字段 `size` |
| `resolution` | string | 否 | 只有渠道 A 可选 `480p` / `720p`（别名 `quality`）。渠道 T 的清晰度由模型名决定，用统一写法时填了和模型名不一致的值会报错；特价渠道 V 支持 480p / 720p |
| `image_with_roles` | object\[] | 否 | `{ "url": "...", "role": "first_frame" 或 "reference_image" }`；`role` 不写按参考图处理 |
| `image_urls` | string\[] | 否 | 纯 URL 数组的兼容写法，按参考图处理 |

素材 URL 必须是公网 HTTP(S) 地址，不支持 base64。本地文件先用[上传素材](https://docs.1788.love/api-reference/upload-image.md)换成 URL。

## 各线路差异和会报的错

错误在**创建任务时**立即返回，任务不会创建，也不扣费。

| 线路 | 差异 |
| - | - |
| 渠道 A | 旧字段 `size`（比例）、`quality`（清晰度）、`image_urls` 继续可用。清晰度只认 `480p` / `720p` |
| 渠道 T | 清晰度在模型名里：要 480p 就用 `grok-t-480`，要 720p 就用 `grok-t-720`。时长只到 15 秒 |
| 特价渠道 V | 按条计费，时长 5–15 秒，价格不随秒数变；清晰度 `480p` / `720p` 价格相同 |

| 错误信息（节选） | 原因 | 处理 |
| - | - | - |
| `does not support reference videos` / `does not support reference videos or reference audios` | 带了 `video_with_roles` / `audio_with_roles`（或 `video_urls` / `audio_urls`） | 去掉；Grok 不支持视频、音频参考 |
| `does not support last_frame` | 带了尾帧 | 去掉，或把图改为 `reference_image` |
| `at most 7 reference images` / `reference material count exceeds` | 图片超过上限 | 删减 |
| `duration must be ...` | 时长超出线路范围，或写成字符串 | 用 JSON 数字，按线路表取值 |
| `resolution ...` | 清晰度不在线路支持范围，或和 `grok-t-*` 模型名不一致 | 按线路表填写 |
| `aspect_ratio must be ...` | 比例不在该线路支持的取值里 | 按线路表取值 |
| `first_frame must be the only image` | 渠道 T 里写了 `first_frame`，同时还有其他图 | 只留这一张，或都改成 `reference_image` |

## 示例

### 文生视频（渠道 A）

```bash theme={null}
curl https://1788.love/v1/videos \
  -H "Authorization: Bearer YOUR_1788_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-1.5-video",
    "prompt": "一只狗在海滩上奔跑，阳光明媚，慢镜头",
    "duration": 6,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'
```

### 图生视频（渠道 T，720p）

```json theme={null}
{
  "model": "grok-t-720",
  "prompt": "让画面动起来，镜头缓慢推进",
  "duration": 8,
  "aspect_ratio": "9:16",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_IMAGE.png", "role": "first_frame" }
  ]
}
```

### 特价渠道 V（按条，5 秒）

```json theme={null}
{
  "model": "grok-1.5-req-a",
  "prompt": "人物转身微笑，头发随风飘动",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "9:16",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_IMAGE.png", "role": "reference_image" }
  ]
}
```

创建成功后保存返回的 `id`，查询、下载见[任务式接口](https://docs.1788.love/guides/async-tasks.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.