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
38
39
40
41
const axios = require('axios');
const FormData = require('form-data');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/wan-2.5-t2v";
const reqBody = {
"seed": 42,
"size": "1280*720",
"prompt": "A vibrant young woman in her early 20s rushes toward the camera in Shibuya Crossing at night, ecstatic and wide-eyed, shouting passionately into a sleek silver microphone. She wears a bright orange bomber jacket and has wireless earbuds in her ears. She yells: “wan2.5 is live on Segmind — insane detail and flow, you gotta try it today!” rain-slicked crosswalks, glowing neon red-cyan-yellow billboards, blurred crowds in motion, cinematic handheld follow-shot, sharp face focus, shallow depth of field. 4K UHD, bold saturated tones, viral UGC vibe.",
"duration": 5,
"negative_prompt": "No rainy scenes.",
"enable_prompt_expansion": true
};
(async function() {
try {
const formData = new FormData();
// Append regular fields
for (const key in reqBody) {
if (reqBody.hasOwnProperty(key)) {
formData.append(key, reqBody[key]);
}
}
// Convert and append images as Base64 if necessary
const response = await axios.post(url, formData, {
headers: {
'x-api-key': api_key,
...formData.getHeaders()
}
});
console.log(response.data);
} catch (error) {
console.error('Error:', error.response ? error.response.data : error.message);
}
})();
Sets random seed for consistency. Use 42 for default or randomize for new results.
Determines video resolution. For high-quality use 1920x1080; for quick previews use 832x480.
Allowed values:
Upload audio for sync. Use a short loop for repetitive elements or music for dynamic output.
Input descriptive text for generation. Use vivid imagery for creative outputs or concise text for focused results.
Sets video length. Use 5s for short notes, 10s for comprehensive views.
Allowed values:
Avoid specific elements in output. Mention unwanted elements for clarity.
Toggle prompt enhancement. Use true for richer outputs or false for original input only.
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.
Edited by Segmind Team September 28, 2025.
Wan2.5-Preview is an exceptionally advanced AI model that boasts multimodal functionality to consolidate text, image, video, and audio generation within a unified system. This model produces high-resolution 1080p cinematic videos that can be up to 10 seconds long and synchronized, sans any faults, with multiple audio elements, such as voices, music, and sound effects. Wan2.5-Preview's architecture supports deep cross-modal alignment, making it ideal for professional-level multimedia content creation required by developers and creators across multiple fields.
How does Wan2.5-Preview handle audio synchronization?
What resolutions are supported?
Can I control the consistency of outputs?
How does prompt expansion work?
What types of image editing are supported? You can use dialog-based instructions to execute complex editing tasks, including style transfers, material changes, and multi-concept fusion.