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)

API Endpoint

POSThttps://api.segmind.com/v1/ltx-2.5-fast

Parameters

promptrequired
string

Text description of the scene, action, camera and sound. Put spoken dialogue in quotes.

Default: "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_ratiooptional
string

Output orientation, 16:9 or 9:16. Use 9:16 for social, 16:9 for landscape.

Default: "16:9"
Allowed values :
"16:9""9:16"
camera_motionoptional
string

Forces a camera move or auto. Use auto to let the prompt drive the camera.

Default: "auto"
Allowed values :
"auto""static""dolly_in""dolly_out""dolly_left""dolly_right""jib_up""jib_down""focus_shift"
durationoptional
integer

Clip length in seconds, 6 to 20. Higher resolutions and fps cap at 10.

Default: 6
Allowed values :
68101214161820
fpsoptional
integer

Frame rate; 24/25 cinematic, 48/50 smoother. 48/50 cap duration at 10 seconds.

Default: 24
Allowed values :
24254850
generate_audiooptional
boolean

Toggles a synchronized audio track. Keep on for native sound, off for silent video.

Default: true
imageoptional
string (uri)

Optional first frame; switches to image-to-video. Use a high-resolution JPEG or PNG.

Default: "https://segmind-resources.s3.amazonaws.com/input/ltx-2.5-fast-input-frame.jpg"
last_frame_urioptional
string (uri)

Optional closing frame for image-to-video; interpolates to it. Cannot combine with automatic duration.

Default: null
resolutionoptional
string

Video resolution from 720p up to 4k. Use 1080p for social, 4k for finishing.

Default: "1080p"
Allowed values :
"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. 1
    POST /v2/ltx-2.5-fast

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • 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.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out