LTX 2 Pro

This AI model enhances decision-making by generating actionable insights from complex data sets.

~62.68s
$0.450 - $3.00 per generation
 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

POSThttps://api.segmind.com/v1/ltx-2-pro

Parameters

promptrequired
string

Descriptive text to shape your video. Use detailed prompts for vivid storytelling.

durationoptional
integer

Choose video length. Short durations suit demos; longer ones for detailed scenes.

Default: 6
Allowed values :
6810
generate_audiooptional
boolean

Enable audio generation for an immersive experience. Use for interactive or detailed presentations.

Default: true
imageoptional
string (uri)

Optional image input for video generation. Use high-res JPEG or PNG for enhanced outputs.

resolutionoptional
string

Select video resolution. 1080p for web use, 4k for cinematic quality.

Default: "1080p"
Allowed values :
"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.

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