In this article, I demonstrate how to create AI-generated videos using Luma Labs’ Dream Machine through a Make.com automation. By leveraging an unofficial API interface, we can integrate Luma Labs’ powerful text-to-video and image-to-video capabilities into our workflows, opening up new possibilities for content creation and automation.
This integration allows for seamless video generation within platforms like Airtable or Google Sheets, streamlining the content production process.
I go through the entire process in the video below:
Setting Up the Automation
To begin, I use GoAPI, an unofficial interface for Luma Labs. While I’m not affiliated with GoAPI, it’s important to note that using unofficial APIs may violate terms of service, so proceed with caution. For this project, I’m using the pay-per-use (PPU) mode with a hobbyist free plan.
Integration with Airtable
The automation is set up in Airtable, where I have a “Video to Process” field and corresponding chapters. The Make.com workflow searches for chapters with a specific parent video and processes them based on certain conditions.
API Endpoints
The main API endpoints we use are:
- Video generation endpoint
- Video extend API (for extending video duration)
- Fetch result endpoint
Workflow Process
The automation follows these steps:
- Fetch a chapter from Airtable
- Check for image or prompt availability
- Send a request to the Luma Labs API
- Wait for video generation (approximately 2-3 minutes)
- Fetch the generated video
- Update the Airtable record with the video URL
API Request Details
The API request is made using Make’s HTTP request module. We send a POST request to the video endpoint, including the API key and a JSON body with the necessary parameters such as prompt, initial frame image, and end frame image (if applicable).
Handling the Response
After sending the request, we parse the JSON response and extract the task ID. We then wait for about 3 minutes (the average generation time) before fetching the result using another API call.
Updating Airtable
Once the video is generated, we update the Airtable record with the new status and the video URL. Airtable then automatically downloads and uploads the video to its servers, making it available within the platform.
Results and Performance
The generated videos typically show good quality with minimal glitches. The AI model interprets the provided image or prompt to create appropriate motion in the video. While there might be some limitations (e.g., typing motions without screen changes), the overall results are impressive.
Accessing the Automation Templates
These Luma Labs automation templates will be available in our community for easy download and import into Make.com. You can find the link to access these templates in the video description.