This model card illustartes the steps to use Dream Machine API endpoint.
You can also check out other model cards:
Dream Machine, created by Luma Labs, is an advanced AI model that swiftly produces high-quality, realistic videos from text and images. These videos boast physical accuracy, consistent characters, and naturally impactful shots. Although Luma Lab doesn’t currently provide a Dream Machine API within their Luma API suite, PiAPI has stepped up to develop the unofficial Dream Machine API. This enables developers globally to integrate cutting-edge text-to-video and image-to-video generation into their applications or platforms.
Below we share the code snippets on how to use Dream Machine API's Video Generation endpoint.
1
2 [object Object] http.client
3
4 conn = http.client.HTTPSConnection([object Object])
5
6 payload = [object Object]
7
8 headers = {
9 [object Object], //Insert your API Key here
10 [object Object],
11 [object Object]
12 }
13
14 conn.request("POST", "/api/luma/v1/video", payload, headers)
15
16 res = conn.getresponse()
17 data = res.read()
18
19 [object Object](data.decode("utf-8"))
1
2 {
3 [object Object]: 200,
4 [object Object]: {
5 [object Object]: "6c4*****************aaaa" //Record the taskID provided in your response terminal
6 },
7 [object Object]: "success"
8 }
1
2 [object Object] http.client
3
4 conn = http.client.HTTPSConnection([object Object])
5
6
7 headers = {
8 [object Object],
9 }
10
11 conn.request("GET", "/api/luma/v1/video/task_id", headers=headers) //Replace the "task_id" with your task ID
12
13 res = conn.getresponse()
14 data = res.read()
15
16 [object Object](data.decode("utf-8"))
For fetch endpoint responses - Refer to our
documentation for more detailed information.