ApiframeApiframe Docs
Video GenerationWan

Wan 2.5

Generate videos from text or images using the Alibaba Wan 2.5 model with audio sync, prompt expansion, and multi-resolution support.

Use in Apiframe Studio

POST /v2/videos/generatemodel: "wan-2.5"

Combined text-to-video and image-to-video generation at 480p, 720p, or 1080p. Supports custom audio files for voice/music synchronization and automatic prompt optimization.

See Video Generation overview for common request fields, response format, and error codes.

Model-specific parameters

ParameterTypeRequiredDefaultDescription
wanParams.imagestringNoImage URL for image-to-video (omit for text-to-video)
wanParams.durationnumberNo5Video duration in seconds: 5 or 10
wanParams.resolutionstringNo"720p"Video resolution: "480p", "720p", "1080p"
wanParams.negative_promptstringNoElements to avoid in the generated video
wanParams.audiostringNoAudio file URL (wav/mp3, 3–30s, ≤15 MB) for synchronization
wanParams.enable_prompt_expansionbooleanNoEnable automatic prompt optimization
wanParams.seednumberNoRandom seed for reproducible generation

Credit cost

VariantCredits
480p-5s3
480p-10s5
720p-5s4
720p-10s7
1080p-5s6
1080p-10s10

Code examples

curl -X POST https://api.apiframe.ai/v2/videos/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cinematic slow-motion shot of a tiger running through tall grass at golden hour",
    "model": "wan-2.5",
    "wanParams": {
      "duration": 10,
      "resolution": "720p",
      "enable_prompt_expansion": true
    }
  }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/videos/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "A cinematic slow-motion shot of a tiger running through tall grass at golden hour",
        "model": "wan-2.5",
        "wanParams": {
            "duration": 10,
            "resolution": "720p",
            "enable_prompt_expansion": True,
        },
    },
)
print(response.json())
const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "A cinematic slow-motion shot of a tiger running through tall grass at golden hour",
    model: "wan-2.5",
    wanParams: {
      duration: 10,
      resolution: "720p",
      enable_prompt_expansion: true,
    },
  }),
});
console.log(await response.json());

Image-to-video

curl -X POST https://api.apiframe.ai/v2/videos/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "The person turns and smiles at the camera",
    "model": "wan-2.5",
    "wanParams": {
      "image": "https://example.com/portrait.jpg",
      "duration": 5,
      "resolution": "720p"
    }
  }'

Try it

POST/v2/videos/generateTry it

On this page