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

# Wan 2.1 文生视频

Wan 2.1 14B 文生视频模型的加速推理，这是一套全面且开放的视频基础模型套件，推动了视频生成的边界。默认情况下，API 将生成 5 秒的视频。

<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, 2000]`。
</ParamField>

<ParamField body="negative_prompt" type="string" required={false}>
  负面提示指示模型避免生成哪些元素。

  取值范围：`[0, 2000]`。
</ParamField>

<ParamField body="width" type="integer" required={false}>
  输出视频的宽度。

  枚举值：`480`、`720`、`832`、`1280`。

  默认：`832`。如果未指定宽度或高度，宽度和高度将被强制设置为 `832` 和 `480`。
</ParamField>

<ParamField body="height" type="integer" required={false}>
  输出视频的高度。

  支持：

  * (480p) 宽度为 `480` 时高度设置为 `832`
  * (480p) 宽度为 `832` 时高度设置为 `480`
  * (720p) 宽度为 `720` 时高度设置为 `1280`
  * (720p) 宽度为 `1280` 时高度设置为 `720`

  默认：`480`。如果未指定宽度或高度，宽度和高度将被强制设置为 `832` 和 `480`。
</ParamField>

<ParamField body="loras" type="object[]" required={false}>
  应用于视频生成的 LoRA 模型。

  支持最多指定 **3 个 LoRA 模型**。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="path" type="string" required={true}>
      LoRA 模型的路径。您可以指定来自 Hugging Face 的 LoRA 模型名称，例如：`Remade-AI/Cyberpunk`；或来自 Civitai 的模型下载 URL，例如：`https://civitai.com/api/download/models/1572591?type=Model&format=SafeTensor`。

      <Warning>
        LoRA 模型必须与 Wan2.1 14B T2V 兼容，否则将无法工作。使用前请检查兼容性。
      </Warning>
    </ParamField>

    <ParamField body="scale" type="number" required={true}>
      LoRA 的缩放值。值越大，LoRA 效果更明显。number(float32) 类型，取值范围：`[0, 4.0]`。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="seed" type="integer" required={false}>
  随机数种子，稳定扩散产生噪声的数字，取值范围：`[-1, 9999999999]`。默认值为 -1。
</ParamField>

<ParamField body="steps" type="integer" required={false}>
  迭代步数，图片创建过程的迭代数，取值范围：`[1, 40]`。默认：`30`。
</ParamField>

<ParamField body="guidance_scale" type="float" required={false}>
  引导缩放参数控制生成内容对提示的跟随程度。取值范围：`[0, 10]`。默认：`5.0`。
</ParamField>

<ParamField body="flow_shift" type="float" required={false}>
  flow\_shift 参数主要影响视频中物体运动的速度和幅度。更高的值产生更明显和更快的运动，而较低的值使运动更慢更细微。

  取值范围：`[1, 10]`。默认：`5.0`。
</ParamField>

<ParamField body="enable_safety_checker" type="boolean" required={false}>
  enable\_safety\_checker 参数控制是否对生成的内容应用安全过滤器。启用时，它有助于从视频输出中过滤掉潜在的有害或不当内容。

  默认：`true`。
</ParamField>

<ParamField body="fast_mode" type="boolean" required={false}>
  是否启用快速模式，将更快地生成视频但可能降低质量和价格。

  默认：`false`。
</ParamField>

## 响应信息

<ResponseField name="task_id" type="string" required={true}>
  异步任务的 task\_id。您应该使用该 task\_id 请求 [查询任务结果 API](/docs/models/reference-get-async-task-result) 以获取生成结果
</ResponseField>
