ApiframeDocs
Video GenerationWan

Wan 3.0

Generate videos with Alibaba's all-in-one Wan 3.0 model — text, first/last-frame, multimodal references, document or webpage input, native audio, 2–30 s at up to 1080p.

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

Alibaba's all-in-one video model: one model id covers text-to-video, first-and-last-frame image-to-video, reference-based generation (images, videos, and audio), and document / webpage-to-video. Single-pass clips of 2–30 seconds at 480p, 720p, or 1080p with a natively generated audio track.

The mode is selected automatically from the inputs:

  • No media inputs → text-to-video.
  • image (optionally last_frame) → image-to-video / first-and-last-frame.
  • reference_images / reference_videos / reference_audios → reference-based generation.
  • document or webpage → the model reads the file or page and turns it into a video.

Frame anchors (image / last_frame) are mutually exclusive with reference and document/webpage inputs, and document is mutually exclusive with webpage. prompt is optional when at least one media input is provided (up to 20,000 characters).

Reference-based generation and document/webpage input run on Alibaba Cloud infrastructure only; plain text-to-video also has automatic failover capacity.

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

Model-specific parameters

ParameterTypeRequiredDefaultDescription
wan30Params.imagestringNoFirst-frame image URL for I2V. Mutually exclusive with reference and document/webpage inputs.
wan30Params.last_framestringNoOptional last-frame image URL for first-and-last-frame generation. Requires image.
wan30Params.reference_imagesstring[]NoUp to 10 reference image URLs for character / object / scene anchoring.
wan30Params.reference_videosstring[]NoUp to 5 reference video URLs (1–15 s each, ≤ 15 s combined; combined reference + output duration must stay ≤ 30 s).
wan30Params.reference_audiosstring[]NoUp to 5 reference audio URLs (1–15 s each, ≤ 15 s combined) for voice / music anchoring.
wan30Params.documentstringNoURL of a document (pdf, docx, pptx, xlsx, txt, md, …; ≤ 100 MB, ≤ 50 pages) to turn into a video. Mutually exclusive with webpage.
wan30Params.webpagestringNoURL of a publicly accessible web page to turn into a video. Mutually exclusive with document.
wan30Params.resolutionstringNo"1080p"Output resolution: "480p", "720p", or "1080p".
wan30Params.aspect_ratiostringNo"adaptive"One of "adaptive", "16:9", "4:3", "1:1", "3:4", "9:16". "adaptive" lets the model pick from the inputs.
wan30Params.durationnumberNo5Video duration in seconds (integer, 2–30).
wan30Params.audio_enabledbooleanNotrueInclude a natively generated audio track. Does not affect pricing.
wan30Params.negative_promptstringNoElements to avoid in the generated video.
wan30Params.enable_prompt_expansionbooleanNoEnable automatic prompt optimization.
wan30Params.seednumberNoRandom seed for reproducible generation.

Credit cost

Pricing is per second of generated video (credits = rate × duration). Reference inputs, document/webpage input, and audio generation are free — only the output seconds are billed.

VariantCredits / second
480p6
720p13
1080p25

A 10-second clip at 1080p therefore costs 25 × 10 = 250 credits.

Example result

Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:

{
  "videoUrl": "https://cdn2.apiframe.ai/videos/b2c3d4e5-f6a7-8901-bcde-f23456789012.mp4"
}

See Result format for field details.

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-3.0",
    "wan30Params": {
      "duration": 10,
      "resolution": "1080p",
      "aspect_ratio": "16:9"
    }
  }'
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-3.0",
        "wan30Params": {
            "duration": 10,
            "resolution": "1080p",
            "aspect_ratio": "16:9",
        },
    },
)
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-3.0",
    wan30Params: {
      duration: 10,
      resolution: "1080p",
      aspect_ratio: "16:9",
    },
  }),
});
console.log(await response.json());

Image-to-video (with optional last frame)

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 to camera and smiles",
    "model": "wan-3.0",
    "wan30Params": {
      "image": "https://example.com/start.jpg",
      "last_frame": "https://example.com/end.jpg",
      "duration": 5,
      "resolution": "720p"
    }
  }'

Reference-based generation

Anchor characters, objects, scenes, motion, or voices with up to 10 reference images, 5 reference videos, and 5 reference audio clips:

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 character from the reference walks through a neon-lit street, speaking with the reference voice",
    "model": "wan-3.0",
    "wan30Params": {
      "reference_images": ["https://example.com/character.png"],
      "reference_audios": ["https://example.com/voice.mp3"],
      "duration": 10,
      "resolution": "1080p"
    }
  }'

Document or webpage to video

Turn a slide deck, report, or web article into a narrated video. prompt is optional — add one to steer style and focus:

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": "Summarize the key points as an energetic product teaser",
    "model": "wan-3.0",
    "wan30Params": {
      "document": "https://example.com/launch-deck.pdf",
      "duration": 20,
      "resolution": "1080p"
    }
  }'

Or from a public web page:

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 '{
    "model": "wan-3.0",
    "wan30Params": {
      "webpage": "https://example.com/blog/announcement",
      "duration": 15
    }
  }'

Try it

POST/v2/videos/generateTry it

On this page