LTX-2-19B T2V Serverless API
LTX-2 generates synchronized video and audio from multiple input types, revolutionizing multimedia content creation.
~102.69s
~$0.416
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ltx-2-19b-t2v"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A dynamic medium shot of a young Indian woman in casual streetwear walking quickly toward the camera through a modern tech office corridor, eyes wide with excitement, gesturing with her hands as she talks, bright daytime fluorescent lighting, smooth handheld tracking shot that keeps her centered in frame, colleagues and Segmind branding softly blurred in the background, natural office ambience as she walks and excitedly shouts in clear Indian English: 'L T X 2 video model is superfast, check it out its live on segmind'",
12 "negative_prompt": "blurry, low quality, still frame, frames, watermark, overlay, titles, has blurbox, has subtitles",
13 "width": 720,
14 "height": 1280,
15 "num_frames": 121,
16 "fps": 24,
17 "seed": 1234567890,
18 "guidance_scale": 4
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/ltx-2-19b-t2v"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A dynamic medium shot of a young Indian woman in casual streetwear walking quickly toward the camera through a modern tech office corridor, eyes wide with excitement, gesturing with her hands as she talks, bright daytime fluorescent lighting, smooth handheld tracking shot that keeps her centered in frame, colleagues and Segmind branding softly blurred in the background, natural office ambience as she walks and excitedly shouts in clear Indian English: 'L T X 2 video model is superfast, check it out its live on segmind'",
12 "negative_prompt": "blurry, low quality, still frame, frames, watermark, overlay, titles, has blurbox, has subtitles",
13 "width": 720,
14 "height": 1280,
15 "num_frames": 121,
16 "fps": 24,
17 "seed": 1234567890,
18 "guidance_scale": 4
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text)API Endpoint
POST
https://api.segmind.com/v1/ltx-2-19b-t2vParameters
promptrequiredstringPrompt describing the video scene
fpsoptionalintegerFrames per second
Default:
24Range: 1 - 30guidance_scaleoptionalnumberGuidance scale for prompt adherence
Default:
4Range: 1 - 20heightoptionalintegerHeight of the output video
Default:
768Range: 256 - 1280negative_promptoptionalstringNegative prompt to avoid certain elements
num_framesoptionalintegerNumber of frames to generate
Default:
161Range: 1 - 400seedoptionalintegerRandom seed for reproducibility
Default:
1234567890widthoptionalintegerWidth of the output video
Default:
1024Range: 256 - 1280Response Type
Returns: Video
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