LTX 2.5 Fast Serverless API
Text-to-video and image-to-video with native audio, up to 4K.
POST /v2/ltx-2.5-fast · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
4
5# Async (v2) — recommended for long-running / video models.
6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
7# deadline and keeps the request_id so you can re-poll later.
8client = SegmindClient() # reads SEGMIND_API_KEY
9payload = {
10 "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",
11 "aspect_ratio": "16:9",
12 "resolution": "1080p",
13 "duration": 6,
14 "fps": 24,
15 "generate_audio": True,
16 "camera_motion": "auto",
17}
18job = client.submit_async("ltx-2.5-fast", **payload)
19print(job.request_id) # available immediately
20try:
21 result = job.wait(timeout=900, interval=2.0)
22 print(result["status"]) # COMPLETED
23 print(result.get("output")) # model output (e.g. video URL)
24except InferenceTimeout as e:
25 print("still running:", e.request_id) # re-poll later with this id
26except InferenceFailed as e:
27 print("failed:", e.detail)
28
29# Fast models (<=600s) can use the one-liner instead:
30# result = segmind.run("ltx-2.5-fast", **payload) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
4
5# Async (v2) — recommended for long-running / video models.
6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
7# deadline and keeps the request_id so you can re-poll later.
8client = SegmindClient() # reads SEGMIND_API_KEY
9payload = {
10 "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",
11 "aspect_ratio": "16:9",
12 "resolution": "1080p",
13 "duration": 6,
14 "fps": 24,
15 "generate_audio": True,
16 "camera_motion": "auto",
17}
18job = client.submit_async("ltx-2.5-fast", **payload)
19print(job.request_id) # available immediately
20try:
21 result = job.wait(timeout=900, interval=2.0)
22 print(result["status"]) # COMPLETED
23 print(result.get("output")) # model output (e.g. video URL)
24except InferenceTimeout as e:
25 print("still running:", e.request_id) # re-poll later with this id
26except InferenceFailed as e:
27 print("failed:", e.detail)
28
29# Fast models (<=600s) can use the one-liner instead:
30# result = segmind.run("ltx-2.5-fast", **payload)API Endpoint
https://api.segmind.com/v1/ltx-2.5-fastParameters
promptrequiredstringText description of the scene, action, camera and sound. Put spoken dialogue in quotes.
"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"aspect_ratiooptionalstringOutput orientation, 16:9 or 9:16. Use 9:16 for social, 16:9 for landscape.
"16:9""16:9""9:16"camera_motionoptionalstringForces a camera move or auto. Use auto to let the prompt drive the camera.
"auto""auto""static""dolly_in""dolly_out""dolly_left""dolly_right""jib_up""jib_down""focus_shift"durationoptionalintegerClip length in seconds, 6 to 20. Higher resolutions and fps cap at 10.
668101214161820fpsoptionalintegerFrame rate; 24/25 cinematic, 48/50 smoother. 48/50 cap duration at 10 seconds.
2424254850generate_audiooptionalbooleanToggles a synchronized audio track. Keep on for native sound, off for silent video.
trueimageoptionalstring (uri)Optional first frame; switches to image-to-video. Use a high-resolution JPEG or PNG.
"https://segmind-resources.s3.amazonaws.com/input/ltx-2.5-fast-input-frame.jpg"last_frame_urioptionalstring (uri)Optional closing frame for image-to-video; interpolates to it. Cannot combine with automatic duration.
nullresolutionoptionalstringVideo resolution from 720p up to 4k. Use 1080p for social, 4k for finishing.
"1080p""720p""1080p""2k""4k"Response Type
Returns: Video
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/ltx-2.5-fastSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out