Agent skill · creative production · davila7

luma-imagegen

Use when the user asks to generate images via the Luma AI API (Dream Machine / Photon); collects a prompt and options interactively, then calls the API using the bundled script. Requires LUMA_API_KEY — will prompt the user if missing.

Why this skill is useful

Adds an executable script for generating images via the Luma AI API, including interactive prompt collection and async polling.

What it needs

Requires python3 installed locally. Requires lumalabs account access. About 4k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.

What this skill does

Luma Image Generation Skill Generates images using the Luma AI Photon model (Dream Machine API). Handles API key detection, interactive prompt collection, parameter selection, async polling, and final image download — all via the bundled scripts/lumaimagegen.py CLI. When to use Generate a new image from a text description using Luma AI (Photon / Photon Flash) Use a reference image to guide style, structure, or character consistency Modify or stylize an existing image using Luma's modifyimageref Workflow 1. Check API key — detect LUMAAPIKEY in environment. If missing, guide the user (see below). 2. Collect inputs — ask the user for: prompt, aspect ratio, model choice, and any optional reference images. 3. Build the structured prompt — augment the user's description into a labeled spec (see prompt template below). 4. Run the bundled CLI — execute scripts/lumaimagegen.py with the collected parameters. 5. Poll until complete — the script handles async polling automatically; wait for state: completed. 6. Display result — show the final image URL and download the image to output/luma/. 7. Iterate — if the result doesn't match expectations, adjust the prompt and re-run. API key detection & setup Before any API call, check for the key: If LUMAAPIKEY is missing: 1. Tell the user the key is not set. 2. Direct them to generate one: https://lumalabs.ai/dream-machine/api/keys 3. Ask them to add it to their .env file or export it in their shell: 4. Never ask the user to paste the key in chat. Ask them to set it locally and confirm when ready. 5. Once confirmed, retry the --check-key command to verify. Interactive questions to ask the user Ask these questions before running the generation: 1. Prompt (required): "What image do you want to generate? Describe the scene, subject, style, and any important details." 2. Aspect ratio (optional, default 16:9): "What aspect ratio? Options: 1:1, 3:4, 4:3, 9:16, 16:9 (default), 9:21, 21:9" 3. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills davila7/luma-imagegen

View the source on GitHub

Browse the @skills marketplace