POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/luma-img-2-video"; const data = { "prompt": "circular pan shot showing perfume advertising", "start_frame": "https://segmind-sd-models.s3.amazonaws.com/display_images/luma-i2v-input.png", "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); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Prompt to render the video


start_framestr ( default: https://segmind-sd-models.s3.amazonaws.com/display_images/luma-i2v-input.png )

Starting frame of the generation


end_framestr ( default: 1 )

Ending frame of the generation


loopbool ( default: 1 )

Check this to loop the video


aspect_ratioenum:str ( default: 1:1 )

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 (Image to Video)

Luma’s Image-to-Video leverages state-of-the-art AI technology to convert visual inputs into high-fidelity video outputs. This tool is designed for professionals seeking to streamline their content creation process with precision and efficiency. The model can produce cinema-grade videos at 1080p resolution, ensuring that the generated content is visually stunning and suitable for professional use across various industries.

Key Features of Luma Image to Video

High-Fidelity Video Generation:

  • 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.

  • Image-to-Video: Upload static images to create dynamic video content, employing sophisticated image analysis and transformation algorithms.

Scalability and Efficiency

  • 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.

Creative and Technical Flexibility:

  • 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: Dream Machine 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.

Use Cases

  • 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.