Skip to content
Leonardo logo

lucid-origin

Text-to-ImageLeonardoHosted

Lucid Origin from Leonardo.AI is their most adaptable and prompt-responsive model to date. Whether you're generating images with sharp graphic design, stunning full-HD renders, or highly specific creative direction, it adheres closely to your prompts, renders text with accuracy, and supports a wide array of visual styles and aesthetics – from stylized concept art to crisp product mockups.

Model Info
Terms and Licenselink
PartnerYes
Unit Pricing$0.007 per 512 by 512 tile, $0.00013 per step

Usage

export interface Env {
AI: Ai;
}
export default {
async fetch(request, env): Promise<Response> {
const inputs = {
prompt: "cyberpunk cat",
};
const response = await env.AI.run(
"@cf/leonardo/lucid-origin",
inputs
);
return new Response(response, {
headers: {
"content-type": "image/jpg",
},
});
},
} satisfies ExportedHandler<Env>;

Parameters

prompt
stringrequiredminLength: 1A text description of the image you want to generate.
guidance
numberdefault: 4.5minimum: 0maximum: 10Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
seed
integerminimum: 0Random seed for reproducibility of the image generation
height
integerdefault: 1120minimum: 0maximum: 2500The height of the generated image in pixels
width
integerdefault: 1120minimum: 0maximum: 2500The width of the generated image in pixels
num_steps
integerminimum: 1maximum: 40The number of diffusion steps; higher values can improve quality but take longer
steps
integerminimum: 1maximum: 40The number of diffusion steps; higher values can improve quality but take longer

API Schemas

{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"description": "A text description of the image you want to generate."
},
"guidance": {
"type": "number",
"default": 4.5,
"minimum": 0,
"maximum": 10,
"description": "Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt"
},
"seed": {
"type": "integer",
"minimum": 0,
"description": "Random seed for reproducibility of the image generation"
},
"height": {
"type": "integer",
"minimum": 0,
"maximum": 2500,
"default": 1120,
"description": "The height of the generated image in pixels"
},
"width": {
"type": "integer",
"minimum": 0,
"maximum": 2500,
"default": 1120,
"description": "The width of the generated image in pixels"
},
"num_steps": {
"type": "integer",
"minimum": 1,
"maximum": 40,
"description": "The number of diffusion steps; higher values can improve quality but take longer"
},
"steps": {
"type": "integer",
"minimum": 1,
"maximum": 40,
"description": "The number of diffusion steps; higher values can improve quality but take longer"
}
},
"required": [
"prompt"
]
}