Luma Ray 1.6 (Text-to-Video)
Overview
The Luma AI Dream Machine API allows developers to generate and extend AI-generated videos based on text prompts.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
How to Make a Call
API Schemas
Generate video
loop parameter controls if the generated video will be looped.
The text description of the scene, subject, or action to generate in the video.
The aspect ratio of the generated video.
Whether to loop the video
falseThe resolution of the output video, where the number refers to the short side in pixels.
The length of the output video in seconds.
Successfully generated video
Successfully generated video
Fetch generation
After sending a request for video generation, this task is added to the queue. Based on the service's load, the generation can be completed in seconds or take a bit more.
Bearer key
No content
No content
Example: Fetch Single Generation
For example, if you are waiting for video dreaming (when the video is popped from the queue and generation is in processing), then you can send the following request:
Fetch Multiple Generations
Instead of using the generation_id parameter, you will pass generation_ids, which can be an array of IDs. This parameter can also accept IDs separated by commas.
Bearer key
No content
No content
Example: Fetch Multiple Generations
Example: Fetch Multiple Generations
Extend video
You can extend a video using an existing video you generated before (using its generation ID) or by using an image (via URL). The extension can be done by appending to or prepending from the original content.
The keywords parameter controls the following extensions. It can include parameters for defining frames:
first frame (
frame0)last frame (
frame1)
For example, if you want to use an image as a reference for a frame:
Or, in the case of using a previously generated video:
Bearer key
falseray-2Possible values: No content
Examples
Ensure you replace <YOUR_AIMLAPI_KEY> with your actual API key before running the code.
Extension with the Image
Extension with the Generation
Last updated
Was this helpful?