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
42
43
const axios = require('axios');
const FormData = require('form-data');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/veo-3.1-fast";
const reqBody = {
"seed": 42,
"image": "https://segmind-resources.s3.amazonaws.com/input/b130a60c-8ee2-4962-b5be-b8b87ece92b7-691b7010-c304-4c07-a9b8-5e03f5e5435a.jpeg",
"prompt": "A hands-on workshop where participants are learning about Veo 3.1 Fast, presenter guiding them on laptops and tablets, modern classroom setup with projectors displaying reference images transforming into videos",
"duration": 8,
"last_frame": "https://segmind-resources.s3.amazonaws.com/input/0c6e38bc-ac47-4573-ace4-cf51c427962a-5af85fc2-bbbf-43ea-83b6-88cfd1e09374.jpeg",
"resolution": "1080p",
"aspect_ratio": "16:9",
"generate_audio": 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 randomness for generations. Use fixed seed for consistency.
Starting image for the video. For new designs, leave it empty.
Describe the video content. For abstract visuals, use 'Hypnotic fractal patterns'.
Length of video in seconds. Choose 4 for short intros.
Allowed values:
Ending image for smooth transitions. Leave empty for standalone videos.
Video clarity setting. Use '720p' for faster processing.
Allowed values:
Video's frame shape. Use '9:16' for vertical content.
Allowed values:
Add sound to video. Set false for silent clips.
Exclude specific elements in video. Leave blank for freeform.
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 on October 21, 2025.
Google Veo 3.1 Fast is an advanced AI model that creates dynamic 1080p videos with perfectly synchronized audio from static images. It is developed by Google DeepMind and offered through WaveSpeedAI, making it an excellent model to craft smooth, cinematic visuals while preserving the image's visual fidelity and layout. It is capable of producing natural movements, realistic lighting, and synchronized audio: ambient sounds, music, and dialogue with lip-syncing for an authentic immersive experience.
How does Google Veo 3.1 Fast handle audio synchronization? Veo 3.1 Fast automatically generates the video and precisely synchronizes audio with it, including ambient sounds and music. You can use the generate_audio parameter to control this feature.
What's the optimal video duration for social media content? 4-second duration is considered optimum for social media introductions and short-form content; use 6 or 8 seconds for more complex narratives.
Can I control the video's ending frame? Yes, you can specify the last_frame parameter for smooth transitions, especially useful when creating sequential content.
How does the aspect ratio affect video quality? 16:9 and 9:16 maintain high quality in the video output; the right aspect ratio for your platform ensures an optimal viewing experience without cropping.
Does the model preserve the original image's style? Yes, the model maintains the source image's artistic style, composition, and key visual elements while adding natural motion and lighting effects.