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

# 文生视频

### 快速入门

你可以通过文本提示生成视频，文本提示可以是任何描述性的句子，模型会根据这些描述生成相应的视频：

```bash theme={null}
curl --location 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--data '{
    "model":"cogvideox-flash",
    "prompt":"小猫小狗在草丛中打闹",
    "async": false
}'
```

<Note>
  Stable Video 模型目前仅支持图生视频，不支持文生视频接口。
</Note>

### 异步任务

`async` 参数用于控制是否异步生成视频，默认为 `false`，表示创建视频接口会同步等待视频生成完毕并返回。如果设置为 `true`，则会异步生成视频并返回任务ID，你可以使用该任务ID轮询视频生成状态：

```bash theme={null}
curl --location --request GET 'https://geekai.co/api/v1/videos/{task_id}' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' 
```

直到任务状态值为 `succeed`，并拿到视频生成结果 URL。对于视频生成任务，一般比较耗时，推荐使用异步生成视频模式。

更多视频生成 API 参数细节，请参考[视频创建 API 手册](https://docs.geekai.co/cn/api/video/generations)。
