# 生成视频任务

**方法**: `POST`
**路径**: `/higgsfield/generate`

模型类型，可选值：standard、lite、turbo

## 请求参数

### Header 参数

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

### Body 参数 application/json

```text
model
enum<string>
必需
模型类型，可选值：standard、lite、turbo
枚举值:
standard
lite
turbo
motion_id
string
必需
动作模板ID，可通过模板API获取
prompt
string
视频生成的提示词
必需
enhance_prompt
boolean
是否增强提示词
可选
默认值:
true
seed
integer
可选
随机种子，范围1-1000000
>= 1
<= 1000000
width
integer
视频宽度
可选
height
integer
视频高度
可选
image
array
[string]
必需
视频帧图片地址，支持URL和base64，最少1张，最多2张
>= 1 items
<= 2 items
示例
{
"model"
:
"standard"
,
"motion_id"
:
"string"
,
"prompt"
:
"string"
,
"enhance_prompt"
:
true
,
"seed"
:
1
,
"width"
:
0
,
"height"
:
0
,
"image"
:
[
"string"
]
}
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/higgsfield/generate' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "standard",
    "motion_id": "string",
    "prompt": "string",
    "enhance_prompt": true,
    "seed": 1,
    "width": 0,
    "height": 0,
    "image": [
        "string"
    ]
}'
```

## 返回响应

### 🟢 200 成功

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

#### 响应结构

```text
id
string
可选
任务ID，用于后续查询任务状态
```

#### 示例

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "任务ID，用于后续查询任务状态"
    }
  }
}

```
