Luma Video API

Turn text or reference images into videos.

Text and images

Start creating with a text description or reference image.

Continue creating

Extend a video or set it to loop using the corresponding action.

Get your video

Use the original task ID to retrieve the completed result and video URL.

Start with your first request

Get a Key, copy the request, and view the corresponding response JSON below.

Request
export ACEDATACLOUD_API_KEY="YOUR_API_KEY"
curl --request POST "https://api.acedata.cloud/luma/videos" \
  --header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "action": "generate",
  "prompt": "A small sailboat crossing a calm lake at sunrise.",
  "async": true
}'
Submission response JSON

Below is an excerpt of key fields from the current API response. The task identifier, usage, and generated content depend on the values returned by your request.

{
  "task_id": "50fc6182-fa86-4c7d-ac12-2fa27ec2f151"
}

Query the original task and retrieve the result

Use the task ID returned upon submission to check progress and retrieve the final result.

Request
curl --request POST "https://api.acedata.cloud/luma/tasks" \
  --header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"action": "retrieve", "id": "50fc6182-fa86-4c7d-ac12-2fa27ec2f151"}'
In-progress response JSON

The fields below illustrate an in-progress task. Continue querying the same ID until it completes.

{
  "id": "50fc6182-fa86-4c7d-ac12-2fa27ec2f151",
  "type": "videos",
  "finished_at": null
}
Completed response JSON

The following is an excerpt of key fields from the existing API response. Use the task ID, usage, and generated content returned by your request.

{
  "id": "50fc6182-fa86-4c7d-ac12-2fa27ec2f151",
  "started_at": 1725077412.021,
  "finished_at": 1725077566.241,
  "elapsed": 154.22,
  "response": {
    "success": true,
    "task_id": "50fc6182-fa86-4c7d-ac12-2fa27ec2f151",
    "video_url": "https://platform.cdn.acedata.cloud/luma/50fc6182-fa86-4c7d-ac12-2fa27ec2f151.mp4",
    "state": "completed"
  }
}

The inputs for generating, extending, and looping videos differ. Start by completing a basic generation.

Read the video or audio track URL returned in response. If the task fails, read the error message and end the query process.

Usage and costs

Refer to the current API and pricing page for request parameters, available models, and costs. If you encounter authentication, balance, or quota errors, check the Key's application, validity period, and usage restrictions. Retain the trace_id when troubleshooting requests.

View parameters, response fields, and error handling

Integrate the Luma Video API into your application

Continue to the complete guide for parameters, result fields, and error handling.