# Luma Labs — how to use (mcp.ai)

Connect your Luma Labs account and use 11 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Create and manage AI image and video generations and reusable files through the current Luma Agents API.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_luma_labs?ms=1787291340000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `luma_labs_delete_file`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/luma_labs`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/luma_labs/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/luma_labs/delete/file` — Soft-delete a Luma file so new generations cannot reference it. The file's metadata remains retrievable with state=deleted.
  - body: { file_id: string }
- `POST https://api.mcp.ai/api/luma_labs/edit/image` — Submit a paid, asynchronous Luma image-edit job. Returns immediately; use GET_GENERATION with generation_id to monitor it.
  - body: { model?: string, style?: string, prompt: string, source: object, user_id?: string, image_ref?: object[], web_search?: boolean, output_format?: string }
- `POST https://api.mcp.ai/api/luma_labs/edit/video` — Submit a paid, asynchronous Ray 3.2 video-edit job. Returns immediately; use GET_GENERATION with generation_id to monitor it.
  - body: { video?: object, prompt: string, source: object, user_id?: string, web_search?: boolean }
- `POST https://api.mcp.ai/api/luma_labs/extract/image/layers` — Submit a paid, asynchronous Luma image layer-extraction job. Pricing is flat per generation at the selected resolution, regardless of layer count; use GET_GENERATION with generation_id to monitor the 
  - body: { prompt: string, source: object, user_id?: string, layering?: object }
- `POST https://api.mcp.ai/api/luma_labs/generate/image` — Submit a paid, asynchronous Luma image generation job. Returns immediately; use GET_GENERATION with generation_id to monitor it.
  - body: { model?: string, style?: string, prompt: string, user_id?: string, image_ref?: object[], web_search?: boolean, aspect_ratio?: string, output_format?: string }
- `POST https://api.mcp.ai/api/luma_labs/generate/video` — Submit a paid, asynchronous Ray 3.2 video generation job. Returns immediately; use GET_GENERATION with generation_id to monitor it.
  - body: { video?: object, prompt: string, user_id?: string, web_search?: boolean, aspect_ratio?: string }
- `POST https://api.mcp.ai/api/luma_labs/get/file` — Get a Luma file's metadata and current ingest, moderation, or deletion state. Soft-deleted files remain retrievable with state=deleted.
  - body: { file_id: string }
- `POST https://api.mcp.ai/api/luma_labs/get/generation` — Get the current state, failure details, and output URLs for a Luma generation.
  - body: { generation_id: string }
- `POST https://api.mcp.ai/api/luma_labs/list/files` — List files in the connected Luma account, newest first, with optional state and purpose filters. Returns one page and a cursor for continuation.
  - body: { limit?: integer, state?: string, cursor?: string, purpose?: string }
- `POST https://api.mcp.ai/api/luma_labs/reframe/video` — Submit a paid, asynchronous Ray 3.2 video-reframe job. Returns immediately; use GET_GENERATION with generation_id to monitor it.
  - body: { video?: object, prompt: string, source: object, user_id?: string, web_search?: boolean, aspect_ratio: string }
- `POST https://api.mcp.ai/api/luma_labs/upload/file` — Directly upload file bytes to Luma and return the file ID, metadata, and current upload/ingest state.
  - body: { file: object, purpose?: string, user_id?: string, expires_at?: string }

## Example prompts
- "What can I do in Luma Labs?"
- "Show me a summary of my Luma Labs account"

## More
- Page: https://mcp.ai/luma_labs
- Agent spec (llms.txt): https://mcp.ai/luma_labs/llms.txt
- Postman collection: https://mcp.ai/luma_labs/postman.json
