KIE.AI
English
  • English
  • Chinese
English
  • English
  • Chinese
Support
English
  • English
  • Chinese
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma API
File Upload APICommon API
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma API
File Upload APICommon API
  1. Luma API
  • Luma API Quickstart
  • Luma Modify Video Callbacks
  • Generate Luma Modify Video
    POST
  • Get Luma Modify Details
    GET
English
  • English
  • Chinese
Support
English
  • English
  • Chinese
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma API
File Upload APICommon API
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma API
File Upload APICommon API
  1. Luma API

Luma API Quickstart

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 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:
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:
Node.js
Python
cURL
Response:
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "774d9a7dd608a0e49293903095e45a4c"
  }
}

2. Check Generation Status#

Use the returned taskId to monitor progress:
Node.js
Python
cURL
Status Values:
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:
JavaScript
Python

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#

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 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#

ParameterTypeDescriptionRequired
promptstringRequired. Text description for video modification✓
videoUrlstringRequired. Input video URL to modify✓

Optional Parameters#

ParameterTypeDescriptionDefault
callBackUrlstringWebhook notification URL-
watermarkstringWatermark 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 completion

Support#

Need help? Here are your options:
Technical Support: support@kie.ai
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!
Next
Luma Modify Video Callbacks
Built with