Start using the Luma API in minutes. Learn how to modify and transform videos using advanced AI models.
Welcome to the Luma API!#
This quick start guide will walk you through the basic steps to begin modifying videos using state-of-the-art AI models.Overview#
Video Modification
Transform existing videos with AI-powered modifications and enhancements
Task Tracking
Real-time status tracking and webhook callback notificationsGenerated videos are processed asynchronously. Use callbacks or polling to track completion status.
Authentication#
All API requests require authentication via Bearer Token.1. Get Your API Key#
Include your API key in all requests:Please protect your API key and never share it publicly. If compromised, reset it immediately on the management page.
Basic Usage#
1. Modify Existing Video#
Start by creating your first video modification task:{
"code": 200,
"msg": "success",
"data": {
"taskId": "774d9a7dd608a0e49293903095e45a4c"
}
}
2. Check Generation Status#
Use the returned taskId to monitor progress:0: Generating - Task is currently being processed
1: Success - Task completed successfully
2: Task Creation Failed - Unable to create task
3: Generation Failed - Task created successfully but generation failed
4: Callback Failed - Generation successful but callback failed
Complete Workflow Example#
Here's a complete example of modifying a video and waiting for completion:Advanced Features#
Watermark Support#
Add watermarks to generated videos:Using Callbacks#
Set up webhook callbacks for automatic notifications:Learn more about callbacks
Set up webhook callbacks to receive automatic notifications when videos are ready.Error Handling#
Common error scenarios and how to handle them:Invalid Video URL (Code 422)
Generation Failed (Code 501)
Rate Limit (Code 429)
Best Practices#
1.
Use Callbacks: Set up webhook callbacks instead of polling for better performance
2.
Prompt Engineering: Use detailed, specific prompts for better results
3.
Video Preprocessing: Ensure input videos are optimized and accessible
4.
Download Management: Download generated videos promptly as they may expire
5.
Error Handling: Implement robust error handling and retry logic
Important Limitations#
Language Support: Prompts are only supported in English
Video Storage: Generated videos may expire after a period of time
File Size: Maximum video size is 500MB
Duration: Maximum video duration is 10 seconds
Input Videos: Must be publicly accessible URLs
Processing Time: Video generation may take several minutes
Supported Parameters#
Core Parameters#
| Parameter | Type | Description | Required |
|---|
prompt | string | Required. Text description for video modification | ✓ |
videoUrl | string | Required. Input video URL to modify | ✓ |
Optional Parameters#
| Parameter | Type | Description | Default |
|---|
callBackUrl | string | Webhook notification URL | - |
watermark | string | Watermark identifier | - |
Next Steps#
Generate Video Modification
Learn about all generation parameters and advanced options
Track Progress
Monitor task status and retrieve detailed generation information
Webhook Callbacks
Set up automatic notifications for task completionSupport#
Need help? Here are your options:API Status: Monitor service health and announcements
Documentation: Explore detailed API references
Community: Join our developer community for tips and examples
Ready to create amazing AI-modified videos? Start with the examples above and explore the full API capabilities!