Appearance
Wan
Wan 2.6 video models for creative scenes and structured camera prompts.
API surface
| Operation | Endpoint | Mode |
|---|---|---|
| Video generation task | POST /v1/async/videos/generations | Async only |
Models
| Model id | Notes |
|---|---|
wan2.6 | Text-to-video and image-to-video. seconds only 5 / 10 / 15. Default resolution 1080p. |
wan2.6-flash | Requires 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.
| Model | 720p | 1080p |
|---|---|---|
wan2.6-flash | 5/sec | 8/sec |
wan2.6 | 9/sec | 15/sec |
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | wan2.6 or wan2.6-flash. |
prompt | string | Yes | 1–2000 characters. |
seconds | integer | Yes | 5 / 10 / 15. |
resolution | string | No | 720p or 1080p (default 1080p). |
n | integer | No | Default 1. |
image | string | string[] | Conditional | Required for typical wan2.6-flash image-to-video. |
providerOptions | object | No | Optional model extensions. See providerOptions below. |
providerOptions
| Field | Type | Description |
|---|---|---|
aspect_ratio | string | 16:9 / 9:16 / 1:1 / 4:3 / 3:4. |
audio | boolean | Whether to generate audio. wan2.6-flash defaults to audio on. |
shot_type | string | Shot / camera style hint passed to upstream. |
negative_prompt | string | Content to avoid. |
seed | integer | Random seed for more reproducible results. |
prompt_extend | boolean | Whether to expand / rewrite the prompt upstream. |
watermark | boolean | Whether to add a watermark. |
metadata | object | Passthrough 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.
