LTX-Video

ltx-video

LTX-Video is the first DiT-based video generation model that can generate high-quality videos in real time

L40S 45GB
Fast Inference
REST API

Model Information

Response Time~21 sec
StatusActive
Version
0.0.1
Updated13 days ago

Prerequisites

  • Create an API Key from the Eachlabs Console
  • Install the required dependencies for your chosen language (e.g., requests for Python)

API Integration Steps

1. Create a Prediction

Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.

import requests
import time
API_KEY = "YOUR_API_KEY" # Replace with your API key
HEADERS = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
def create_prediction():
response = requests.post(
"https://api.eachlabs.ai/v1/prediction/",
headers=HEADERS,
json={
"model": "ltx-video",
"version": "0.0.1",
"input": {
"cfg": "3",
"seed": null,
"image": "your_file.image/jpeg",
"steps": "30",
"length": "97",
"prompt": "best quality, 4k, HDR, a tracking shot of a beautiful scene",
"target_size": "640",
"aspect_ratio": "3:2",
"negative_prompt": "low quality, worst quality, deformed, distorted"
}
}
)
prediction = response.json()
if prediction["status"] != "success":
raise Exception(f"Prediction failed: {prediction}")
return prediction["predictionID"]

2. Get Prediction Result

Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.

def get_prediction(prediction_id):
while True:
result = requests.get(
f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",
headers=HEADERS
).json()
if result["status"] == "success":
return result
elif result["status"] == "error":
raise Exception(f"Prediction failed: {result}")
time.sleep(1) # Wait before polling again

3. Complete Example

Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.

try:
# Create prediction
prediction_id = create_prediction()
print(f"Prediction created: {prediction_id}")
# Get result
result = get_prediction(prediction_id)
print(f"Output URL: {result['output']}")
print(f"Processing time: {result['metrics']['predict_time']}s")
except Exception as e:
print(f"Error: {e}")

Additional Information

  • The API uses a two-step process: create prediction and poll for results
  • Response time: ~21 seconds
  • Rate limit: 60 requests/minute
  • Concurrent requests: 10 maximum
  • Use long-polling to check prediction status until completion

Overview

The LTX-Video Model is a state-of-the-art generative model designed to produce high-quality video outputs based on user-defined inputs. It offers a range of customization options, enabling users to control the style, structure, and quality of the generated videos. The model excels at maintaining coherence across frames, generating visually appealing results tailored to specific creative needs.

Technical Specifications

Model Framework: LTX-Video is built upon advanced video generation architectures, designed to process prompts and reference images to create coherent video sequences.

Processing Engine: LTX-Video incorporates a diffusion-based pipeline that iteratively refines frames, ensuring visual consistency and realism.

Customizability: Users can adjust multiple inputs to tailor the output to specific needs, offering precise control over content generation.

Key Considerations

Resource Requirements: Higher values for parameters like steps or larger target sizes (e.g., 1024px) require more computational resources. Adjust these values based on available capacity.

Aspect Ratio and Target Size: Selecting mismatched aspect ratios and target sizes may lead to visual distortions or cropping issues.

Seed Value: Using a fixed seed ensures repeatability. Changing the seed generates diverse outputs for experimentation.

Tips & Tricks

Prompt for LTX-Video:

  • Write concise yet descriptive prompts to guide the model effectively.
  • Include key elements you want in the video, e.g., "A serene sunset over mountains."

Negative Prompt:

  • Use to exclude unwanted features. For example, "blurry," "grainy," or "oversaturated."

Target Size:

  • Best Practices:
    • Use 512 or 768 for faster processing and drafts.
    • Opt for 1024 for final outputs requiring high resolution.
  • Match the size to the intended display medium for optimal results.

Aspect Ratio:

  • Best Ratios by Use Case:
    • 1:1 for social media posts.
    • 16:9 for widescreen displays and professional presentations.
    • 9:16 for vertical content like stories or reels.
  • Avoid uncommon ratios unless necessary, as they may distort outputs.

Cfg:

  • Higher values (e.g., 15-20) generate outputs that strongly adhere to the prompt but might lack creative flexibility.
  • Moderate values (10-15) balance adherence and creativity.
  • Lower values (1-5) encourage experimental results but may drift from the prompt.

Steps:

  • Use lower values (10-20) for drafts to save time.
  • Higher values (30-50) yield refined, detailed outputs, suitable for final renders.

Length :

  • Match the length to your content needs. For short clips, use 97 or 129. For extended sequences, opt for higher values.
  • Be mindful of longer lengths requiring more processing time.

Seed:

  • Use the same seed value to recreate identical outputs. Randomize seeds to explore creative variations.

Capabilities

High-Quality Video Generation with LTX-Video: Create visually appealing videos based on detailed prompts.

Customizability: Tailor outputs to specific artistic needs using an extensive range of inputs.

Consistency Across Frames: Ensures smooth transitions and coherence within video sequences.

What can I use for?

Creative Projects: Generate custom video content for storytelling, advertisements, and presentations.

Social Media Content: Produce eye-catching clips optimized for various platforms.

Prototyping: Visualize concepts quickly and effectively for projects requiring visual inspiration.

Things to be aware of

Experiment with Seeds:

  • Generate diverse results by modifying the seed value while keeping other inputs constant.

Adjusting Cfg and Steps:

  • Balance between creativity and fidelity by experimenting with cfg values and steps.

Combining Prompts and Images:

  • Use both textual prompts and reference images for more nuanced outputs.

Negative Prompts:

  • Improve output quality by excluding undesirable features like "low resolution" or "noisy."

Optimizing Aspect Ratio and Target Size:

  • For cinematic content, combine 16:9 with 1024px. For social media stories, use 9:16 and 512px.

Limitations

Processing Time for LTX-Video: Higher parameter values can significantly increase the time required to generate outputs. Plan accordingly for complex projects.

Detail Complexity: Excessively complex prompts may overwhelm the model, leading to inconsistent results.

Aspect Ratio Compatibility: Outputs may appear distorted if aspect ratio and target size are mismatched.

Output Format: MP4

Related AI Models

wan-2.1-1.3b

Wan 2.1-1.3B

wan-2-1-1-3b

Text to Video
mochi-1

Mochi-1

mochi-1

Text to Video
video-crafter

Video Crafter

video-crafter

Text to Video
ray

Ray

ray

Text to Video