> ## 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.

# CogVideoX

CogVideoX是智谱的视频生成模型，是一类通过学习时序视觉数据，支持从文本、图像生成动态视频内容的模型，沉浸式AI音效，高清画质呈现，视频时长拓展，高帧率输出

### 模型参数

* 模型ID：`cogvideox-2`/`cogvideox-flash`/`cogvideox`
* 模型价格：你可以在[模型广场](https://geekai.co/models?platform=bigmodel\&type=video)查看最新价格信息
* 调用入口：`https://geekai.co/api/v1/videos/generations`
* 模型参数：参考[视频 API 手册](https://docs.geekai.co/cn/api/video/generations)
* API认证：[获取 API KEY](https://docs.geekai.co/cn/docs/quick_start)

<Note>
  不支持视频 API 中的以下参数：

  * `negative_prompt`
  * `image_tail`
  * `resolution`
  * `aspect_ratio`
  * `duration`

  附：[CogVideoX 官方 API 文档](https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E5%BC%82%E6%AD%A5#cogvideox)
</Note>

### 文生视频

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "cogvideox-flash",
    "prompt": "彼得兔开小汽车，游走在马路上，脸上的表情充满开心喜悦",
    "size": "1280x960",
    "quality": "quality",
    "with_audio": true,
    "fps": 30
}'
```

响应是一个 JSON 对象，包含生成图片的 URL：

```json theme={null}
{
    "model": "cogvideox-flash",
    "task_id": "a83d58e1-a590-4d58-a1a1-0378ae7efaa8",
    "task_status": "succeed",
    "video_result": [
        {
            "id": "f87f9c36-2856-4c5c-89a6-cc6833a85ddc",
            "url": "https://static.geekai.co/video/2026/02/10/f536064e4248e8137b252472f61cea42.mp4"
        }
    ]
}
```

下面图生视频生成响应结构是一样的，不再列举。

### 图生视频

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "cogvideox-flash",
    "prompt": "让画面动起来",
    "image": "https://img.iplaysoft.com/wp-content/uploads/2019/free-images/free_stock_photo.jpg",
    "size": "3840x2160",
    "quality": "quality",
    "with_audio": true,
    "wartermark": true
}'
```

<Note>`cogvideox`和`cogvideox-2`同上面的`cogvideox-flash`,同时也支持Base64编码传入图片</Note>
