Here is our backward-compatible support for the older Luma AI API.
Overview
The Luma AI Dream Machine API allows developers to generate, retrieve, and extend AI-generated content using a variety of inputs. This API is particularly useful for creative applications, such as generating visual content from text prompts.
Each generation costs 500 000 AI/ML Tokens.
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
Generating a video using this model involves making two sequential API calls:
The first one is for creating and sending a video generation task to the server (returns a generation ID). This can be either a generation from a reference image/prompt or a video extension operation that adds length to an existing video.
The second one is for requesting the generated or extended video from the server using the generation ID received from the first endpoint.
Below, you can find three corresponding API schemas and examples for all endpoint calls.
API Schemas
Ensure you replace <YOUR_AIMLAPI_KEY> with your actual API key before running the code.