Skip to main content

Luma API Quickstart

Get started with the Luma API in minutes. Learn how to modify and transform videos using advanced AI models.

Welcome to the Luma API!

This quickstart guide will walk you through the essential steps to start 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 notifications
Generated 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

Visit the API Key Management Page to obtain your API key.
2

Add to Request Headers

Include your API key in all requests:
Keep your API key secure and never share it publicly. If compromised, reset it immediately in the management page.

Basic Usage

1. Modify an Existing Video

Start by creating your first video modification task:
Response:

2. Check Generation Status

Use the returned taskId to monitor progress:
Status Values:
  • 0: GENERATING - Task is currently being processed
  • 1: SUCCESS - Task completed successfully
  • 2: CREATE_TASK_FAILED - Failed to create the task
  • 3: GENERATE_FAILED - Task creation succeeded but generation failed
  • 4: CALLBACK_FAILED - Generation succeeded but callback failed

Complete Workflow Example

Here’s a complete example that modifies a video and waits for completion:

Advanced Features

Watermark Support

Add watermarks to your generated videos:

Using Callbacks

Set up webhook callbacks for automatic notifications:

Learn More About Callbacks

Set up webhook callbacks to receive automatic notifications when your videos are ready.

Error Handling

Common error scenarios and how to handle them:

Best Practices

Performance Optimization

  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 only support English
  • Video Storage: Generated videos may expire after a certain period
  • 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 can take several minutes

Supported Parameters

Core Parameters

Optional Parameters

Task Status Descriptions

successFlag: 0
Generating
Task is currently being processed
successFlag: 1
Success
Task completed successfully
successFlag: 2
Create Task Failed
Failed to create the task
successFlag: 3
Generate Failed
Task creation succeeded but generation failed
successFlag: 4
Callback Failed
Generation succeeded but callback failed

Next Steps

Generate Video Modifications

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 completion

Support

Need help? Here are your options:
  • Technical Support: support@apikley.ru
  • 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!
To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.apikley.ru/llms.txt
Rate limits and quotas are enforced by Apikley and may differ from upstream providers.