LTX 2 Pro
This AI model enhances decision-making by generating actionable insights from complex data sets.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ltx-2-pro"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://segmind-resources.s3.amazonaws.com/input/89461106-6e0f-4441-8b7d-4b641de2d3e8-771eb2d7-7670-4e31-a6ca-559e333f4ae8_1.png",
12 "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",
13 "duration": 6,
14 "resolution": "1080p",
15 "generate_audio": true
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/ltx-2-pro"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://segmind-resources.s3.amazonaws.com/input/89461106-6e0f-4441-8b7d-4b641de2d3e8-771eb2d7-7670-4e31-a6ca-559e333f4ae8_1.png",
12 "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",
13 "duration": 6,
14 "resolution": "1080p",
15 "generate_audio": true
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text)API Endpoint
https://api.segmind.com/v1/ltx-2-proParameters
promptrequiredstringDescriptive text to shape your video. Use detailed prompts for vivid storytelling.
durationoptionalintegerChoose video length. Short durations suit demos; longer ones for detailed scenes.
66810generate_audiooptionalbooleanEnable audio generation for an immersive experience. Use for interactive or detailed presentations.
trueimageoptionalstring (uri)Optional image input for video generation. Use high-res JPEG or PNG for enhanced outputs.
resolutionoptionalstringSelect video resolution. 1080p for web use, 4k for cinematic quality.
"1080p""1080p""2k""4k"Response Type
Returns: Video
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