Input
POST https://gateway.appypie.com/lumalabs-ai/v1/generate HTTP/1.1

Content-Type: application/json
Cache-Control: no-cache

{
    "prompt": "A giant floating jellyfish gliding over a city skyline, its tentacles glowing softly in the night.",
    "aspect_ratio": "16:9",
    "loop": true
}
import urllib.request, json

try:
    url = "https://gateway.appypie.com/lumalabs-ai/v1/generate"

    hdr ={
    # Request headers
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    }

    # Request body
    data =  
    data = json.dumps(data)
    req = urllib.request.Request(url, headers=hdr, data = bytes(data.encode("utf-8")))

    req.get_method = lambda: 'POST'
    response = urllib.request.urlopen(req)
    print(response.getcode())
    print(response.read())
    except Exception as e:
    print(e)
// Request body
const body = {
    "prompt": "A giant floating jellyfish gliding over a city skyline, its tentacles glowing softly in the night.",
    "aspect_ratio": "16:9",
    "loop": true
};

fetch('https://gateway.appypie.com/lumalabs-ai/v1/generate', {
        method: 'POST',
        body: JSON.stringify(body),
        // Request headers
        headers: {
            'Content-Type': 'application/json',
            'Cache-Control': 'no-cache',}
    })
    .then(response => {
        console.log(response.status);
        console.log(response.text());
    })
    .catch(err => console.error(err));
curl -v -X POST "https://gateway.appypie.com/lumalabs-ai/v1/generate" -H "Content-Type: application/json" -H "Cache-Control: no-cache" --data-raw "{
    \"prompt\": \"A giant floating jellyfish gliding over a city skyline, its tentacles glowing softly in the night.\",
    \"aspect_ratio\": \"16:9\",
    \"loop\": true
}"
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import java.io.UnsupportedEncodingException;
import java.io.DataInputStream;
import java.io.InputStream;
import java.io.FileInputStream;

public class HelloWorld {

  public static void main(String[] args) {
    try {
        String urlString = "https://gateway.appypie.com/lumalabs-ai/v1/generate";
        URL url = new URL(urlString);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();

        //Request headers
    connection.setRequestProperty("Content-Type", "application/json");
    
    connection.setRequestProperty("Cache-Control", "no-cache");
    
        connection.setRequestMethod("POST");

        // Request body
        connection.setDoOutput(true);
        connection
            .getOutputStream()
            .write(
             "{ \"prompt\": \"A giant floating jellyfish gliding over a city skyline, its tentacles glowing softly in the night.\", \"aspect_ratio\": \"16:9\", \"loop\": true }".getBytes()
             );
    
        int status = connection.getResponseCode();
        System.out.println(status);

        BufferedReader in = new BufferedReader(
            new InputStreamReader(connection.getInputStream())
        );
        String inputLine;
        StringBuffer content = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            content.append(inputLine);
        }
        in.close();
        System.out.println(content);

        connection.disconnect();
    } catch (Exception ex) {
      System.out.print("exception:" + ex.getMessage());
    }
  }
}
$url = "https://gateway.appypie.com/lumalabs-ai/v1/generate";
$curl = curl_init($url);

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

# Request headers
$headers = array(
    'Content-Type: application/json',
    'Cache-Control: no-cache',);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

# Request body
$request_body = '{
    "prompt": "A giant floating jellyfish gliding over a city skyline, its tentacles glowing softly in the night.",
    "aspect_ratio": "16:9",
    "loop": true
}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $request_body);

$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
Output

Luma Dream Machine: Generate High-Quality Videos Quickly Using Text

meta

The Luma Dream Machine is a breakthrough tool designed for creators seeking to produce high-quality videos rapidly. By using simple text inputs, this powerful tool converts written prompts into visually captivating video content, ready to engage audiences. Ideal for content creators, marketers, and developers, the Luma Dream Machine makes it easier than ever to bring text-to-video dreams to life, helping users create engaging, immersive videos that stand out. Perfect for social media campaigns, digital storytelling, and brand promotions, the Luma Dream Machine is optimized for fast, high-quality video production, delivering professional results with minimal effort.

For brands aiming to captivate audiences, the Luma Dream Machine API is essential. It integrates seamlessly with websites, apps, and other digital platforms, streamlining content creation and distribution across channels. This ease of use and fast turnaround make it invaluable for brands that want to generate eye-catching visuals without the burden of extensive production time or costs. Whether launching a campaign, promoting a product, or sharing a story, the Luma Dream Machine API empowers users to elevate their content strategy, driving engagement and distinguishing their brand through unique, dream-inspired video content that captures attention and leaves a lasting impact.

How to Generate Video Using Luma Dream Machine(T2V) API?

To generate videos using the Luma Dream Machine Text-to-Video (T2V) API through Appy Pie Endpoint, follow these steps:

generate_01

Obtain API Access

Register on Appy Pie Endpoint to receive an API key for authentication.

generate_02

Set Up Your Development Environment

Choose a programming language such as Python or JavaScript. Install the necessary libraries and configure your environment to handle HTTP requests.

generate_04

Customize the API Parameters

Define the text prompt for video generation. Customize additional parameters like aspect ratio, loop settings, and keyframes to control the output.

generate_03

Send the API Request

Use your chosen programming language to create an HTTP request to the Luma Dream Machine API endpoint via Appy Pie Endpoint. Include your API key, the text prompt, and any customized parameters.

Use Cases of Luma Dream Machine API

cases_1

Boosting Social Media Engagement with Video Content

The Luma Dream Machine API allows brands to craft visually captivating videos from text prompts, making it easier to stand out on crowded social media feeds. Ideal for short-form videos, reels, or stories, this API helps businesses quickly create eye-catching video content that drives likes, comments, and shares. It transforms simple text into memorable visuals that resonate with audiences, boosting social media engagement.

cases_2

Creating Interactive Digital Stories

With the Luma Dream Machine API, writers and creators can bring their stories to life as immersive digital experiences. By transforming written ideas into compelling video content, the API is perfect for digital storytelling in blogs, multimedia articles, and personal storytelling projects. This feature enables audiences to engage with interactive storytelling, adding new depth to narrative content.

cases_3

Elevating Product and Service Showcases

The Luma Dream Machine API is invaluable for marketers aiming to showcase products dynamically. By generating high-quality, visually appealing videos from text, brands can highlight key features, benefits, and use cases. This product video creation tool is ideal for e-commerce and service providers looking to convey product value quickly and memorably to potential customers.

cases_4

Enhancing Learning and Training Experiences

Instructors and trainers can leverage the Luma Dream Machine API to produce educational videos that make learning more engaging. This tool converts instructional text into videos, making complex information easier to understand through engaging visuals. Perfect for online courses, corporate training, and public tutorials, it’s an effective way to connect with visual learners and increase retention.

cases_5

Adding Visual Depth to Websites and Apps

Using the Luma Dream Machine API, websites and apps can feature dynamic, video-based elements that improve user interaction. By converting text prompts into captivating videos, businesses can create immersive experiences on landing pages, onboarding screens, and customer touchpoints. This integration boosts user engagement and time-on-page, enhancing overall brand appeal.

cases_6

Amplifying Event Promotions with Video Marketing

The Luma Dream Machine API is perfect for promoting events with engaging video content that captures the vibe and excitement of an occasion. Brands can input event details as text prompts to generate event promotional videos that build anticipation, showcase event highlights, and increase attendance. This approach helps potential attendees visualize the experience, generating buzz well before the event unfolds.

Top Trending Generative AI APIs

 

Maximize the potential of your projects with our Generative AI APIs. From video generation & image creation to text generation, animation, 3D modeling, prompt generation, image restoration, and code generation, our advanced APIs cover all aspects of generative AI to meet your needs.