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

# grok-video-1.5

<Tip>
  点击上方的“**复制页面**”可发给 AI 自动写对接代码

  仅支持传参考图，可传人像图(名人&明星除外)

  当前支持吃图生视频，不支持纯文字生视频，**必须传图片**
</Tip>

开通账号联系企微：

<Frame>
  <img src="https://mintcdn.com/bytedance-44e82b6f/pOUYHknahBdTPWWD/images/745b133d7e154149b671bfc576964277.jpg?fit=max&auto=format&n=pOUYHknahBdTPWWD&q=85&s=7188ed0533cae276c8de6d5b382d8c8c" alt="745b133d7e154149b671bfc576964277" title="745b133d7e154149b671bfc576964277" style={{ width:"38%" }} width="643" height="643" data-path="images/745b133d7e154149b671bfc576964277.jpg" />
</Frame>

## 1、身份认证

<ParamField query="Authorization" type="string" required>
  所有接口均需要使用 Bearer Token 进行认证

  获取 API Key：访问 [**API Key 管理页面**](https://api.bytedance.mom/keys) 获取您的 API Key

  使用时在请求头中添加：

  ```text theme={null}
  Authorization: Bearer YOUR_API_KEY
  Content-Type: application/json
  ```
</ParamField>

<Info>
  请求方法：`POST`

  请求路径：`https://api.bytedance.mom/v1/videos`
</Info>

## 2、请求参数

<ParamField query="model" path="param" type="string" required>
  模型名称，必传。传"grok-imagine-video-1.5"(价格便宜)或"grok-imagine-video-1.5-official"(价格贵,稳定)
</ParamField>

<ParamField query="prompt" path="param" type="string" required>
  视频生成提示词，必传。最大可传 2000 个字符
</ParamField>

<ParamField query="seconds" path="param" type="string" required>
  要生成的视频时长，必传。可选 6-15秒。
</ParamField>

<ParamField query="aspect_ratio" path="param" type="string" required>
  视频比例，必传。"9:16" / "16:9"
</ParamField>

<ParamField query="resolution" path="param" type="string">
  分辨率，非必传。默认"720p"。
</ParamField>

<ParamField query="images" path="param" type="list" required>
  参考图片，数组，非必传（不传参考图时视为文生视频）。传入公网可访问的图片链接，图片数量最多 7 张，建议格式：jpg、jpeg、png
</ParamField>

<RequestExample>
  ```text 请求示例(CURL) theme={null}
  // 发起视频生成请求
  curl -X POST https://api.bytedance.mom/v1/videos \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <api-key>" \
    -d '{
      "model": "grok-imagine-video-1.5",
      "prompt": "让参考图中的猫咪拿着一瓶饮料，坐在沙滩旁晒太阳",
      "seconds": "15",
      "aspect_ratio": "9:16",
      "images": ["https://example.com/scene.jpg"]
    }'
  ```
</RequestExample>

## 3、响应参数

<ResponseField name="id" type="string" required>
  视频任务ID，相当于钥匙，每一条视频都有专属的钥匙，后续用它可以取出来视频链接。

  请用这个ID调取 [视频生成结果查询](https://app.mintlify.com/bytedance-44e82b6f/bytedance-44e82b6f/editor/main/~/eee5b841-cdf5-40e5-80ce-1704bc6eaabf) 接口。
</ResponseField>

<ResponseExample>
  ```text 响应示例(任务提交成交) theme={null}
  // 接收视频任务状态 - 成功
  {
    "id": "task_abc123...", //视频任务ID
    "object": "video",
    "model": "grok-imagine-video-1.5",
    "status": "queued",
    "progress": 0,
    "created_at": 1704067200,
    "seconds": "15",
    "size": "1280x720"
  }
  ```

  ```text 响应示例(任务提交失败) theme={null}
  // 接收视频任务状态 - 失败
  {
    "error": {
      "message": "错误描述",
      "type": "invalid_request_error",
      "code": "model_not_found"
    }
  }
  ```
</ResponseExample>
