Ship a Full-Stack App with One Prompt

Copy this prompt into your AI coding agent, or open it in one below.

Give this to your AI Create a to-do list app using Puter.js

Coding manually? see the guide

Luma AI

Luma AI API

Access Luma AI instantly with Puter.js, and add AI to any app in a few lines of code without backend or API keys.

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.txt2img("A beautiful sunset", {
    model: "luma/photon"
}).then(imageElement => {
    document.body.appendChild(imageElement);
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.txt2img("A beautiful sunset", {
            model: "luma/photon"
        }).then(imageElement => {
            document.body.appendChild(imageElement);
        });
    </script>
</body>
</html>

List of Luma AI Models

Image

Photon

luma/photon

Photon is Luma AI's flagship text-to-image model, launched in November 2024 alongside the Dream Machine platform. Luma built it on a proprietary Universal Transformer architecture rather than the diffusion process most image generators rely on, and says the design brings a large context window to image generation, letting the model take in multiple reference images and detailed instructions at once. The model is built around character consistency, producing a consistent character from a single reference image and placing it into new scenes. It accepts up to four reference images for style, composition, or character guidance, and supports iterative editing through natural language prompts rather than manual masking. Luma positions Photon for designers, filmmakers, architects, and other visual creators who need photorealistic, production-quality output with strong prompt adherence, and reports it as faster to run than comparable diffusion-based models in its own testing.

Image

Photon Flash

luma/photon-flash

Photon Flash is the faster variant of Luma AI's Photon image model, built on the same Universal Transformer architecture rather than diffusion. It's priced lower per image than Photon here, and Luma positions it as the speed-optimized option in the Photon family rather than a stripped-down one. It keeps Photon's core feature set: character consistency from a single reference image, support for up to four reference images for style and composition, and natural-language prompt-based editing. Luma describes Flash as built for the same creative workflows as Photon, trading some of Photon's generation time for lower latency and cost. That tradeoff suits high-volume or latency-sensitive use, such as rapid prototyping, iterative ideation, and applications that generate many images per session, where turnaround time matters more than squeezing out the last increment of output refinement.

Frequently Asked Questions

What is this Luma AI API about?

The Luma AI API gives you access to models for AI image generation. Through Puter.js, you can start using Luma AI models instantly with zero setup or configuration.

Which Luma AI models can I use?

Puter.js supports a variety of Luma AI models, including Photon and Photon Flash. Find all AI models supported by Puter.js in the AI model list.

How much does it cost?

With the User-Pays model, users cover their own AI costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.

What is Puter.js?

Puter.js is a JavaScript library that provides access to AI, storage, and other cloud services directly from a single API. It handles authentication, infrastructure, and scaling so you can focus on building your app.

Does this work with React / Vue / Vanilla JS / Node / etc.?

Yes — the Luma AI API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building. See the documentation for more details.