Leonardo AI API - Image Generation, Upscaling & Custom Models avatar

Leonardo AI API - Image Generation, Upscaling & Custom Models

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Leonardo AI API - Image Generation, Upscaling & Custom Models

Leonardo AI API - Image Generation, Upscaling & Custom Models

Generate stunning AI images with Leonardo AI's powerful image generation models. Create images from text prompts, upscale existing images, generate variations, and access custom-trained models through a simple interface.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

18

Total users

0

Monthly active users

21 days ago

Last modified

Features

Limited permissions

Share

Generate stunning AI images with Leonardo AI. Create images from text prompts, upscale existing images, generate variations, and use custom-trained models. Perfect for content creation, marketing, game assets, and creative automation.

BYOK (Bring Your Own Key) -- you provide your own API credentials.


Before You Start

This actor requires your own API credentials to fetch real data.

Where to get your key: Your Leonardo AI API key (from app.leonardo.ai/api-access)


Quick Start

Run with real data

{
"task": "generate_image",
"width": 1024,
"height": 1024,
"numImages": 1,
"guidanceScale": 7,
"public": false,
"alchemy": false,
"photoReal": false,
"upscaleMultiplier": 2,
"apiKey": "YOUR_API_KEY_HERE"
}

Input Parameters

ParameterTypeDefaultRequiredDescription
taskstring"generate_image"Yes*The operation to perform with Leonardo AI
promptstring-NoText description of the image to generate
negativePromptstring-NoWhat to avoid in the generated image
modelIdstring-NoLeonardo AI model ID to use for generation
presetStylestring-NoPreset style to apply
widthinteger1024NoImage width in pixels (must be divisible by 8)
heightinteger1024NoImage height in pixels (must be divisible by 8)
numImagesinteger1NoNumber of images to generate (1-8)
guidanceScalenumber7NoHow closely to follow the prompt (1-20, higher = more literal)
seedinteger-NoRandom seed for reproducible results
publicbooleanfalseNoMake generation publicly visible
alchemybooleanfalseNoEnable Alchemy for higher quality output
photoRealbooleanfalseNoEnable PhotoReal for photorealistic images
generationIdstring-NoGeneration ID for get_generation, upscale, or variations
imageIdstring-NoImage ID for upscale or variation operations
upscaleMultipliernumber2NoUpscale factor (1.5 or 2)
apiKeystring-Yes*Your Leonardo AI API key (from app.leonardo.ai/api-access)
webhookUrlstring-NoURL to receive results via webhook for automation platforms

Pricing

This actor uses pay-per-event billing:

EventWhen it is chargedPrice
Actor startOnce when the run starts, one event per GB of memory (minimum one). At the default 2 GB of memory a run starts at $0.20$0.10 per GB
Generate ImageGenerate images from text prompts with customizable settings$0.01
Get GenerationGet details of a specific generation$0.01
List GenerationsList recent generations$0.01
Upscale ImageUpscale images to higher resolution (1.5x or 2x)$0.01
Generate VariationsCreate variations of existing images$0.01
List ModelsList available generation models$0.01
Get ModelGet details of a specific model$0.01
List User GenerationsList your generations$0.01
Get User InfoGet account info and credit balance$0.01
Calculate CostEstimate credit cost before generating$0.01
ResultEach item written to the default dataset$0.00001

Troubleshooting

"API key is required"

  • Add your API key in the input

"API error 403" or "Unauthorized"

Your API key is invalid, expired, or doesn't have access to this specific API endpoint. Double-check your key and account permissions.

"API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

No results or empty dataset

Check the run log for error messages. Common causes:

  • Invalid input format (check the examples above)
  • API key without proper permissions
  • The target data doesn't exist or is too small to track

How do I test without an API key?

Run the actor without a Leonardo AI API key, or set demoMode to true, and it completes with labeled sample output that shows the exact format of live results. Every sample item carries demo: true and a _notice field, and sample runs charge no task events. Provide your own Leonardo AI API key in the input to receive live data.


Built by John Rippy | Actor Arsenal