Appearance
wan2.7-t2v
Request parameters and examples for wan2.7-t2v.
POST /v1/async/videos/generations
Send JSON with Authorization: Bearer <PIXAPI_KEY> and Content-Type: application/json.
Request fields
Send the common fields at the top level. Put the model-specific controls listed below inside providerOptions.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | wan2.7-t2v |
prompt | string | Yes | Describe motion, scene, camera, and dialogue; at most 5,000 characters. |
seconds | integer | Yes | Integer 2–15 seconds; explicitly required. |
resolution | string | No | 720p / 1080p. Pixapi default: 1080p. |
n | integer | No | Default 1; only integer 1 is supported. |
image | string / string[] | No | Not supported; this is a text-to-video model. |
providerOptions | object | No | Model-specific options; see the table below. |
providerOptions
All fields in this table are nested inside providerOptions, not alongside model.
| Field | Type | Description |
|---|---|---|
aspect_ratio | string | 16:9, 9:16, 1:1, 4:3, 3:4. Default 16:9; image-to-video follows the input image ratio. |
seed | integer | Random seed, 0–2147483647; omitted means random. The same seed does not guarantee identical output. |
prompt_extend | boolean | Rewrite and expand the prompt for generation; default true. |
watermark | boolean | Add a visible AI watermark. Default false. |
negative_prompt | string | Content to exclude; at most 500 characters. |
audio_url | string | Public WAV/MP3 URL for synchronized audio. Input audio should be at least as long as the requested video; longer audio is trimmed. Not supported in reference mode. |
Input rules
All media must be publicly accessible HTTP(S) URLs. No Base64, local paths, or external asset IDs. seconds must be a positive number.
Example
bash
curl https://api.pixapi.ai/v1/async/videos/generations \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-t2v",
"prompt": "A cinematic scene with smooth camera motion",
"seconds": 5,
"resolution": "720p",
"n": 1,
"providerOptions": {
"prompt_extend": true,
"watermark": false
}
}'py
import os
import requests
response = requests.post(
"https://api.pixapi.ai/v1/async/videos/generations",
headers={"Authorization": f"Bearer {os.environ['PIXAPI_KEY']}"},
json={
"model": "wan2.7-t2v",
"prompt": "A cinematic scene with smooth camera motion",
"seconds": 5,
"resolution": "720p",
"n": 1,
"providerOptions": {
"prompt_extend": True,
"watermark": False
}
},
)
response.raise_for_status()
print(response.json())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.7-t2v",
"prompt": "A cinematic scene with smooth camera motion",
"seconds": 5,
"resolution": "720p",
"n": 1,
"providerOptions": {
"prompt_extend": true,
"watermark": false
}
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());go
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"model": "wan2.7-t2v",
"prompt": "A cinematic scene with smooth camera motion",
"seconds": 5,
"resolution": "720p",
"n": 1,
"providerOptions": {
"prompt_extend": true,
"watermark": false
}
}`)
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, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
if resp.StatusCode >= 400 { panic(string(result)) }
fmt.Println(string(result))
}For asynchronous requests, save the returned id and poll GET /v1/tasks/{id} until completed or failed. See task results and billing.
