Get the FREE Ultimate OpenClaw Setup Guide →

luma-api

Powered by Ray (video) and Photon (image) models by Luma AI

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio lumalabs-luma-api-mcp npx -y lumalabs-luma-api-mcp \
  --env LUMA_API_KEY="paste-your-api-key-here"

How to use

The Luma API MCP server exposes tools to generate images and videos using the Luma API. After installing an MCP client like Claude Desktop, connect to this MCP server (luma-api) and use the Create Image or Create Video capabilities described in the features. Create Image accepts a prompt and optional references (image_ref, style_ref, character_ref, modify_image_ref) along with aspect_ratio and model selections to influence output. Create Video accepts a prompt, aspect_ratio, model, and optional parameters such as loop, resolution, duration, and frame references to shape the start and end of the video. Typical response times range from a few seconds for images to 15-60 seconds for longer videos depending on resolution and model. Ensure you have your API key configured so requests are authenticated when you run the actions through your MCP client.

How to install

Prerequisites:

  • Node.js installed or access to an MCP client that can route a server via MCP configuration
  • An API key from Luma Labs (see https://lumalabs.ai/api/keys)

Step 1: Obtain the MCP package

  • If using npm/npx, the MCP server is identified by the package name lumalabs-luma-api-mcp

Step 2: Configure environment

  • You will need to set your Luma API key in the environment or through the MCP tooling. Example: LUMA_API_KEY=YOUR_API_KEY

Step 3: Run the MCP server via the MCP client

  • Using npx (as per mcp_config):
    • npx -y lumalabs-luma-api-mcp
  • Alternatively, run the included setup script if you have the repository:

Step 4: Connect your MCP client

  • Open Claude Desktop or any MCP client and connect to the luma-api MCP server as configured.

Notes:

  • The server relies on an API key for authentication. Ensure LUMA_API_KEY is set in your environment or provided by the MCP client as required.
  • If you need to customize parameters, refer to the Create Image and Create Video option fields in the README (prompt, aspect_ratio, model, and refs for images/videos).

Additional notes

Tips and considerations:

  • Ensure the API key is valid and active to avoid authentication errors.
  • Supported aspect ratios for both image and video: 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21. Default for image is 16:9 and for video is 16:9.
  • Image generation models: photon-1 and photon-flash-1 (default photon-1).
  • Video generation models: ray-2, ray-flash-2, and ray-1-6 (default ray-2).
  • Video generation typically takes longer than image generation; longer durations and higher resolutions will increase render times.
  • You can influence outputs using image_ref (up to 8), style_ref (up to 1), character_ref (up to 4), and modify_image_ref (up to 1) for images; frame0_image/frame1_image and their IDs can shape video timing.
  • If you encounter rate limits or API errors, check your API quota and confirm your API key is valid.

Related MCP Servers

Sponsor this space

Reach thousands of developers