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
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/ltx-2.5-fast";
const data = {
"prompt": "The lighthouse beam sweeps out over the stormy sea as towering waves crash against the dark rocks below, sea spray bursts into the air and heavy storm clouds drift across the sky, birds wheeling in the wind; the deep roar of the ocean, crashing waves and howling wind fill the scene, cinematic wide shot",
"image": "toB64('undefined')",
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 6,
"fps": 24,
"generate_audio": true,
"camera_motion": "auto",
"last_frame_uri": "toB64('undefined')"
};
(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);
}
})();Text description of the scene, action, camera and sound. Put spoken dialogue in quotes.
Optional first frame; switches to image-to-video. Use a high-resolution JPEG or PNG.
Output orientation, 16:9 or 9:16. Use 9:16 for social, 16:9 for landscape.
Allowed values:
Video resolution from 720p up to 4k. Use 1080p for social, 4k for finishing.
Allowed values:
Clip length in seconds, 6 to 20. Higher resolutions and fps cap at 10.
Allowed values:
Frame rate; 24/25 cinematic, 48/50 smoother. 48/50 cap duration at 10 seconds.
Allowed values:
Toggles a synchronized audio track. Keep on for native sound, off for silent video.
Forces a camera move or auto. Use auto to let the prompt drive the camera.
Allowed values:
Optional closing frame for image-to-video; interpolates to it. Cannot combine with automatic duration.
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.
LTX 2.5 Fast is the speed-optimized variant of LTX-2.5, the open-weights video foundation model from LTX (the world-model company spun out of Lightricks). It turns a text prompt or a still image into a finished clip with synchronized native audio, in portrait or landscape, at resolutions up to 4K and lengths up to 20 seconds. Where the Pro variant targets maximum fidelity at 1080p, Fast is built for rapid iteration and production-volume generation — the same generation quality with fewer retries and far lower latency, so you can batch variations and refresh creative quickly.
Because both text-to-video and image-to-video run through one endpoint, you can start from a written scene or animate an existing frame. Add a closing frame with last_frame_uri to control exactly where an image-to-video clip lands.
LTX 2.5 Fast fits short-form social video for TikTok, Reels and Shorts, product and ad creative, previsualization, and explainer content. Its multi-shot consistency makes it usable for campaign sequences that need a character to hold shot to shot, and its speed makes overnight batch generation and rapid A/B iteration practical rather than theoretical.
Write present-tense, single-subject scenes of roughly 4–8 sentences. Establish the shot, set lighting and atmosphere, describe the action as one flowing sequence, and describe the audio — place spoken dialogue in quotation marks. For multi-shot prompts, name each cut (hard cut, match cut, dissolve), re-establish the new framing, and state whether music or dialogue carries across. Keep on-screen text short and prominent; exact spelling across frames is not guaranteed, so add critical titles or logos in post.
Is LTX 2.5 Fast text-to-video or image-to-video? Both. Provide a prompt alone for text-to-video, or add an image to switch to image-to-video.
Does it generate audio? Yes — a synchronized audio track is produced by default. Set generate_audio to false for silent video.
What is the maximum resolution and length? Up to 4K and up to 20 seconds, though 2K, 4K and 48/50 fps cap duration at 10 seconds.
How do multi-shot scenes work? One prompt can describe several shots joined by explicit cuts; the model keeps characters and style consistent across them.
How is Fast different from Pro? Fast reaches up to 4K and prioritizes speed and low latency; Pro tops out at 1080p and prioritizes fidelity.
Can I control where a clip ends? Yes, on image-to-video supply last_frame_uri — but it cannot be combined with automatic duration.