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

# Wan 2.7 — Text to Video

> Generate text to video outputs using Alibaba+'s Wan 2.7 model via PixelByte API

Generate text to video outputs with Alibaba+'s Wan 2.7 model. Submitted as an asynchronous job and delivered via webhook or polling.

| Property            | Value                                   |
| ------------------- | --------------------------------------- |
| **Provider**        | Alibaba+                                |
| **Model**           | Wan 2.7                                 |
| **Capability**      | Text to Video                           |
| **Base Cost**       | 150,000 micro-cents/second (\$0.15/sec) |
| **Processing Time** | \~200 seconds                           |

## Request Body

<ParamField body="model" type="string" required placeholder="alibaba-plus/wan-2.7/text-to-video">
  Model slug. Use `alibaba-plus/wan-2.7/text-to-video` for text to video generation.
</ParamField>

<ParamField body="input" type="object" required>
  Input parameters for text to video generation.

  <Expandable title="properties" defaultOpen>
    <ParamField body="prompt" type="string" required>
      Text description of the video to generate (max 5000 characters).
    </ParamField>

    <ParamField body="aspect_ratio" type="string">
      Output aspect ratio. Default: `"16:9"`. Options: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`.
    </ParamField>

    <ParamField body="audio_url" type="string">
      Optional audio guide.
    </ParamField>

    <ParamField body="negative_prompt" type="string">
      Text describing elements you want to avoid in the output (max 500 characters).
    </ParamField>

    <ParamField body="enable_prompt_expansion" type="boolean">
      Automatically expand the prompt for richer outputs. Default: `true`.
    </ParamField>

    <ParamField body="seed" type="integer">
      Random seed for reproducible generation.
    </ParamField>

    <ParamField body="duration" type="string">
      Video duration in seconds. Default: `"5"`. Options: `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`.
    </ParamField>

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

<ParamField body="webhookUrl" type="string">
  HTTPS URL to receive a webhook notification when the job completes or fails.
</ParamField>

## Pricing

**Base cost:** 150,000 micro-cents per second (\$0.15/sec)

```
finalCost = baseCost × resolution × duration
```

| Factor         | Option  | Multiplier |
| -------------- | ------- | ---------- |
| **Resolution** | `1080p` | 1.5x       |
|                | `720p`  | 1x         |
| **Duration**   | `2`     | 2x         |
|                | `3`     | 3x         |
|                | `4`     | 4x         |
|                | `5`     | 5x         |
|                | `6`     | 6x         |
|                | `7`     | 7x         |
|                | `8`     | 8x         |
|                | `9`     | 9x         |
|                | `10`    | 10x        |
|                | `11`    | 11x        |
|                | `12`    | 12x        |
|                | `13`    | 13x        |
|                | `14`    | 14x        |
|                | `15`    | 15x        |

<Tip>
  **Default cost:** 1080p resolution, 5 duration = 150,000 × 1.5 × 5 = **1,125,000 micro-cents (\$1.125)**
</Tip>

## Response

<ResponseField name="jobId" type="string">
  Unique identifier for the submitted job.
</ResponseField>

<ResponseField name="status" type="string">
  Initial job status. Always `"pending"` on successful submission.
</ResponseField>

<ResponseField name="estimatedCompletionTime" type="string">
  ISO 8601 timestamp of the estimated completion time.
</ResponseField>

<ResponseField name="costMicroCents" type="number">
  The cost of the job in micro-cents.
</ResponseField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.muvi.video/v1/jobs/submit \
    -H "Authorization: Bearer $PIXELBYTE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "alibaba-plus/wan-2.7/text-to-video",
      "input": {
        "prompt": "A serene lake at sunrise with mist rolling over the water",
        "aspect_ratio": "16:9",
        "duration": "5",
        "resolution": "1080p"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.muvi.video/v1/jobs/submit",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "model": "alibaba-plus/wan-2.7/text-to-video",
          "input": {
              "prompt": "A serene lake at sunrise with mist rolling over the water",
              "aspect_ratio": "16:9",
              "duration": "5",
              "resolution": "1080p"
          }
      }
  )

  data = response.json()
  print(data)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.muvi.video/v1/jobs/submit", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "alibaba-plus/wan-2.7/text-to-video",
      input: {
        prompt: "A serene lake at sunrise with mist rolling over the water",
        aspect_ratio: "16:9",
        duration: "5",
        resolution: "1080p"
      }
    })
  });

  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>
