1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/luma-txt-2-video";
const data = {
"prompt": "An arc shot around an old wizard casting a spell, glowing energy swirling around them as the camera moves in a circular path.",
"loop": false,
"aspect_ratio": "1:1"
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
Prompt to render a video
Check this to loop the video
Aspect ratio for output video
Allowed values:
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Luma Video (Text to Video) is a state-of-the-art AI model that revolutionizes video creation by transforming text prompts into high-quality, realistic videos. This innovative tool is tailored for content creators, marketers, and educators seeking to enhance their storytelling capabilities through dynamic visual narratives.
Luma's Dream Machine competes with leading models like OpenAI's Sora and Kuaishou's Kling by providing high-resolution video creation (up to 1080p) and realistic motion simulation.
Realistic Visuals: Utilizing advanced neural networks, Dream Machine generates videos with high accuracy in motion dynamics, object interactions, and environmental consistency.
Rapid Processing: Capable of producing 120 frames in 120 seconds, facilitating quick iterations and extensive experimentation.
Text-to-Video: Simply input your text, and watch as Dream Machine transforms it into a captivating video
Transformer-Based Architecture: Built on a transformer model trained on extensive video datasets, ensuring scalability and computational efficiency.
Universal Imagination Engine: Represents the initial phase of Luma’s broader initiative to develop a comprehensive imagination engine capable of diverse content generation tasks.
Cinematic Quality: Incorporates advanced camera motion algorithms to produce fluid, cinematic video sequences that align with the narrative and emotional tone of the input.
Versatile Camera Movements: The model allows users to experiment with a variety of fluid and naturalistic camera motions that align with the emotional tone and content of the scene. This flexibility enhances the storytelling aspect, enabling creators to convey their message more effectively. Just type the word "camera" followed by direction in your text prompt. Some camera motions you can try: Move Left/Right, Move Up/Down, Push In/Out, Pan Left/Right, Orbit Left/Right, Crane Up/Down.
Flexible Aspect Ratios: Luma Video supports various video aspect ratios, allowing creators to tailor their outputs for different platforms, from social media to widescreen presentations. This flexibility is crucial for meeting diverse content needs
Marketing Campaigns: Create engaging promotional videos that resonate with your target audience.
Educational Content: Transform educational materials into visually appealing videos that enhance learning experiences.
Social Media: Generate eye-catching content for platforms like Instagram, TikTok, and YouTube to increase engagement.