Leonardo.Ai API
Access Leonardo.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: "leonardoai/lucid-origin"
}).then(imageElement => {
document.body.appendChild(imageElement);
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.txt2img("A beautiful sunset", {
model: "leonardoai/lucid-origin"
}).then(imageElement => {
document.body.appendChild(imageElement);
});
</script>
</body>
</html>
List of Leonardo.Ai Models
Lucid Origin
leonardoai/lucid-origin
Lucid Origin is a text-to-image generation model from Leonardo AI, designed to deliver high aesthetic fidelity and creative versatility. It produces Full HD renders with rich color saturation, sharp detail, and strong prompt adherence across multi-element scenes. The model excels at accurate in-image text rendering, making it well suited for branded content, graphic design, and promotional visuals. Its wide stylistic range — from hyper-realistic photography to stylized illustration and concept art — makes it a practical choice for APIs serving diverse creative workflows without requiring heavily engineered prompts.
ImagePhoenix 1.0
leonardoai/phoenix-1.0
Phoenix 1.0 is Leonardo AI's first foundational image generation model, built from the ground up rather than fine-tuned on an existing architecture. It delivers outputs up to approximately 5 megapixels (e.g. 2048x2048), making it one of the higher-resolution options available via API. Its core differentiator is prompt fidelity — reported at around 95% adherence, significantly above the 70-80% typical of standard models — enabling reliable execution of long, detailed prompts. It also features coherent text rendering for legible typography within generated images. Phoenix 1.0 targets professional publishing, marketing, and high-detail creative production pipelines where prompt accuracy and resolution matter.
Frequently Asked Questions
The Leonardo.Ai API gives you access to models for AI image generation. Through Puter.js, you can start using Leonardo.Ai models instantly with zero setup or configuration.
Puter.js supports a variety of Leonardo.Ai models, including Lucid Origin and Phoenix 1.0. Find all AI models supported by Puter.js in the AI model list.
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.
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.
Yes — the Leonardo.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.
Related Resources
How to Get a Leonardo.Ai API Key
Step-by-step guide to creating a Leonardo.Ai account and generating your API key.
Free, Unlimited Image Generation API
Overview of all image generation models available through Puter.js.
Free, Unlimited FLUX API
Generate images using FLUX models with Puter.js.
Free, Unlimited Stable Diffusion API
Generate images using Stable Diffusion models with Puter.js.