phoenix-1.0
Text-to-Image • LeonardoPhoenix 1.0 is a model by Leonardo.Ai that generates images with exceptional prompt adherence and coherent text.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| Partner | Yes |
| 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>;curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/leonardo/phoenix-1.0 \ -X POST \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -d '{ "prompt": "cyberpunk cat" }'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 promptseed
integerminimum: 0Random seed for reproducibility of the image generationheight
integerdefault: 1024minimum: 0maximum: 2048The height of the generated image in pixelswidth
integerdefault: 1024minimum: 0maximum: 2048The width of the generated image in pixelsnum_steps
integerdefault: 25minimum: 1maximum: 50The number of diffusion steps; higher values can improve quality but take longernegative_prompt
stringminLength: 1Specify what to exclude from the generated images
The binding returns a ReadableStream with the
output (check the model's output schema).