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

# Grok Imagine Video 文生视频

这是一个异步 API，仅返回异步任务的 `task_id`。

<Tip>
  这是一个**异步**API，只会返回异步任务的 task\_id。您应该使用该 task\_id 请求 [查询任务结果 API](/docs/models/reference-get-async-task-result) 来检索生成结果。
</Tip>

## 请求头

<ParamField header="Content-Type" type="string" required={true}>
  枚举值: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式: Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="prompt" type="string" required={true}>
  要生成的视频的文本描述。支持丰富、详细的提示词以生成高质量视频，涵盖电影场景、自然风光、角色动画等多种风格。

  长度限制：1 - 4096
</ParamField>

<ParamField body="duration" type="integer" default={6}>
  视频时长，单位为秒（6-10）。视频越长费用越高，按秒计费。

  取值范围：\[6, 10]
</ParamField>

<ParamField body="resolution" type="string" default="720p">
  输出视频分辨率。720p 画质更高，480p 生成更快。

  可选值：`720p`, `480p`
</ParamField>

<ParamField body="aspect_ratio" type="string" default="16:9">
  生成视频的宽高比。16:9 适用于宽屏，9:16 适用于手机竖屏，1:1 适用于社交媒体。

  可选值：`16:9`, `1:1`, `9:16`
</ParamField>

## 响应信息

<ResponseField name="task_id" type="string" required={true}>
  使用 task\_id 请求 [查询任务结果 API](/docs/models/reference-get-async-task-result) 来检索生成的输出。
</ResponseField>
