> ## 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.6 Reference-to-Video

This is an asynchronous API and only returns the async task\_id. You need to use the task\_id to call the task result query API to obtain the video generation result.

<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 [Query Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated 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="input" type="object" required={true}>
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="prompt" type="string" required={true}>
      Text prompt used to describe the elements and visual characteristics expected in the generated video. Chinese and English are supported. Each Chinese character/letter counts as one character; any excess will be automatically truncated.

      Length limit: 0 - 2000
    </ParamField>

    <ParamField body="audio_url" type="string">
      Audio file URL. The model will use this audio to generate the video. HTTP or HTTPS protocols are supported. Audio limits: format must be wav or mp3; duration 3–30s; file size no more than 15MB. Handling out-of-limit cases: if the audio length exceeds the duration value (5 seconds or 10 seconds), the first 5 seconds or 10 seconds will be automatically extracted, and the rest will be discarded. If the audio length is shorter than the video duration, the part exceeding the audio length will be a silent video. For example, if the audio is 3 seconds and the video duration is 5 seconds, the first 3 seconds of the output video will have sound, and the last 2 seconds will be silent.
    </ParamField>

    <ParamField body="reference_urls" type="string[]" required={true}>
      Refer to the reference videos as characterx according to the order of the reference videos. For example, when there are two reference videos, write the prompt as “character1 is singing by the roadside, and character2 is dancing nearby”. For a single reference, you also need to write character1 with the number 1 included.

      Array length: 1 - 3

      Format: mp4, mov. Quantity: 1–3 items. Single-item duration: 2–30s. Each file must be smaller than 30MB. Cannot be provided together with audio.
    </ParamField>

    <ParamField body="negative_prompt" type="string">
      Negative prompt, used to describe content you do not want to see in the video frames and to constrain the video frames. Chinese and English are supported. The length must not exceed 500 characters; any excess will be automatically truncated.

      Length limit: 0 - 500
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="parameters" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="seed" type="integer">
      Random seed. The value range is \[0, 2147483647]. If not specified, the system automatically generates a random seed. To improve the reproducibility of generated results, it is recommended to fix the seed value. Please note that because model generation is probabilistic, even using the same seed cannot guarantee that the generated results will be exactly the same every time.

      Value range: \[0, 2147483647]
    </ParamField>

    <ParamField body="size" type="string" default="1920*1080">
      Specifies the resolution of the generated video, in the format width*height. Supports 720P tiers (1280*720/720*1280/960*960/1088*832/832*1088) and 1080P tiers (1920*1080/1080*1920/1440*1440/1632*1248/1248\*1632).

      Optional values: `1280*720`, `720*1280`, `960*960`, `1088*832`, `832*1088`, `1920*1080`, `1080*1920`, `1440*1440`, `1632*1248`, `1248*1632`
    </ParamField>

    <ParamField body="audio" type="boolean" default={true}>
      Whether to add audio. Parameter priority: audio\_url > audio. This only takes effect when audio\_url is empty. true: default value, automatically adds audio to the video; false: does not add audio, outputs a silent video.
    </ParamField>

    <ParamField body="duration" type="integer" default={5}>
      Duration of the generated video, in seconds. Optional values are 5 and 10, with a default value of 5. duration directly affects the cost. Cost = unit price (based on resolution) × duration (seconds). Please confirm the model pricing before calling.

      Optional values: `5`, `10`
    </ParamField>

    <ParamField body="shot_type" type="string" default="multi">
      Video generation mode. single: single-shot generation; multi: multi-shot generation.

      Optional values: `single`, `multi`
    </ParamField>

    <ParamField body="watermark" type="boolean" default={false}>
      Whether to add a watermark identifier. The watermark is located in the lower-right corner of the video, and the text is fixed as "AI 生成". false: default value, no watermark is added; true: add a watermark.
    </ParamField>

    <ParamField body="prompt_extend" type="boolean" default={true}>
      Whether to enable intelligent prompt rewriting. When enabled, a large model is used to intelligently rewrite the input prompt. This significantly improves generation quality for shorter prompts, but increases processing time. true: default value, enables intelligent rewriting; false: disables intelligent rewriting.
    </ParamField>
  </Expandable>
</ParamField>

## Response Information

<ResponseField name="task_id" type="string" required={true}>
  Use task\_id to request the [Query Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
