Skip to content
Leonardo logo

phoenix-1.0

Text-to-ImageLeonardoHosted

Phoenix 1.0 is a model by Leonardo.Ai that generates images with exceptional prompt adherence and coherent text.

Model Info
Terms and Licenselink
PartnerYes
Unit Pricing$0.0058 per 512 by 512 tile, $0.00011 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/phoenix-1.0",
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: 2minimum: 2maximum: 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: 1024minimum: 0maximum: 2048The height of the generated image in pixels
width
integerdefault: 1024minimum: 0maximum: 2048The width of the generated image in pixels
num_steps
integerdefault: 25minimum: 1maximum: 50The number of diffusion steps; higher values can improve quality but take longer
negative_prompt
stringminLength: 1Specify what to exclude from the generated images

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": 2,
"minimum": 2,
"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": 2048,
"default": 1024,
"description": "The height of the generated image in pixels"
},
"width": {
"type": "integer",
"minimum": 0,
"maximum": 2048,
"default": 1024,
"description": "The width of the generated image in pixels"
},
"num_steps": {
"type": "integer",
"default": 25,
"minimum": 1,
"maximum": 50,
"description": "The number of diffusion steps; higher values can improve quality but take longer"
},
"negative_prompt": {
"type": "string",
"minLength": 1,
"description": "Specify what to exclude from the generated images"
}
},
"required": [
"prompt"
]
}