POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/wan3.0-video"; const data = { "prompt": "The ocean waves roll gently onto the shore and spread across the wet, reflective sand as warm golden sunset light shimmers on the water. Sea foam bubbles and recedes, a soft breeze stirs the surface, and the seagulls glide and flap slowly across the glowing sky. Natural, realistic motion. Ambient sound of rolling ocean waves, gentle sea breeze, and distant seagull calls.", "image": "toB64('https://segmind-resources.s3.amazonaws.com/input/wan3.0-video-first-frame.jpg')", "last_frame": "toB64('undefined')", "reference_images": "toB64('undefined')", "reference_videos": "toB64('undefined')", "audio_url": "toB64('undefined')", "resolution": "720P", "duration": 5, "aspect_ratio": "16:9", "prompt_extend": true, "watermark": false, "audio": true, "enable_thinking": false }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Describe the video; up to 20,000 characters. Include motion and audio cues.


imageimage ( default: https://segmind-resources.s3.amazonaws.com/input/wan3.0-video-first-frame.jpg )

Start image for image-to-video. Use a clear, high-resolution frame.


last_frameimage ( default: 1 )

Optional end frame, max one image. Pair with first frame.


reference_imagesimage ( default: 1 )

Up to 10 images guiding subject, character or style. Add for consistency.


reference_videosimage ( default: 1 )

Up to 5 clips, 15 seconds total. Use to guide motion or edits.


audio_urlimage ( default: 1 )

Reference audio, up to 5 clips, 15 seconds total. Enables lip-sync.


resolutionenum:str ( default: 720P ) Affects Pricing

Output quality: 480P, 720P or 1080P; affects pricing. Use 1080P for final.

Allowed values:


durationint ( default: 5 ) Affects Pricing

Length 2 to 30 seconds; -1 auto-matches source. Longer suits full scenes.


aspect_ratioenum:str ( default: 16:9 )

Framing for text-to-video: 16:9, 9:16, 1:1, adaptive. Match your platform.

Allowed values:


negative_promptstr ( default: 1 )

Content to exclude, up to 500 characters. List unwanted objects or artifacts.


prompt_extendbool ( default: true )

Auto-rewrites short prompts for richer detail. Enable for brief inputs.


seedint ( default: 1 )

Integer 0 to 2147483647 for reproducible output. Fix to repeat a result.


watermarkbool ( default: 1 )

Adds an AI Generated watermark. Enable for disclosure or compliance.


audiobool ( default: true )

Generates a synced soundtrack in the same pass. No price change.


enable_thinkingbool ( default: 1 )

Model reasons before rendering; slower but sharper. Enable for complex prompts.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Wan 3.0 Video — All-in-One AI Video Generation Model

What is Wan 3.0 Video?

Wan 3.0 Video is Alibaba's all-in-one video generation model, the newest release in the Wan family from Tongyi Lab. Where earlier versions split the work across separate models, Wan 3.0 folds text-to-video, image-to-video, reference-to-video, and video editing into a single endpoint. You give it a prompt, a first and last frame, reference images, reference clips, reference audio, or even a document, and the model infers what you are asking for and renders it.

The headline change is length: Wan 3.0 generates up to 30 seconds of video in a single pass at 30fps, double its predecessor. That is long enough for continuous camera moves and one-take shot language instead of the short fragments most models cap out at. It also generates a native audio track alongside the video, in the same pass, with multilingual voice output.

Key Features

  • One model, four modes: text-to-video, image-to-video, reference-to-video, and video editing, selected automatically from the media you attach.
  • Up to 30-second single-pass generation, or -1 for smart duration that matches your prompt and source.
  • Native audio generated with the video, not dubbed on afterward.
  • 480P, 720P, and 1080P output across six aspect ratios plus an adaptive mode.
  • Rich inputs: first frame, last frame, up to 10 reference images, reference video or audio clips, and document references (PPT, PDF, DOC, XLS, and more).
  • First-and-last-frame control for precise shot framing.

Best Use Cases

Wan 3.0 fits filmmaking and short drama, social media and advertising, e-commerce product demos, character animation, and document-to-video workflows. The 30-second window lets a single generation hold a complete exchange, camera move, or transition without stitching. Reference-to-video keeps characters, props, spaces, and style consistent across shots, which suits branded content and recurring characters. Document input turns a slide deck, spreadsheet, or PDF into an explainer or promo in one upload, making it a practical tool for marketing and educational video.

Prompt Tips and Output Quality

Write cinematic, specific prompts: name the subject, the motion, the camera move, the lighting, and the ambient sound you want in the audio track. Keep prompt_extend on for short prompts so the model enriches detail automatically. Use first-and-last-frame control when you need an exact start and finish, and reference images for consistent identity. Output realism is strong on faces, micro-expressions, and reference fidelity; audio texture and on-screen text rendering are the areas Alibaba flags as still improving, so verify any in-frame typography.

FAQs

Can Wan 3.0 make videos longer than 30 seconds? A single pass tops out at 30 seconds. Longer narratives are built with the video extension capability rather than one call.

Does Wan 3.0 generate audio? Yes. Audio is on by default and produced in the same pass as the video, with multilingual voice output. Toggling audio does not change pricing.

What resolutions and aspect ratios are supported? 480P, 720P, and 1080P, with 16:9, 4:3, 1:1, 3:4, 9:16, and an adaptive ratio that follows your input.

What inputs can it take? Text, images (first frame, last frame, up to 10 reference images), reference video and audio clips, and documents such as PPT, PDF, DOC, and XLS.

Is there a 4K tier or open weights? No. Output caps at 1080P, and Alibaba has not published open weights for Wan 3.0; earlier Wan releases were the open ones.

How do I keep a character consistent across a shot? Supply reference images and, where possible, first-and-last-frame control, then check frame one against the final frame for identity drift.