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
const axios = require('axios');
const FormData = require('form-data');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/ltx-2-pro";
const reqBody = {
"image": "https://segmind-resources.s3.amazonaws.com/input/89461106-6e0f-4441-8b7d-4b641de2d3e8-771eb2d7-7670-4e31-a6ca-559e333f4ae8_1.png",
"prompt": "First Person View: Slow fly camera follow eagle shakes subtly from wind and movement, GoPro-style action, adrenaline rush, fast and fluid action, cinematic movement over a great Egyptian city like Alexandria with view of sea",
"duration": 6,
"resolution": "1080p",
"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);
}
})();Optional image input for video generation. Use high-res JPEG or PNG for enhanced outputs.
Descriptive text to shape your video. Use detailed prompts for vivid storytelling.
Choose video length. Short durations suit demos; longer ones for detailed scenes.
Allowed values:
Select video resolution. 1080p for web use, 4k for cinematic quality.
Allowed values:
Enable audio generation for an immersive experience. Use for interactive or detailed presentations.
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 31, 2025.
LTX-2, developed by Lightricks, is an advanced text-to-video AI model that transforms text into videos specifically built for professional-level production environments. It is an ideal option that generates dynamic videos with synced audio to visualize your brainstorming sessions that require quick ideas, developing refined previews for presentations, or producing cinematic 4K-quality clips. LTX-2 is available in three distinct variants, i.e., Fast, Pro, and Ultra, each catering to different phases of the creative production process. These vital aspects together make it a versatile AI video creation model perfect for the creative needs of studios, brands, filmmakers, and creative agencies.
Write Effective Prompts: Provide prompts that are descriptive and detailed, also include mood, lighting, movement, and cinematic terms.
Example: "A sunrise over a tranquil sea with gentle waves and warm light reflections", yields better results than a simple prompt such as,"Ocean sunrise."
Parameter Optimization:
Is LTX-2 open-source?
No, LTX-2 is a proprietary AI model and available via API for professional use.
How does LTX-2 differ from other video AI models? LTX-2 is optimized for production workflows, with distinct variants: Fast, Pro, and Ultra, with native audio synthesis and professional-grade 4K output.
What’s the difference between Fast, Pro, and Ultra?
The model has three variants that cater to distinct requirements: Fast prioritizes speed for ideation, Pro provides polished client-ready previews, and Ultra (coming soon) delivers cinematic 4K at 50fps.
Can I use my own images as input?
Yes, LTX-2 supports the option for image-to-video generation with high-resolution JPEG or PNG images.
What resolution is recommended for social media?
1080p resolution produces excellent quality and faster generation, making it optimal for web and mobile platforms.
Does LTX-2 generate audio automatically?
You can enable the audio generation using the generate_audio parameter for an immersive, fully synced audio-video output.