> ## 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 Text-to-Video

Accelerated inference for the Wan 2.1 14B text-to-video model. This is a comprehensive and open video foundation model suite that pushes the boundaries of video generation. By default, the API generates a 5-second video.

<Tip>
  This is an **asynchronous** API and will only return the task\_id of the async task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the video generation result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="prompt" type="string" required={true}>
  The prompt text used to guide the generation.

  Value range: `[1, 2000]`.
</ParamField>

<ParamField body="negative_prompt" type="string" required={false}>
  A negative prompt that instructs the model which elements to avoid generating.

  Value range: `[0, 2000]`.
</ParamField>

<ParamField body="width" type="integer" required={false}>
  The width of the output video.

  Enum values: `480`, `720`, `832`, `1280`.

  Default: `832`. If width or height is not specified, width and height will be forced to `832` and `480`.
</ParamField>

<ParamField body="height" type="integer" required={false}>
  The height of the output video.

  Supported:

  * (480p) When the width is `480`, the height is set to `832`
  * (480p) When the width is `832`, the height is set to `480`
  * (720p) When the width is `720`, the height is set to `1280`
  * (720p) When the width is `1280`, the height is set to `720`

  Default: `480`. If width or height is not specified, width and height will be forced to `832` and `480`.
</ParamField>

<ParamField body="loras" type="object[]" required={false}>
  LoRA models applied to video generation.

  Supports specifying up to **3 LoRA models**.

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="path" type="string" required={true}>
      The path to the LoRA model. You can specify a LoRA model name from Hugging Face, for example: `Remade-AI/Cyberpunk`; or a model download URL from Civitai, for example: `https://civitai.com/api/download/models/1572591?type=Model&format=SafeTensor`.

      <Warning>
        The LoRA model must be compatible with Wan2.1 14B T2V, otherwise it will not work. Please check compatibility before use.
      </Warning>
    </ParamField>

    <ParamField body="scale" type="number" required={true}>
      The scaling value for the LoRA. The larger the value, the more pronounced the LoRA effect. This is a number(float32) type with a value range of `[0, 4.0]`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="seed" type="integer" required={false}>
  The random seed, a number used by Stable Diffusion to generate noise. Value range: `[-1, 9999999999]`. Default value: -1.
</ParamField>

<ParamField body="steps" type="integer" required={false}>
  The number of iteration steps, i.e., the number of iterations in the image creation process. Value range: `[1, 40]`. Default: `30`.
</ParamField>

<ParamField body="guidance_scale" type="float" required={false}>
  The guidance scaling parameter controls how closely the generated content follows the prompt. Value range: `[0, 10]`. Default: `5.0`.
</ParamField>

<ParamField body="flow_shift" type="float" required={false}>
  The flow\_shift parameter mainly affects the speed and magnitude of object motion in the video. Higher values produce more pronounced and faster motion, while lower values make motion slower and more subtle.

  Value range: `[1, 10]`. Default: `5.0`.
</ParamField>

<ParamField body="enable_safety_checker" type="boolean" required={false}>
  The enable\_safety\_checker parameter controls whether a safety filter is applied to the generated content. When enabled, it helps filter potentially harmful or inappropriate content from the video output.

  Default: `true`.
</ParamField>

<ParamField body="fast_mode" type="boolean" required={false}>
  Whether to enable fast mode, which generates videos faster but may reduce quality and price.

  Default: `false`.
</ParamField>

## Response Information

<ResponseField name="task_id" type="string" required={true}>
  The task\_id of the asynchronous task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to obtain the generation result
</ResponseField>
