# 视频生成任务

**方法**: `POST`
**路径**: `/minimax/v1/video_generation`

<https://platform.minimaxi.com/document/video_api_intro?key=68abdfdaaf3fef26183d6501>

接口名称： Minimax视频生成任务 [Text/Image to Video]

接口描述： 创建视频生成任务，支持文生视频和图生视频两种模式

## 请求参数

### Header 参数

```text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}
```

### Body 参数 application/json

```text
model
string
必需
prompt
string
必需
duration
integer
可选
resolution
string
可选
示例
{
"model"
:
"string"
,
"prompt"
:
"string"
,
"duration"
:
0
,
"resolution"
:
"string"
}
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/minimax/v1/video_generation' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "string",
    "prompt": "string",
    "duration": 0,
    "resolution": "string"
}'
```

## 返回响应

### 🟢 200 成功

**内容类型**: `application/json`

#### 响应结构

```text
id
string
必需
```

#### 示例

```json
{
    "task_id": "106916112212032",
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}
```
