Skip to content

Wan

Wan 2.6 video models for creative scenes and structured camera prompts.

API surface

OperationEndpointMode
Video generation taskPOST /v1/async/videos/generationsAsync only

Models

Model idNotes
wan2.6Text-to-video and image-to-video. seconds only 5 / 10 / 15. Default resolution 1080p.
wan2.6-flashRequires image-to-video or reference video (image or providerOptions.metadata.reference_urls). Default resolution 1080p. Default audio on.

Pricing

Billed as n × seconds × rate(resolution) credits.

Model720p1080p
wan2.6-flash5/sec8/sec
wan2.69/sec15/sec

Request fields

FieldTypeRequiredDescription
modelstringYeswan2.6 or wan2.6-flash.
promptstringYes1–2000 characters.
secondsintegerYes5 / 10 / 15.
resolutionstringNo720p or 1080p (default 1080p).
nintegerNoDefault 1.
imagestring | string[]ConditionalRequired for typical wan2.6-flash image-to-video.
providerOptionsobjectNoOptional model extensions. See providerOptions below.

providerOptions

FieldTypeDescription
aspect_ratiostring16:9 / 9:16 / 1:1 / 4:3 / 3:4.
audiobooleanWhether to generate audio. wan2.6-flash defaults to audio on.
shot_typestringShot / camera style hint passed to upstream.
negative_promptstringContent to avoid.
seedintegerRandom seed for more reproducible results.
prompt_extendbooleanWhether to expand / rewrite the prompt upstream.
watermarkbooleanWhether to add a watermark.
metadataobjectPassthrough fields. Use metadata.reference_urls for reference videos (required for typical wan2.6-flash reference-video workflows).

Example

bash
curl https://api.pixapi.ai/v1/async/videos/generations \
  -H "Authorization: Bearer $PIXAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan2.6",
  "prompt": "A quiet morning street with soft sunlight and gentle camera drift",
  "n": 1,
  "seconds": 5,
  "resolution": "1080p",
  "providerOptions": {
    "aspect_ratio": "16:9"
  }
}'
py
import os
import requests

response = requests.post(
    "https://api.pixapi.ai/v1/async/videos/generations",
    headers={
        "Authorization": f"Bearer {os.environ['PIXAPI_KEY']}",
        "Content-Type": "application/json",
    },
    json={
    "model": "wan2.6",
    "prompt": "A quiet morning street with soft sunlight and gentle camera drift",
    "n": 1,
    "seconds": 5,
    "resolution": "1080p",
    "providerOptions": {
        "aspect_ratio": "16:9"
    }
},
)
response.raise_for_status()
task = response.json()
print(task["id"])
js
const response = await fetch('https://api.pixapi.ai/v1/async/videos/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "model": "wan2.6",
  "prompt": "A quiet morning street with soft sunlight and gentle camera drift",
  "n": 1,
  "seconds": 5,
  "resolution": "1080p",
  "providerOptions": {
    "aspect_ratio": "16:9"
  }
}),
});

if (!response.ok) {
  throw new Error(await response.text());
}

const task = await response.json();
console.log(task.id);
go
package main

import (
  "bytes"
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  body := []byte(`{
  "model": "wan2.6",
  "prompt": "A quiet morning street with soft sunlight and gentle camera drift",
  "n": 1,
  "seconds": 5,
  "resolution": "1080p",
  "providerOptions": {
    "aspect_ratio": "16:9"
  }
}`)

  req, err := http.NewRequest(
    "POST",
    "https://api.pixapi.ai/v1/async/videos/generations",
    bytes.NewBuffer(body),
  )
  if err != nil {
    panic(err)
  }
  req.Header.Set("Authorization", "Bearer "+os.Getenv("PIXAPI_KEY"))
  req.Header.Set("Content-Type", "application/json")

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    panic(err)
  }
  defer resp.Body.Close()

  result, _ := io.ReadAll(resp.Body)
  fmt.Println(string(result))
}

Response

Pixapi returns a submitted task. Poll GET /v1/tasks/{id} for the final result.