POST
/
api
/
v1
/
modify
/
generate
Generate Luma Modify Video
curl --request POST \
  --url https://api.kie.ai/api/v1/modify/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A futuristic cityscape at night with towering glass spires reaching into a starry sky",
  "videoUrl": "https://example.com/input-video.mp4",
  "callBackUrl": "https://your-callback-url.com/luma-callback",
  "watermark": "your-watermark-id"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "774d9a7dd608a0e49293903095e45a4c"
  }
}

Important Notes

  • Generated videos will be processed asynchronously
  • Use the returned taskId to track generation progress
  • Callback URL is recommended for production use to receive automatic notifications when generation completes
  • Original video URL must be publicly accessible
  • Watermark parameter is optional for branding purposes

Video Requirements

Supported Formats: MP4, MOV, AVI
Maximum File Size: 500MB
Maximum Duration: 10 seconds
Accessibility: Video URL must be publicly accessible

Processing Time

Video modification is a compute-intensive process that typically takes:
  • Simple modifications: 2-5 minutes
  • Complex transformations: 5-15 minutes
  • High-resolution videos: 10-20 minutes
Use the callback mechanism or polling to track progress rather than waiting synchronously.

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: Authorization: Bearer YOUR_API_KEY

Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Body

application/json
prompt
string
required

Text prompt describing the desired video modifications. Required field that specifies how the input video should be modified.

  • Should be detailed and specific about the desired changes
  • Describe the visual elements you want to add or modify
  • IMPORTANT: Only English language is supported
Example:

"A futuristic cityscape at night with towering glass spires reaching into a starry sky. Neon lights in blue and purple illuminate the buildings while flying vehicles glide silently between the structures."

videoUrl
string<uri>
required

URL of the input video for modification. Required field.

  • Must be a valid video URL
  • Video must be accessible to the API server
  • Supported formats: MP4, MOV, AVI
  • Maximum file size: 500MB
  • Maximum duration: 10 seconds
Example:

"https://example.com/input-video.mp4"

callBackUrl
string<uri>

The URL to receive video generation task completion updates. Optional but recommended for production use.

  • System will POST task status and results to this URL when video generation completes
  • Callback includes generated video URLs and task information
  • Your callback endpoint should accept POST requests with JSON payload containing video results
  • For detailed callback format and implementation guide, see Luma Modify Video Callbacks
  • Alternatively, use the Get Luma Modify Details endpoint to poll task status
Example:

"https://your-callback-url.com/luma-callback"

watermark
string

Watermark identifier to add to the generated video.

  • Optional parameter
  • If provided, a watermark will be added to the output video
  • Can be used for branding or identification purposes
Example:

"your-watermark-id"

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request has been processed successfully
  • 401: Unauthorized - Authentication credentials are missing or invalid
  • 402: Insufficient Credits - Account does not have enough credits to perform the operation
  • 404: Not Found - The requested resource or endpoint does not exist
  • 422: Validation Error - The request parameters failed validation checks The request parameters are incorrect, please check the parameters.
  • 429: Rate Limited - Request limit has been exceeded for this resource
  • 455: Service Unavailable - System is currently undergoing maintenance
  • 500: Server Error - An unexpected error occurred while processing the request
  • 501: Generation Failed - Video generation task failed
  • 505: Feature Disabled - The requested feature is currently disabled
Available options:
200,
401,
402,
404,
422,
429,
455,
500,
501,
505
msg
string

Error message when code != 200

Example:

"success"

data
object