Luma Ray2 540p
Model Information
Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.
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 requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"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": "ray-2-540p","version": "0.0.1","input": {"loop": false,"prompt": "your prompt here","duration": "5","aspect_ratio": "16:9"}})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 resultelif 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 predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = 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: ~50 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Luma Ray2 540p model is a large-scale video generative model capable of creating realistic visuals with natural, coherent motion. It accepts text prompts to generate 5- or 9-second video clips at 540p resolution. The Luma Ray 2 540p demonstrates capabilities in generating realistic videos with coherent motion and detailed visuals based on text prompts
Technical Specifications
Model Architecture: Ray2 is built on Luma’s multi-modal architecture, representing a 10x compute scale increase from its predecessor, Ray1. The architecture improvements focus on motion coherence across video frames, detail preservation in generated content, logical sequencing of events, and multi-modal input processing.
Key Considerations
Input Quality: The quality of the generated video heavily depends on the clarity and descriptiveness of the input prompt.
Parameter Compatibility: Ensure that the selected duration and aspect ratio align with the content of your prompt to maintain visual coherence.
Looping: When enabling the loop option, consider how the beginning and end of the scene can connect seamlessly to avoid noticeable transitions
Legal Information for Ray
By using this Ray2, you agree to:
- Luma Privacy
- Luma Terms of Use
Tips & Tricks
Prompt
- Descriptive Language: Use vivid and specific language to detail the scene, actions, and atmosphere. For example, "A herd of wild horses galloping across a dusty desert plain under a blazing midday sun, their manes flying in the wind; filmed in a wide tracking shot with dynamic motion, warm natural lighting, and an epic."
- Scene Dynamics: Describe the motion and dynamics within the scene to guide the Luma Ray2 540p in generating coherent movement.
Duration
- 5 Seconds: Suitable for simple scenes or quick actions.
- 9 Seconds: Ideal for more complex scenes or narratives requiring extended viewing time.
Aspect Ratio
- 1:1: Square format, suitable for social media posts.
- 16:9: Standard widescreen format, ideal for most video content.
- 9:16: Vertical format, commonly used for mobile viewing.
Choose the aspect ratio that best fits the platform and audience for your video.
Loop
- Seamless Transitions: When enabling looping, design the scene so that the end flows naturally back to the beginning. This is effective for creating background loops or continuous animations.
Capabilities
- Natural Motion Synthesis: Generating videos with fluid and realistic movement.
- Physics-Based Simulations: Creating scenes that accurately depict physical phenomena.
- Photorealistic Detail Rendering: Producing high-fidelity visuals with attention to detail.
- Cinematic Scene Composition: Crafting visually appealing compositions with a cinematic feel.
What can I use for?
Content Creation: Developing engaging video content for social media, marketing, or storytelling.
Previsualization: Assisting in visualizing concepts for film, animation, or design projects.
Educational Materials: Creating illustrative videos to explain complex concepts or phenomena.
Artistic Exploration: Experimenting with visual ideas and bringing creative visions to life.
Things to be aware of
Experiment with Prompts: Test various descriptive prompts to see how the Luma Ray2 540p interprets different scenes and actions.
Adjust Aspect Ratios: Generate the same scene in different aspect ratios to determine which framing best suits your content.
Looping Videos: Create looping videos for use as dynamic backgrounds or seamless animations.
Limitations
Content Complexity: Highly complex scenes with numerous elements may not render as effectively and could result in less coherent outputs.
Abstract Concepts: The Luma Ray2 540p may struggle with abstract or highly imaginative prompts that lack clear visual references.
Resolution: Outputs are limited to 540p resolution, which may not be suitable for all use cases.
Output Format: MP4