> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelhunter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text to Video

> Generate a video from text using Wan 2.6 official async tasks.

## Body Parameters

<ParamField body="model" type="string" required>
  Wan model to use. In this phase:

  * `wan/2-6-text-to-video`
</ParamField>

<ParamField body="input" type="object" required>
  Input parameters for the generation.

  <Expandable title="properties">
    <ParamField body="prompt" type="string" required>
      Text description of the video to generate.
    </ParamField>

    <ParamField body="duration" type="string" default="5">
      Video length in seconds. Options: `5`, `10`, `15`.
    </ParamField>

    <ParamField body="resolution" type="string" default="1080p">
      Output resolution. Options: `720p`, `1080p`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="webhookUrl" type="string">
  URL to receive a webhook when the task completes.
</ParamField>

<ParamField body="metadata" type="object">
  Custom key-value metadata to attach to the task.
</ParamField>

<ResponseExample>
  ```json 202 theme={null}
  {
    "success": true,
    "data": {
      "id": "task_abc123",
      "status": "pending",
      "type": "text-to-video",
      "provider": "wan",
      "model": "wan/2-6-text-to-video",
      "created_at": "2026-03-04T10:00:00Z",
      "estimated_seconds": 45
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request parameters"
    }
  }
  ```
</ResponseExample>
